High-level context representation for emotion recognition in images

Willams de Lima Costa, Estefania Talavera Martínez, Lucas Silva Figueiredo, Veronica TeichriebWorkshops @ CVPR 2023 · DOI

Introduction

Traditional emotion recognition systems primarily rely on Facial Expression Recognition (FER). However, real-world images often present challenges such as occlusions, poor lighting, or distant subjects where facial features are indistinguishable. To address these limitations, recent research has pivoted toward contextual emotion recognition—understanding the environment surrounding a person to infer their emotional state. This paper proposes a novel framework that moves beyond raw pixel-based context, instead utilizing high-level semantic descriptions and knowledge graphs to recognize human emotions efficiently.

Methodology

The core innovation lies in a single-stream model that translates visual information into a structured semantic representation. The pipeline consists of four primary stages:

  1. Image Captioning: The model employs ExpansionNet-v2 to generate descriptive raw text for an input image.
  2. NLP Refinement: Using the spaCy library, raw captions are filtered to remove stop words and generic nouns. This process isolates "valid words" that carry significant situational context, such as "beach," "wedding," or "traffic."
  3. Graph Generation: A graph is constructed where nodes represent the extracted valid words, 26 discrete emotion categories, and "mood tags" derived from SenticNet. Edges are weighted based on training data co-occurrence and WordNet semantic similarity, while node features are initialized with GloVe embeddings.
  4. Deep Graph Convolutional Network (GCN): A Graph Isomorphism Network (GIN) processes the graph to predict both categorical labels (e.g., Peace, Affection) and continuous VAD (Valence, Arousal, Dominance) values.
Examples of raw and processed captions used to extract semantic context.

Experimental Results

The framework was evaluated on the EMOTIC (Emotions in Context) dataset, which contains over 23,000 images with 34,420 annotated subjects in diverse, unposed environments.

Performance and Efficiency

The proposed model achieved a mean Average Precision (mAP) of 0.3002, outperforming several complex multi-cue state-of-the-art models like DRM and LEKG. A significant advantage of this approach is its computational efficiency. By relying on a single-stream semantic representation, the model achieves high inference speeds:

  • ~248 FPS on an RTX 2080 Ti workstation.
  • ~96 FPS on a consumer-grade laptop GPU (GTX 1060M).
  • ~56 FPS on a standard laptop CPU (i7-7700HQ).

Discussion and Conclusion

The results demonstrate that high-level semantic descriptions are more robust to environmental variations (like lighting or angle) than low-level pixel features. By mimicking the human psychological process of classifying environmental stimuli based on prior knowledge, the graph-based approach provides a stable and efficient "prior" for emotion inference.

A notable limitation is "contextual mismatch," where a person's internal state contradicts their environment (e.g., sadness at a celebration). Future work aims to integrate this semantic context module into multi-cue architectures that combine facial and bodily expressions with environmental context to resolve such ambiguities.

Summary updated

BibTeX
@inproceedings{costa2023high,
  author = {Willams de Lima Costa and Estefania Talavera Martínez and Lucas Silva Figueiredo and Veronica Teichrieb},
  title = {{High-level context representation for emotion recognition in images}},
  booktitle = {Workshops @ CVPR},
  year = {2023},
  doi = {10.1109/cvprw59228.2023.00038},
}
Figure