Skip to main content
QUICK REVIEW

[Paper Review] Spatio-Temporal Transformer for Dynamic Facial Expression Recognition in the Wild

Fuyan Ma, Bin Sun|arXiv (Cornell University)|May 10, 2022
Emotion and Mood RecognitionPsychology27 citations
TL;DR

The paper proposes a spatio-temporal Transformer (STT) with joint spatial and temporal attention and a compact softmax cross-entropy loss to improve in-the-wild dynamic facial expression recognition, achieving state-of-the-art results on DFEW and AFEW datasets.

ABSTRACT

Previous methods for dynamic facial expression in the wild are mainly based on Convolutional Neural Networks (CNNs), whose local operations ignore the long-range dependencies in videos. To solve this problem, we propose the spatio-temporal Transformer (STT) to capture discriminative features within each frame and model contextual relationships among frames. Spatio-temporal dependencies are captured and integrated by our unified Transformer. Specifically, given an image sequence consisting of multiple frames as input, we utilize the CNN backbone to translate each frame into a visual feature sequence. Subsequently, the spatial attention and the temporal attention within each block are jointly applied for learning spatio-temporal representations at the sequence level. In addition, we propose the compact softmax cross entropy loss to further encourage the learned features have the minimum intra-class distance and the maximum inter-class distance. Experiments on two in-the-wild dynamic facial expression datasets (i.e., DFEW and AFEW) indicate that our method provides an effective way to make use of the spatial and temporal dependencies for dynamic facial expression recognition. The source code and the training logs will be made publicly available.

Motivation & Objective

  • Motivate dynamic facial expression recognition in the wild and address limitations of CNN-based methods that miss long-range dependencies.
  • Develop a spatio-temporal Transformer to capture discriminative frame-wise features and inter-frame context.
  • Introduce a compact softmax cross-entropy loss to tighten intra-class and widen inter-class distances.
  • Demonstrate effectiveness on large in-the-wild DFER datasets and provide visualizations of learned regions and feature distributions.

Proposed method

  • Use a CNN backbone (ResNet18) to extract frame-level features from a video sequence.
  • Convert frame features into a token sequence and employ a spatio-temporal Transformer with joint multi-head spatial and temporal attention.
  • Incorporate learnable spatial and temporal positional embeddings and a classification token for sequence-level prediction.
  • Apply a compact softmax cross-entropy loss that uses symmetric KL divergences on non-target predictions to tighten intra-class and enlarge inter-class distances.
  • Train and evaluate on DFEW and AFEW with standard data preprocessing and cross-validation protocols.

Experimental results

Research questions

  • RQ1How can spatio-temporal dependencies in facial expression sequences be effectively modeled with a Transformer for in-the-wild DFER?
  • RQ2Does jointly modeling spatial and temporal attention improve recognition over baseline sequence models?
  • RQ3Can a regularized loss function that tightens intra-class similarity and increases inter-class separability further boost performance?
  • RQ4How does the proposed method compare to state-of-the-art approaches on DFEW and AFEW?

Key findings

  • The spatio-temporal Transformer with joint spatial and temporal attention improves recognition performance over baselines.
  • The compact softmax cross-entropy loss further enhances discriminability by reducing intra-class distance and increasing inter-class distance.
  • The method achieves state-of-the-art results on DFEW and AFEW compared to prior spatio-temporal models.
  • Grad-CAM visualizations show discriminative facial regions and temporal correlations captured by STT.
  • t-SNE visualizations indicate more compact intra-class clustering and clearer inter-class separation when using the proposed loss.
  • Ablation studies validate the contributions of spatial attention, temporal attention, and the proposed loss to performance gains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.