Downloads · 30 days
15
27% of all-time downloads
Amadoudllo/emotion-detection-cnn
emotion-detection-cnn is a machine learning model from Amadoudllo. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
Modèle CNN entraîné pour détecter les émotions faciales en temps réel.
Downloads · 30 days
15
27% of all-time downloads
All-time downloads
56
Public
Repo size
18.2 MB
Likes
1
Public
Click a slice to open those files.
.keras18.2 MB · 100%
From the Hugging Face model README
Modèle CNN entraîné pour détecter les émotions faciales en temps réel.
| Modèle | Test Accuracy |
|---|---|
| CNN from Scratch | 64.44% 🏆 |
| VGG16 Transfer | 41.86% |
| VGG16 Fine-tuné | 42.04% |
| Classe | Emoji |
|---|---|
| Angry | 😠 |
| Fear | 😨 |
| Happy | 😄 |
| Neutral | 😐 |
| Sad | 😢 |
| Surprise | 😲 |
import tensorflow as tf
import numpy as np
from huggingface_hub import hf_hub_download
# Télécharger le modèle
model_path = hf_hub_download(
repo_id = "AmadouDiarouga/emotion-detection-cnn",
filename = "emotion_model.keras"
)
# Charger le modèle
model = tf.keras.models.load_model(model_path)
# Prédire sur une image 48x48 grayscale
img = np.random.rand(1, 48, 48, 1).astype("float32") # Exemple
preds = model.predict(img)
print("Émotion prédite :", np.argmax(preds))
emotion_model.keras — Modèle CNN complet (architecture + poids)class_indices.json — Mapping index → émotionEntraîné sur Kaggle avec GPU · AmadouDiarouga