GroupFormer: Group Activity Recognition with Clustered Spatial-Temporal Transformer

Shuaicheng Li, Qianggang Cao, Lingbo Liu, Kunlin Yang, Shinan Liu, Jun Hou, Shuai YiICCV 2021 · DOI

Abstract

Group Activity Recognition (GAR) involves understanding collective behaviors in complex scenes, such as sports. Traditional methods often struggle with fragmented spatial-temporal modeling and the "bystander problem," where irrelevant individuals introduce noise into the model's attention. This paper introduces GroupFormer, a novel Transformer-based architecture that jointly models spatial and temporal interactions. By employing a Clustered Attention Mechanism, GroupFormer dynamically groups individuals into relevant sub-groups, effectively filtering noise. Experimental results on the Volleyball and Collective Activity datasets demonstrate state-of-the-art performance, achieving 95.7% and 96.3% accuracy, respectively.

Introduction

Understanding group activities requires capturing the intricate relationships between individual actions and the overall scene context. For instance, in volleyball, a "Left Spike" group activity is composed of individual actions like "spiking," "blocking," and "digging." Existing GAR research faces two primary challenges. First, spatial information (where people are) and temporal information (how they move) are often treated as separate entities, failing to capture the "bridge" between them. Second, standard Transformers use "full attention," meaning every person in a frame attends to every other person. In complex scenes, many individuals are irrelevant bystanders; treating everyone equally introduces noise that makes it harder for the model to focus on core actors.

GroupFormer addresses these gaps by bridging spatial and temporal dimensions through cross-decoding and using selective attention via clustering to focus on key actors.

Methods

The GroupFormer framework operates in three main stages:

  1. Group Representation Generator (GRG): This module initializes a "group token" by merging global scene context with individual features, providing a holistic starting point for the group activity.
  2. Clustered Spatial-Temporal Transformer (CSTT): The core engine uses parallel encoders for spatial and temporal data. It features cross-decoders that allow spatial features to query temporal ones and vice versa, creating a robust spatio-temporal bridge.
  3. Clustered Attention Mechanism: Instead of standard dense attention, a k-means clustering approach groups individuals into $C$ clusters. Intra-group attention refines features within these clusters (e.g., the spiker and the setter), while inter-group attention models relationships between clusters to synthesize a global understanding.
The GroupFormer architecture, highlighting the Clustered Spatial-Temporal Transformer (CSTT) and the overall flow from backbone to classification.

Results and Discussion

GroupFormer was evaluated on two gold-standard benchmarks: the Volleyball Dataset (4,830 frames) and the Collective Activity Dataset (44 video sequences).

  • State-of-the-Art Performance: On the Volleyball dataset, it achieved 95.7% accuracy, surpassing the previous best of 95.0%. On the Collective Activity dataset, it reached 96.3% accuracy, a significant jump over the previous 95.2%.
  • Ablation Studies: Results confirmed that the clustering mechanism alone provided a measurable boost (from 93.4% to 94.1% on Volleyball), proving that grouping individuals is more effective than the standard "attend-to-everyone" approach.
  • Visualization: Using t-SNE visualizations, the authors demonstrated that GroupFormer creates much tighter, more distinct clusters of activity features compared to baseline models.
t-SNE visualizations comparing the base model, ST, STTR, and C-STTR (GroupFormer). GroupFormer produces much tighter and more distinct clusters for different activity categories.

Conclusion

GroupFormer effectively addresses the challenges of spatio-temporal integration and noise from irrelevant actors in group activity recognition. By forcing the model to cluster individuals, it naturally learns to ignore irrelevant people, leading to cleaner semantic representations. While highly accurate, future work could address the computational overhead of internal k-means clustering and the current reliance on a fixed number of clusters. Additionally, moving towards a bounding-box-free approach remains a promising direction for enhancing the model's flexibility in real-world applications.

Summary updated

BibTeX
@inproceedings{li2021groupformer,
  author = {Shuaicheng Li and Qianggang Cao and Lingbo Liu and Kunlin Yang and Shinan Liu and Jun Hou and Shuai Yi},
  title = {{GroupFormer: Group Activity Recognition with Clustered Spatial-Temporal Transformer}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.01341},
}
Figure