Moe Chizari

Projects

The write-up

Interactive demo, added

EmotionVision: AI-Driven Emotion Recognition in Facial Images: try it.

A confusion matrix for seven emotions, and how raising the confidence threshold trades coverage for accuracy. Made-up predictions.

Try it

Move the controls; the chart and the sentence under it update.

Predicted emotionTrue emotionAngryDisgustFearHappySadSurpriseNeutralAngryTrue Angry, predicted Angry: 109 faces (70.3% of the Angry faces kept)109True Angry, predicted Disgust: 9 faces (5.8% of the Angry faces kept)9True Angry, predicted Fear: 7 faces (4.5% of the Angry faces kept)7True Angry, predicted Happy: 2 faces (1.3% of the Angry faces kept)2True Angry, predicted Sad: 12 faces (7.7% of the Angry faces kept)12True Angry, predicted Surprise: 2 faces (1.3% of the Angry faces kept)2True Angry, predicted Neutral: 14 faces (9.0% of the Angry faces kept)14DisgustTrue Disgust, predicted Angry: 4 faces (13.3% of the Disgust faces kept)4True Disgust, predicted Disgust: 23 faces (76.7% of the Disgust faces kept)23True Disgust, predicted Fear: 2 faces (6.7% of the Disgust faces kept)2True Disgust, predicted Happy: 1 faces (3.3% of the Disgust faces kept)1True Disgust, predicted Sad: 0 faces (0.0% of the Disgust faces kept)0True Disgust, predicted Surprise: 0 faces (0.0% of the Disgust faces kept)0True Disgust, predicted Neutral: 0 faces (0.0% of the Disgust faces kept)0FearTrue Fear, predicted Angry: 7 faces (4.8% of the Fear faces kept)7True Fear, predicted Disgust: 2 faces (1.4% of the Fear faces kept)2True Fear, predicted Fear: 87 faces (59.6% of the Fear faces kept)87True Fear, predicted Happy: 4 faces (2.7% of the Fear faces kept)4True Fear, predicted Sad: 12 faces (8.2% of the Fear faces kept)12True Fear, predicted Surprise: 28 faces (19.2% of the Fear faces kept)28True Fear, predicted Neutral: 6 faces (4.1% of the Fear faces kept)6HappyTrue Happy, predicted Angry: 2 faces (0.6% of the Happy faces kept)2True Happy, predicted Disgust: 0 faces (0.0% of the Happy faces kept)0True Happy, predicted Fear: 1 faces (0.3% of the Happy faces kept)1True Happy, predicted Happy: 304 faces (94.1% of the Happy faces kept)304True Happy, predicted Sad: 1 faces (0.3% of the Happy faces kept)1True Happy, predicted Surprise: 3 faces (0.9% of the Happy faces kept)3True Happy, predicted Neutral: 12 faces (3.7% of the Happy faces kept)12SadTrue Sad, predicted Angry: 15 faces (7.6% of the Sad faces kept)15True Sad, predicted Disgust: 2 faces (1.0% of the Sad faces kept)2True Sad, predicted Fear: 13 faces (6.6% of the Sad faces kept)13True Sad, predicted Happy: 6 faces (3.0% of the Sad faces kept)6True Sad, predicted Sad: 131 faces (66.5% of the Sad faces kept)131True Sad, predicted Surprise: 2 faces (1.0% of the Sad faces kept)2True Sad, predicted Neutral: 28 faces (14.2% of the Sad faces kept)28SurpriseTrue Surprise, predicted Angry: 1 faces (0.7% of the Surprise faces kept)1True Surprise, predicted Disgust: 0 faces (0.0% of the Surprise faces kept)0True Surprise, predicted Fear: 10 faces (6.7% of the Surprise faces kept)10True Surprise, predicted Happy: 3 faces (2.0% of the Surprise faces kept)3True Surprise, predicted Sad: 2 faces (1.3% of the Surprise faces kept)2True Surprise, predicted Surprise: 132 faces (88.6% of the Surprise faces kept)132True Surprise, predicted Neutral: 1 faces (0.7% of the Surprise faces kept)1NeutralTrue Neutral, predicted Angry: 13 faces (5.9% of the Neutral faces kept)13True Neutral, predicted Disgust: 0 faces (0.0% of the Neutral faces kept)0True Neutral, predicted Fear: 9 faces (4.1% of the Neutral faces kept)9True Neutral, predicted Happy: 9 faces (4.1% of the Neutral faces kept)9True Neutral, predicted Sad: 14 faces (6.3% of the Neutral faces kept)14True Neutral, predicted Surprise: 7 faces (3.2% of the Neutral faces kept)7True Neutral, predicted Neutral: 170 faces (76.6% of the Neutral faces kept)170
0%20%40%60%80%100%0.00.10.20.30.40.50.60.70.80.9Confidence threshold
Accuracy of the answers keptCoverage (share of faces answered)

Threshold 0.40: the model answers 1,222 of 1,430 test faces (85.5% coverage) and 78.2% of those answers are right, against 67.3% when every face is answered. Most confused class: Fear, recall 59.6%, most often mistaken for Surprise (28 faces).

