Downloads · 30 days
6
6% of all-time downloads
on1onmangoes/wav2vec2-emotion-classifier-V2
wav2vec2-emotion-classifier-V2 is a audio classification model from on1onmangoes. Use it for the audio classification task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This model is a fine-tuned version of facebook/wav2vec2-base for multi-label emotion classification from audio.
Downloads · 30 days
6
6% of all-time downloads
All-time downloads
97
Public
Repo size
134 B
Likes
0
Public
Click a slice to open those files.
.json10 KB · 63%
From the Hugging Face model README
This model is a fine-tuned version of facebook/wav2vec2-base for multi-label emotion classification from audio.
The model uses a Hydra architecture with multiple binary classification heads, one for each emotion. It supports ignore labels (-100) for handling uncertain or unlabeled data points.
| Emotion | Accuracy | F1 Score | Valid Samples | Ignored Samples |
|---|---|---|---|---|
| angry | 0.8762 | 0.0000 | 4749 | 0 |
| disgust | 0.9872 | 0.0000 | 4749 | 0 |
| fear | 0.9821 | 0.0000 | 4749 | 0 |
| happy | 0.8793 | 0.0000 | 4749 | 0 |
| neutral | 0.6477 | 0.0000 | 4749 | 0 |
| depress | 0.9111 | 0.0000 | 4749 | 0 |
| surprise | 0.9299 | 0.0000 | 4749 | 0 |
| frustrated | 0.6949 | 0.0000 | 1996 | 2753 |
| excited | 0.7996 | 0.0000 | 1996 | 2753 |
{
"model_id": "facebook/wav2vec2-base",
"emotion_labels": [
"angry",
"disgust",
"fear",
"happy",
"neutral",
"depress",
"surprise",
"frustrated",
"excited"
],
"num_classes": 9,
"ignore_label": -100,
"batch_size": 4,
"num_epochs": 6,
"learning_rate": 0.0001,
"warmup_steps": 100,
"gradient_accumulation_steps": 4,
"classification_threshold": 0.5,
"weight_decay": 0.01,
"max_grad_norm": 1.0,
"seed": 42
}
This model was trained with support for ignore labels (-100). During inference:
import torch
from transformers import Wav2Vec2Processor
# Load model and processor
model = # Load your model here
processor = Wav2Vec2Processor.from_pretrained('mangoesai/wav2vec2-emotion-classifier-V2')
# Process audio
inputs = processor(audio_array, sampling_rate=16000, return_tensors="pt", padding=True)
# Get predictions
with torch.no_grad():
outputs = model(inputs.input_values, inputs.attention_mask)
probabilities = torch.sigmoid(outputs)
predictions = (probabilities > 0.5).int()
If you use this model, please cite:
@misc{wav2vec2-emotion-classifier,
author = {Your Name},
title = {Wav2Vec2 Multi-Label Emotion Classifier},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/mangoesai/wav2vec2-emotion-classifier-V2}
}