CoLo-CAM: Class activation mapping for object co-localization in weakly-labeled unconstrained videos

Soufiane Belharbi, Shakeeb Murtaza, Marco Pedersoli, Ismail Ben Ayed, Luke McCaffrey, Eric Granger

Abstract

Weakly Supervised Video Object Localization (WSVOL) aims to identify and localize objects in video sequences using only video-level category labels. Traditional methods often struggle with unconstrained videos characterized by rapid motion, lighting changes, and moving cameras. We present CoLo-CAM, a novel framework that enforces color consistency across multiple frames through a multi-frame Conditional Random Field (CRF) loss. By "co-localizing" objects based on temporal color anchors rather than spatial proximity, CoLo-CAM overcomes the limitations of small-motion assumptions. Our approach achieves state-of-the-art performance on the YouTube-Objects benchmarks, reaching 82.1% CorLoc on YTOv1 while maintaining a high inference speed of 464 FPS.

Introduction

Localizing objects in video is a fundamental task in computer vision, yet obtaining frame-by-frame bounding box annotations is prohibitively expensive. WSVOL offers a scalable alternative by training models on video-level tags (e.g., "horse"). However, unconstrained web videos present significant challenges. Existing methods typically rely on motion cues (optical flow), which can be noisy, or discriminative methods that assume objects move minimally between adjacent frames—the "Small Motion Trap."

CoLo-CAM addresses these issues by leveraging the observation that while an object's spatial position may change rapidly, its color profile remains relatively consistent across short sequences. By linking pixels with similar colors across multiple frames, the model can effectively propagate localization information even during fast motion.

Methodology

Architecture

CoLo-CAM utilizes a U-Net-style encoder-decoder architecture. The Encoder is a pre-trained CNN (e.g., ResNet50) that remains frozen during training. It generates low-resolution Class Activation Maps (CAMs) that serve as initial spatial priors. The Trainable Decoder learns to refine these coarse maps into high-resolution, precise localization masks ($S_t$).

The CoLo-CAM framework: Multi-frame loss enforces consistency across a sequence of frames, while per-frame losses refine individual masks.

Loss Functions and Co-Localization

The training process is guided by a combination of per-frame and multi-frame losses:

  1. Per-Frame Losses: These include a pseudo-label loss derived from the encoder's CAMs, a local CRF loss for boundary alignment, and an Absolute Size Constraint (ASC). The ASC prevents the model from collapsing into trivial solutions, such as predicting the entire frame or nothing at all as the object.
  2. Multi-Frame Co-Localization (CoLoc) Term: This is the core innovation. The model constructs a fully connected graph between all pixels across a sequence of $n$ frames. If two pixels across different frames share similar color characteristics, the CoLoc loss encourages them to have similar foreground probabilities.
  3. Adaptive Weighting: To handle the exponential growth of the multi-frame loss as the window size $n$ increases, an adaptive weighting scheme is employed to stabilize training and simplify hyper-parameter tuning.

Experimental Results

Quantitative Performance

CoLo-CAM was evaluated on the YouTube-Objects (YTO) datasets using the CorLoc metric (percentage of frames where the predicted box has an IoU > 0.5 with the ground truth).

  • YTOv1: CoLo-CAM achieved 82.1%, a significant improvement over the previous state-of-the-art (TCAM at 73.0%) and the Layer-CAM baseline (65.6%).
  • YTOv2.2: On this larger, more challenging dataset, the model reached 77.1%, outperforming TCAM's 72.2%.

Qualitative and Efficiency Gains

Visual analysis confirms that CoLo-CAM produces sharper, more complete activation maps compared to standard CAM methods. It successfully captures objects of varying scales, from small bicycles to large trains. Notably, while training involves complex multi-frame relationships, inference is performed frame-by-frame. This allows the model to run at 464 FPS on modern hardware, making it suitable for real-time processing.

Discussion and Conclusion

CoLo-CAM demonstrates that color consistency is a powerful anchor for temporal localization in unconstrained videos. Unlike previous methods that degrade when looking beyond a 2-frame window, CoLo-CAM's performance remains stable or improves with larger temporal windows (up to 18 frames).

Future work may address current limitations, such as handling "empty" frames where the target object is absent or improving localization in scenes with multiple instances of the same class. By integrating classifier confidence or motion vectors, the framework could further enhance its robustness to occlusions and abrupt scene changes. Overall, CoLo-CAM sets a new benchmark for efficient and accurate weakly supervised video object localization.

Summary updated

BibTeX
@article{belharbi2023colo,
  author = {Soufiane Belharbi and Shakeeb Murtaza and Marco Pedersoli and Ismail Ben Ayed and Luke McCaffrey and Eric Granger},
  title = {{CoLo-CAM: Class activation mapping for object co-localization in weakly-labeled unconstrained videos}},
  journal = {Pattern Recognition},
  year = {2023},
}
Figure