Emotion Recognition from Facial Expressions Using CNN
Look at the camera (or upload a photo of a face). The system finds every face, predicts the emotion and shows how confident it is.
Start the camera or upload a photo
Loading the model...
Detected emotion
-
No face yet
How it works
- Face detection - a small CNN (Tiny Face Detector) looks at the frame and returns a box around each face.
- Cropping - each face is cut out and resized to a small grayscale-like input for the second network.
- Emotion classification - a CNN trained on labelled face pictures gives a probability for each of the 7 emotions.
- Result - the emotion with the highest probability is shown with its confidence, and this repeats for every video frame.
Model details
| Part | Details |
|---|---|
| Face detector | Tiny Face Detector (CNN, about 190 KB) |
| Emotion model | Face Expression Net (CNN, about 330 KB) |
| Classes | neutral, happy, sad, angry, fearful, disgusted, surprised |
| Library | face-api.js running on TensorFlow.js in the browser |
Where it can be used
Student engagement monitoring in online classes, mental health and mood tracking tools, and making computers react better to the people using them (human-computer interaction).
Note: emotion recognition is not always correct. Lighting, glasses, head angle and the fact that people show emotions differently all affect the result.