Comparative Analysis of a YOLO-Based Model, Custom CNN, and ResNet18 for Facial Emotion Recognition

Facial emotion recognition remains challenging under unconstrained conditions because of variations in pose,
illumination, occlusion, image quality, and class distribution. This
paper compares three deep learning architectures for eight-class
facial emotion recognition: YOLOv8m, a custom convolutional
neural network, and ImageNet-pretrained ResNet18. All models
were trained and evaluated using the same prepared AffectNet
partitions containing 25,262 images. Model-specific preprocessing
and augmentation were applied while preserving a common
training, validation, and test split. YOLOv8m achieved a mean
average precision of 0.8328, while the custom CNN and ResNet18
obtained test accuracies of 56.32% and 71.32%, respectively.
Class-level analysis showed that Fear produced the strongest
YOLOv8m performance, whereas Disgust remained the most
difficult emotion, partly because of its lower sample count
and visual similarity to other negative expressions. The best
YOLOv8m checkpoint was integrated into a Flask-based backend
and deployed through a web application built with HTML, CSS,
and JavaScript, and an Android application developed using Java
in Android Studio. Direct numerical comparison between mAP
and classification accuracy remains limited because the evaluated
models use different output formulations.