← Projects

Facial Emotion Recognition with YOLOv11 Classification

2025 · YOLOv11, ResNet50 · Course project

Facial expressions carry a lot of what people say without words, which is why emotion recognition keeps turning up in discussions of driver monitoring and interactive systems. For CSE445 Machine Learning in Fall 2025, our group of four took on a plain version of the task: given a face image, say which of seven emotions it shows (angry, disgust, fear, happy, neutral, sad or surprise).

We used the YOLOv11m classification model, not the detection one. It takes a face image and outputs a probability for each emotion, and we trained it on a labelled dataset of several thousand images split into training, validation and test sets.

Bar list of training images per class: angry, disgust, fear, happy, neutral, sad and surprise, each with between about 680 and 930 images
Training images per emotion. The classes are close to balanced.

The first model did badly. Top-1 accuracy stalled at about 50 percent, and the loss curves showed why: training loss kept falling while validation loss climbed. That gap is the classic sign of overfitting. The model was memorising the training images instead of learning what an expression looks like. The course material on bias and variance made the diagnosis easy, and it also told us what to try, which was to make the model simpler to fit or the data harder to memorise.

We increased weight decay, tuned hyperparameters and added random affine transformations such as rotation and scaling to the augmentation pipeline. Training and validation loss then converged, and top-1 accuracy rose to 92 percent. The model also stopped confusing sad with neutral so often, which had been one of its worst habits.

As a baseline we also built a ResNet50 with frozen ImageNet weights and a small classification head on top. It trained steadily from the start and ended slightly ahead of YOLOv11. I would not read too much into that gap, because our report gives the ResNet figure as validation accuracy and the YOLO figure as top-1, and I would want both on the same held-out set before ranking them. The report also credits YOLOv11 with faster inference, but we did not measure it, so I make no real-time claim.

Training and validation accuracy curves over 25 epochs, rising quickly and levelling off
The ResNet50 baseline’s training and validation accuracy.

The lesson I took away is that the jump from 50 to 92 percent came from reading the curves and fixing the variance problem, not from changing the architecture.

Status: CSE445 course project, Fall 2025, North South University.