Zoom-CAM: Generating Fine-grained Pixel Annotations from Image Labels

Xiangwei Shi, Seyran Khademi, Yunqiang Li, Jan van Gemert

TL;DR

This paper introduces Zoom-CAM, a novel method for generating high-resolution, fine-grained pixel annotations (pseudo-labels) from image-level class labels. By integrating visualization maps from all intermediate convolutional layers, Zoom-CAM overcomes the limitations of existing methods that only use the final layer, leading to improved performance in weakly supervised object localization and semantic segmentation tasks.

What Problem Does This Paper Address?

Weakly supervised learning methods for tasks like object localization and semantic segmentation often rely on "pseudo-labels" – automatically generated annotations derived from image-level class labels. These pseudo-labels are typically created using visualization techniques like Class Activation Mapping (CAM) and Grad-CAM. However, these standard methods primarily utilize the deepest, lowest-resolution convolutional layer of a Convolutional Neural Network (CNN). This approach has a critical drawback: it often misses small objects or fine-grained details because information from earlier, higher-resolution layers is discarded. This results in coarse visualizations and less accurate pseudo-labels, ultimately hindering the performance of downstream weakly supervised models. The paper aims to address this by developing a method that leverages information from all intermediate layers to produce more precise and complete pixel-level annotations.

Methods

Zoom-CAM builds upon the principles of Grad-CAM but extends its reach to intermediate convolutional layers. While Grad-CAM uses the gradients of the class score with respect to the last convolutional layer's feature maps, Zoom-CAM proposes a way to backpropagate these gradients through all intermediate layers.

The core idea is to:

  1. Integrate Intermediate Layer Activations: Instead of solely relying on the final convolutional layer, Zoom-CAM considers feature maps from all intermediate layers.
  2. Weight Mask Generation: The method derives "weight masks" by backpropagating gradients from the final class score to intermediate layers. These masks are not simple scalar weights (as in Grad-CAM) but rather matrices that are point-wise multiplied with the feature maps. This allows for a more nuanced combination of information across layers.
  3. Linear Combination and Aggregation: The visualization maps from intermediate layers are then linearly combined using these weight masks. Finally, these aggregated maps are up-sampled and combined (using a max operation) to form the final, high-resolution pseudo-label.

This approach allows Zoom-CAM to capture fine-grained details and small objects that are often lost in the downsampling process of later layers.

Datasets

  • ImageNet: Used for evaluating weakly supervised object localization.
  • PASCAL VOC 2012: Used for evaluating weakly supervised semantic segmentation.

The paper does not introduce new benchmarks but rather evaluates its method on existing, widely-used datasets.

Key Insights and Ideas

  • Intermediate Layers Hold Crucial Information: The paper's central insight is that intermediate convolutional layers, despite being higher resolution, contain valuable fine-grained spatial information that is essential for accurate object localization and segmentation, and this information is lost when only the final layer is used.
  • Beyond Scalar Weights: Zoom-CAM's use of "weight masks" (matrices) instead of scalar weights for combining feature maps is a key innovation. This allows for a more sophisticated integration of information from different layers and spatial locations.
  • Completeness for Weak Supervision: The authors highlight that while many visualization methods focus on "faithfulness" (explaining why a model made a decision), Zoom-CAM prioritizes "completeness" and "precision" in generating pseudo-labels, which is critical for the success of weakly supervised learning.
  • Aggregation Improves Performance: The study demonstrates that aggregating visualizations from multiple intermediate layers consistently improves localization accuracy, suggesting a synergistic effect.

Key Results

  • ImageNet Localization: Zoom-CAM achieved a 2.8% improvement on top-1 error and a 3.7% improvement on top-5 error for weakly supervised object localization compared to Grad-CAM.
  • PASCAL VOC 2012 Segmentation: When used to train a state-of-the-art weakly supervised semantic segmentation model (IRNet), Zoom-CAM pseudo-labels improved the mean Intersection over Union (mIoU) by 1.1% compared to using CAM pseudo-labels.
  • Qualitative Improvements: Visualizations show that Zoom-CAM generates more detailed and accurate pseudo-labels, capturing multiple instances of objects and smaller objects that are missed by Grad-CAM and other methods.

Limitations and Future Work

  • Faithfulness Evaluation: The authors acknowledge that while they have demonstrated the effectiveness of their generated visual explanations, they would like to further evaluate their faithfulness to the model's predictions.
  • Computational Cost: While the paper states that the computation time is dominated by back-propagation (similar to Grad-CAM), the integration of multiple layers might introduce a slight overhead, though it's presented as manageable.
  • Future Directions: The paper suggests exploring the faithfulness of the generated explanations as a future research direction.

Summary updated

BibTeX
@inproceedings{shi2020zoom,
  author = {Xiangwei Shi and Seyran Khademi and Yunqiang Li and Jan van Gemert},
  title = {{Zoom-CAM: Generating Fine-grained Pixel Annotations from Image Labels}},
  booktitle = {ICPR},
  year = {2020},
  url = {https://openreview.net/forum?id=XhvrTnRJjD},
}
Figure