Facial expression classifier

A ResNet18 that reads seven facial expressions, trained, calibrated, shrunk to 11 MB and running entirely in your browser, live from your camera, with a heatmap of where it looked.

Facial expression classifier

A deep learning model was developed to classify facial expressions into seven categories: happiness, sadness, anger, fear, surprise, disgust, and neutrality. The project uses the FER+ dataset, which provides human-annotated labels for facial images, offering a more representative account of the ambiguity inherent in emotion recognition.

The model achieved 85.88% accuracy and a macro-F1 score of 77.02% on the FER+ test set. While performance was strong overall, less frequent classes, particularly fear and disgust, remained challenging due to class imbalance and limited training examples.

The project also explored model interpretability, probability calibration, and deployment efficiency. Grad-CAM++ was used to visualize image regions relevant to the model's predictions, while temperature scaling improved confidence calibration. Finally, INT8 quantization reduced the ONNX model size from 44.7 MB to 11.3 MB and median inference latency from 15.6 ms to 5.3 ms, with an accuracy decrease of only 0.32 percentage points.

These results demonstrate the potential of combining predictive performance, interpretability, and computational efficiency in facial expression recognition systems. However, further evaluation is needed to assess generalization across populations and real-world conditions.

Technologies and methods: Deep learning, computer vision, FER+, Grad-CAM++, probability calibration, and ONNX quantization.

Projetos similares