Downloads · 30 days
0
cadenlpicard/identify_dance_styles
identify_dance_styles is a machine learning model from cadenlpicard. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a convolutional neural network (CNN) trained to classify dance styles from video frames. It predicts one of seven dance styles: ballet, breakdance, contemporary, hip hop, jazz, salsa, and tap.
Downloads · 30 days
0
Access
Public
Updated Dec 10, 2024
Repo size
209 MB
Likes
0
Public
Click a slice to open those files.
.h588.8 MB · 100%
From the Hugging Face model README
This model is a convolutional neural network (CNN) trained to classify dance styles from video frames. It predicts one of seven dance styles: ballet, breakdance, contemporary, hip hop, jazz, salsa, and tap.
The Dance Style Classification Model is designed to classify dance styles based on individual video frames. It uses a convolutional neural network (CNN) architecture optimized for multi-class classification tasks.
This model can be used to predict dance styles from images of video frames. It is suitable for tasks like:
The model can be integrated into larger systems for real-time activity recognition or used as a component in video classification workflows.
This model should not be used to identify individuals, infer personal attributes, or for any malicious or unethical purposes.
The dataset used for training may not fully represent the global diversity of dance styles. Biases could arise from the limited geographic or cultural sources of training data.
Use the following code snippet to get started with the model:
from tensorflow.keras.models import load_model
import cv2
import numpy as np
# Load the model
model = load_model("/path/to/your/model.h5")
# Preprocess an image
def preprocess_image(image_path, img_size=(128, 128)):
img = cv2.imread(image_path)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
img = cv2.resize(img, img_size)
img = img / 255.0
return np.expand_dims(img, axis=0)
# Make a prediction
image_path = "/path/to/your/image.jpg"
input_image = preprocess_image(image_path)
predictions = model.predict(input_image)
# Decode predictions
class_names = ["ballet", "breakdance", "contemporary", "hip hop", "jazz", "salsa", "tap"]
predicted_class = class_names[np.argmax(predictions)]
print(f"Predicted class: {predicted_class}")
The model was trained on a dataset of video frames extracted from publicly available dance videos. Each frame is labeled with its corresponding dance style.
The model was trained using a supervised learning approach with categorical cross-entropy loss and the Adam optimizer.
The model was evaluated on a held-out test set comprising 20% of the dataset.
The evaluation was conducted across seven dance style categories.
The model achieved a test accuracy of 87.5%.
The model performs well for most classes, with slightly lower performance for classes with fewer samples in the dataset.
BibTeX:
@model{caden_picard_dance_style_model,
title={Dance Style Classification Model},
author={Caden Picard},
year={2024},
howpublished={\url{https://huggingface.co/models/dance_style_model}}
}
APA:
Picard, C. (2024). Dance Style Classification Model. Retrieved from https://huggingface.co/models/dance_style_model