Motion-aware Contrastive Video Representation Learning via Foreground-background Merging

Shuangrui Ding, Maomao Li, Tianyu Yang, Rui Qian, Haohang Xu, Qingyi Chen, Jue Wang, Hongkai Xiong

Introduction: The Challenge of Background Bias

Self-supervised learning has revolutionized image representation, but video presents a unique hurdle. Contrastive methods, which learn by comparing different views of the same data, often fall into a "shortcut" trap in video. Because clips from the same video typically share a static background, models often memorize these backgrounds (e.g., a tennis court or a swimming pool) rather than learning the actual motion (the tennis swing or the dive). This background bias prevents models from generalizing to the same actions in new environments.

To address this, the authors propose FAME (Foreground-background Merging), a data augmentation strategy designed to decouple motion from its static context.

Methodology: Foreground-background Merging (FAME)

FAME creates synthetic training samples by transplanting the moving foreground of one video onto the background of another. This forces the contrastive objective to focus on the shared motion patterns rather than the background. The process is designed for high efficiency:

  1. Seed Extraction: Instead of heavy object detection, FAME uses frame differencing. By calculating the pixel-wise difference between adjacent frames, it identifies "seed" regions where motion occurs.
  2. Foreground Discovery: The algorithm uses the color statistics of these seeds to grow a soft segmentation mask, capturing the entire moving object. This step is extremely fast, processing roughly 480 frames per second.
  3. Merging: The extracted foreground from Video A is blended with the background of a different Video B.

In a contrastive learning framework, the model must recognize that the original Video A and its FAME-augmented version represent the same action, effectively teaching it to ignore the background.

Key Insights and Visualizations

The effectiveness of FAME is most apparent when visualizing the model's attention. Using Class-Agnostic Activation Maps (CAAM), the researchers compared vanilla contrastive models with those trained using FAME.

Comparison of Class-Agnostic Activation Maps (CAAM) between vanilla contrastive learning (top) and FAME (bottom).

As shown above, vanilla models often focus on irrelevant background elements like grass or walls. In contrast, FAME-trained models demonstrate a tight, precise focus on the human actors and their movements. Furthermore, analysis of 3D convolutional weights revealed that FAME encourages more diverse temporal kernels, indicating a deeper understanding of the time dimension.

Experimental Results

FAME was evaluated across several major benchmarks, showing consistent state-of-the-art performance:

  • Action Recognition (UCF101 & HMDB51): FAME achieved 88.6% accuracy on UCF101 using an I3D backbone, a significant improvement over previous self-supervised baselines.
  • Motion-Centric Tasks (Diving48): On the Diving48 dataset—where backgrounds are often identical across different classes—FAME improved performance from a 57.4% baseline to 72.9%. This result strongly validates the method's ability to capture fine-grained motion.
  • Video Retrieval: FAME improved Top-1 retrieval accuracy by 6.7%, suggesting a more robust semantic understanding of video content.

Limitations and Future Directions

While highly effective, FAME's reliance on color statistics for foreground extraction can be a limitation. If a moving object's color matches the background, or if significant camera motion creates global frame differences, the mask quality may degrade. Future work could explore adaptive foreground ratios or more robust motion-estimation techniques to handle complex scenes.

Conclusion

FAME offers a computationally efficient solution to the pervasive problem of background bias in video learning. By forcing models to look past the scenery and focus on the action, it sets a new standard for self-supervised video representation.

Summary updated

BibTeX
@inproceedings{ding2022motion,
  author = {Shuangrui Ding and Maomao Li and Tianyu Yang and Rui Qian and Haohang Xu and Qingyi Chen and Jue Wang and Hongkai Xiong},
  title = {{Motion-aware Contrastive Video Representation Learning via Foreground-background Merging}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.00949},
}
Figure