Expression Recognition Analysis in the Wild

Donato Cafarelli, Fabio Valerio Massoli, Fabrizio Falchi, Claudio Gennaro, Giuseppe AmatoarXiv 2021

Abstract

Facial Expression Recognition (FER) is one of the most important topics in Human-Computer Interaction (HCI). In this work, we report details and experimental results about a facial expression recognition method based on state-of-the-art methods. We fine-tuned a SE-Net deep learning architecture pre-trained on the well-known VGGFace2 dataset, on the Aff-Wild2 facial expression recognition dataset. The main goal of this work is to define a baseline for a novel method we are going to propose in the near future. This paper is also required by the Affective Behavior Analysis in-the-wild (ABAW) competition in order to evaluate this approach on the test set. The results reported here are on the validation set and are related to the Expression Challenge part (seven basic emotion recognition) of the competition.

Introduction

Facial Expression Recognition (FER) is a cornerstone of Human-Computer Interaction, but transitioning from laboratory settings to "in-the-wild" environments presents significant challenges. Real-world conditions involve occlusions, varying head poses, poor lighting, and low-resolution video. This study addresses the Expression Challenge of the ABAW competition, which requires classifying video frames into seven basic emotion categories: Neutral, Anger, Disgust, Fear, Happiness, Sadness, and Surprise.

Methodology

We employed a transfer learning strategy using a SE-Net50 architecture. The Squeeze-and-Excitation (SE) block enables the network to perform dynamic channel-wise feature re-calibration, boosting relevant features while suppressing less informative ones.

The model was initially pre-trained on VGGFace2, a massive dataset focused on facial identity. This ensures the model captures fundamental facial geometry before fine-tuning for emotion recognition. We replaced the final fully-connected layer to output seven classes and fine-tuned the network using Stochastic Gradient Descent (SGD). To handle large mini-batches (256 samples) on a single GPU, we utilized gradient accumulation.

Dataset and Class Imbalance

The study utilized a combined training set of 1,004,523 faces, merging Aff-Wild2 (539 videos, >2.5M frames) and ExpW (91,793 annotated faces). A major hurdle in "in-the-wild" data is extreme class imbalance. As shown in the training distribution, the "Neutral" class dominates the dataset, reflecting the sparsity of intense emotional displays in daily life.

Distribution of emotion classes in the training set, illustrating the "Neutral" gravity well.

To address this, we implemented a weighted Cross-Entropy Loss. Weights were calculated based on the inverse frequency of each class; for instance, the rare "Fear" class received a weight of 50.66, while "Neutral" was weighted at 1.0.

Results

Performance was measured using a weighted criterion: $0.67 \times F_1 \text{ Score} + 0.33 \times \text{Total Accuracy}$. The SE-Net50 achieved an overall score of 0.43, significantly outperforming the competition baseline of 0.36.

While the model is reliable at identifying "Neutral" and "Happiness," it struggles with "Disgust" and "Anger," likely due to their scarcity in the training data. The detailed F1 scores per class are presented below.

F1 scores for each emotion class on the validation set.

Conclusion

The success of the VGGFace2 pre-training suggests that identity-related features are highly complementary to emotion recognition. However, the model's performance on rare classes remains a limitation. Future work will explore multi-resolution approaches to capture both global and fine-grained facial movements, as well as temporal models (RNNs or Transformers) to analyze expression dynamics over time.

Summary updated

BibTeX
@misc{cafarelli2021expression,
  author = {Donato Cafarelli and Fabio Valerio Massoli and Fabrizio Falchi and Claudio Gennaro and Giuseppe Amato},
  title = {{Expression Recognition Analysis in the Wild}},
  year = {2021},
  eprint = {2101.09231},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.09231},
}
Figure