TCAM: Temporal Class Activation Maps for Object Localization in Weakly-Labeled Unconstrained Videos

Soufiane Belharbi, Ismail Ben Ayed, Luke McCaffrey, Eric Granger

TL;DR

This paper introduces TCAM, a novel method for weakly supervised video object localization (WSVOL) that leverages temporal information from consecutive frames to improve localization accuracy. By aggregating Class Activation Maps (CAMs) across time, TCAM generates more robust object proposals, achieving state-of-the-art results on challenging video datasets without requiring frame-level annotations.

What Problem Does This Paper Address?

Locating objects in videos is crucial for various downstream tasks like video summarization, object detection, and tracking. However, obtaining precise bounding box annotations for every frame in a video is extremely time-consuming and expensive. Weakly supervised video object localization (WSVOL) aims to overcome this by using only global video-level tags (e.g., "this video contains a dog") to infer object locations. Existing WSVOL methods often rely on multi-stage pipelines that generate initial proposals using visual and motion cues, followed by refinement. These methods can be computationally expensive, require per-video or per-class models, and often produce localized regions that aren't semantically aligned with the video tag due to reliance on motion cues or discarded optimization information. This paper addresses the need for a more efficient, end-to-end trainable, and semantically aligned WSVOL method that can effectively utilize the temporal nature of videos.

Methods

The core innovation of TCAM lies in its adaptation of Class Activation Maps (CAMs), a technique successful for weakly supervised object localization in still images, to the video domain.

  • Temporal CAM (TCAM): TCAM extends the CAM concept by introducing a CAM Temporal Max-Pooling (CAM-TMP) module. This module aggregates CAMs generated from a sequence of consecutive frames. Specifically, for each pixel location, it takes the maximum activation across the CAMs of the current and preceding frames. This temporal aggregation helps to create a more comprehensive and robust activation map that covers more parts of the object, even if individual frame CAMs highlight only specific regions.
  • Pseudo-Label Generation: The aggregated CAMs (Ċt) are then used to generate pixel-wise pseudo-labels for training a decoder. The method assumes that high activations in the CAM correspond to foreground objects, and low activations to background. A stochastic sampling approach is used to select foreground and background pixels from these regions to train the decoder, preventing overfitting to noisy pseudo-labels.
  • Loss Function: The overall training loss for TCAM is composed of three parts:
  • Partial Cross-Entropy: Aligns the decoder's output with the sampled pseudo-labels.
  • Absolute Size Constraint (ASC): A global constraint that encourages both foreground and background regions to be sufficiently large, preventing unbalanced CAMs.
  • CRF Loss: A local term that leverages pixel color and proximity to ensure CAM activations are consistent with object boundaries.
  • Training and Inference: TCAM trains a single discriminative deep learning model (U-Net style architecture) end-to-end. Crucially, during inference, frames are processed independently, allowing for parallel processing and real-time localization, unlike many prior methods that require processing entire video clips.

Datasets

The authors evaluated TCAM on two challenging, unconstrained video datasets:

  • YouTube-Objects v1.0 (YTOv1): Contains 155 videos across 10 object classes, with limited frame-level bounding box annotations.
  • YouTube-Objects v2.2 (YTOv2.2): An extension of YTOv1 with more frames and more bounding box annotations, making it a more challenging benchmark.

Key Insights and Ideas

  • Temporal Aggregation is Key: The paper demonstrates that simply applying image-based CAM methods to individual video frames is insufficient. Leveraging the temporal continuity of objects across frames through CAM-TMP significantly boosts localization performance.
  • CAMs as a Foundation for Pseudo-Labels: TCAM effectively uses CAMs not just for visualization but as a powerful mechanism to generate noisy but useful pseudo-labels for training a more sophisticated decoder.
  • Short-Range Temporal Dependency is Optimal: While temporal information is beneficial, the study found that long-range temporal dependencies can actually hurt performance, likely due to object displacement and changes in scene context. This suggests that the optimal temporal window is relatively short.
  • End-to-End Training with Weak Labels: TCAM achieves end-to-end training using only global video tags, simplifying the pipeline and making it more scalable than multi-stage methods.
  • Inference Efficiency: The ability to perform inference on individual frames without temporal context is a significant advantage for real-time applications.

Key Results

  • State-of-the-Art Performance: TCAM achieved a new state-of-the-art in WSVOL accuracy, reaching 73.0% CorLoc on the YTOv1 dataset and 72.1% on YTOv2.2.
  • Significant Improvement over Baselines: Compared to the baseline LayerCAM (a strong CAM-based method for still images), TCAM achieved a substantial improvement of +7.4% CorLoc on YTOv1.
  • Ablation Study Highlights Contributions: An ablation study showed that combining pseudo-labels, CRF, and ASC yielded strong results (70.5% CorLoc), but adding the CAM-TMP module further improved performance to 73.0%.
  • Qualitative Results: Visualizations show that TCAM's predicted CAMs tend to cover the entire object with clear distinctions between foreground and background, handling multi-instance and partially visible objects effectively.

Limitations and Future Work

  • Dependency on Backbone CNN: The performance of TCAM is inherently tied to the quality of the CAMs generated by the backbone CNN classifier. If the backbone produces erroneous or incomplete CAMs, it can lead to incorrect pseudo-labels and thus affect TCAM's localization.
  • Handling Noisy Pseudo-Labels: While TCAM uses stochastic sampling to mitigate noise, dominant erroneous pseudo-labels can still lead to localization errors. Future work could focus on more robust methods for dealing with noisy labels.
  • Optimal Temporal Window: The paper notes that the optimal temporal dependency range is short and can be influenced by video frame rates. Further investigation into adaptive temporal window selection could be beneficial.
  • Adaptability to Downstream Tasks: The authors suggest that TCAM's ability to generate accurate localization maps makes it adaptable for subsequent tasks like object detection and tracking, which could be explored in future research.

Summary updated

BibTeX
@inproceedings{belharbi2023tcam,
  author = {Soufiane Belharbi and Ismail Ben Ayed and Luke McCaffrey and Eric Granger},
  title = {{TCAM: Temporal Class Activation Maps for Object Localization in Weakly-Labeled Unconstrained Videos}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  doi = {10.1109/wacv56688.2023.00022},
}
Figure