Instructions to use charlykso/emoteflow-emotion-cnn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use charlykso/emoteflow-emotion-cnn with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://charlykso/emoteflow-emotion-cnn") - Notebooks
- Google Colab
- Kaggle
EmoteFlow Emotion Recognition CNN
A CNN model trained on FER2013 (and optionally fine-tuned on CK+) for real-time student emotion recognition. Part of the EmoteFlow learning engagement platform.
Labels
| Index | Emotion |
|---|---|
| 0 | Angry |
| 1 | Disgust |
| 2 | Fear |
| 3 | Happy |
| 4 | Sad |
| 5 | Surprise |
| 6 | Neutral |
Performance
- Test Accuracy: 0.4866
- Input: 48x48 grayscale image, normalized to [0, 1]
- Output: 7-class softmax probabilities
Usage
import numpy as np
import onnxruntime as ort
session = ort.InferenceSession("emoteflow_model.onnx")
image = np.random.rand(1, 48, 48, 1).astype(np.float32) # your preprocessed frame
result = session.run(None, {"input": image})
emotion_probs = result[0][0]
Training
- Phase 1: Trained on FER2013 (50 epochs max, early stopping)
- Phase 2: Fine-tuned on CK+ (if available, 20 epochs)
- Architecture: 4-block CNN (64β128β256β512) with BatchNorm + Dropout
- Downloads last month
- 13