Made-up predictions for 1,430 imaginary test faces, generated in your browser with a fixed seed; the seven classes are the ones the write-up names. Recall here is the share of a class's kept faces that were labelled correctly. No images and no model run on this page, and these are not the project's results.

Predicted emotionTrue emotionAngDisFearHapSadSurNeuAngryTrue Angry, predicted Angry: 109 faces (70.3% of the Angry faces kept)109True Angry, predicted Disgust: 9 faces (5.8% of the Angry faces kept)9True Angry, predicted Fear: 7 faces (4.5% of the Angry faces kept)7True Angry, predicted Happy: 2 faces (1.3% of the Angry faces kept)2True Angry, predicted Sad: 12 faces (7.7% of the Angry faces kept)12True Angry, predicted Surprise: 2 faces (1.3% of the Angry faces kept)2True Angry, predicted Neutral: 14 faces (9.0% of the Angry faces kept)14DisgustTrue Disgust, predicted Angry: 4 faces (13.3% of the Disgust faces kept)4True Disgust, predicted Disgust: 23 faces (76.7% of the Disgust faces kept)23True Disgust, predicted Fear: 2 faces (6.7% of the Disgust faces kept)2True Disgust, predicted Happy: 1 faces (3.3% of the Disgust faces kept)1True Disgust, predicted Sad: 0 faces (0.0% of the Disgust faces kept)0True Disgust, predicted Surprise: 0 faces (0.0% of the Disgust faces kept)0True Disgust, predicted Neutral: 0 faces (0.0% of the Disgust faces kept)0FearTrue Fear, predicted Angry: 7 faces (4.8% of the Fear faces kept)7True Fear, predicted Disgust: 2 faces (1.4% of the Fear faces kept)2True Fear, predicted Fear: 87 faces (59.6% of the Fear faces kept)87True Fear, predicted Happy: 4 faces (2.7% of the Fear faces kept)4True Fear, predicted Sad: 12 faces (8.2% of the Fear faces kept)12True Fear, predicted Surprise: 28 faces (19.2% of the Fear faces kept)28True Fear, predicted Neutral: 6 faces (4.1% of the Fear faces kept)6HappyTrue Happy, predicted Angry: 2 faces (0.6% of the Happy faces kept)2True Happy, predicted Disgust: 0 faces (0.0% of the Happy faces kept)0True Happy, predicted Fear: 1 faces (0.3% of the Happy faces kept)1True Happy, predicted Happy: 304 faces (94.1% of the Happy faces kept)304True Happy, predicted Sad: 1 faces (0.3% of the Happy faces kept)1True Happy, predicted Surprise: 3 faces (0.9% of the Happy faces kept)3True Happy, predicted Neutral: 12 faces (3.7% of the Happy faces kept)12SadTrue Sad, predicted Angry: 15 faces (7.6% of the Sad faces kept)15True Sad, predicted Disgust: 2 faces (1.0% of the Sad faces kept)2True Sad, predicted Fear: 13 faces (6.6% of the Sad faces kept)13True Sad, predicted Happy: 6 faces (3.0% of the Sad faces kept)6True Sad, predicted Sad: 131 faces (66.5% of the Sad faces kept)131True Sad, predicted Surprise: 2 faces (1.0% of the Sad faces kept)2True Sad, predicted Neutral: 28 faces (14.2% of the Sad faces kept)28SurpriseTrue Surprise, predicted Angry: 1 faces (0.7% of the Surprise faces kept)1True Surprise, predicted Disgust: 0 faces (0.0% of the Surprise faces kept)0True Surprise, predicted Fear: 10 faces (6.7% of the Surprise faces kept)10True Surprise, predicted Happy: 3 faces (2.0% of the Surprise faces kept)3True Surprise, predicted Sad: 2 faces (1.3% of the Surprise faces kept)2True Surprise, predicted Surprise: 132 faces (88.6% of the Surprise faces kept)132True Surprise, predicted Neutral: 1 faces (0.7% of the Surprise faces kept)1NeutralTrue Neutral, predicted Angry: 13 faces (5.9% of the Neutral faces kept)13True Neutral, predicted Disgust: 0 faces (0.0% of the Neutral faces kept)0True Neutral, predicted Fear: 9 faces (4.1% of the Neutral faces kept)9True Neutral, predicted Happy: 9 faces (4.1% of the Neutral faces kept)9True Neutral, predicted Sad: 14 faces (6.3% of the Neutral faces kept)14True Neutral, predicted Surprise: 7 faces (3.2% of the Neutral faces kept)7True Neutral, predicted Neutral: 170 faces (76.6% of the Neutral faces kept)170
0%20%40%60%80%100%0.00.5Confidence threshold
Accuracy of the answers keptCoverage (share of faces answered)

Threshold 0.40: the model answers 1,222 of 1,430 test faces (85.5% coverage) and 78.2% of those answers are right, against 67.3% when every face is answered. Most confused class: Fear, recall 59.6%, most often mistaken for Surprise (28 faces).

Made-up predictions for 1,430 imaginary test faces, generated in your browser with a fixed seed; the seven classes are the ones the write-up names. Recall here is the share of a class's kept faces that were labelled correctly. No images and no model run on this page, and these are not the project's results.

The write-up this goes with: EmotionVision: AI-Driven Emotion Recognition in Facial Images.

All demos