[Paper Review] Contrastive learning of Class-agnostic Activation Map for Weakly Supervised Object Localization and Semantic Segmentation
This paper proposes Contrastive learning for Class-agnostic Activation Map (C²AM), a self-supervised method that generates complete, reliable foreground object regions using only unlabeled images. By contrasting cross-image foreground-background features and applying feature similarity-based rank weighting, C²AM produces class-agnostic activation maps that improve both weakly supervised object localization (WSOL) and semantic segmentation (WSSS), achieving up to 17.5% mIoU gain over baseline CAMs.
While class activation map (CAM) generated by image classification network has been widely used for weakly supervised object localization (WSOL) and semantic segmentation (WSSS), such classifiers usually focus on discriminative object regions. In this paper, we propose Contrastive learning for Class-agnostic Activation Map (C$^2$AM) generation only using unlabeled image data, without the involvement of image-level supervision. The core idea comes from the observation that i) semantic information of foreground objects usually differs from their backgrounds; ii) foreground objects with similar appearance or background with similar color/texture have similar representations in the feature space. We form the positive and negative pairs based on the above relations and force the network to disentangle foreground and background with a class-agnostic activation map using a novel contrastive loss. As the network is guided to discriminate cross-image foreground-background, the class-agnostic activation maps learned by our approach generate more complete object regions. We successfully extracted from C$^2$AM class-agnostic object bounding boxes for object localization and background cues to refine CAM generated by classification network for semantic segmentation. Extensive experiments on CUB-200-2011, ImageNet-1K, and PASCAL VOC2012 datasets show that both WSOL and WSSS can benefit from the proposed C$^2$AM.
Motivation & Objective
- To address the limitation of class activation maps (CAMs) in weakly supervised object localization (WSOL) and semantic segmentation (WSSS), which often focus only on sparse, discriminative regions.
- To learn more complete and reliable foreground object regions without requiring image-level annotations.
- To develop a self-supervised method that leverages cross-image foreground-background contrast for disentangling object and background representations.
- To improve WSOL and WSSS performance by using C²AM to either replace or refine CAMs.
Proposed method
- C²AM generates a single class-agnostic activation map per image to distinguish foreground and background regions.
- It uses a contrastive loss that forms positive pairs from foregrounds with similar appearance or backgrounds with similar texture/color, and negative pairs from foreground-background across images.
- A feature similarity-based rank weighting mechanism reduces the influence of dissimilar positive pairs (e.g., different-looking objects) during contrastive learning.
- The activation head is randomly initialized and trained end-to-end using contrastive loss to progressively separate foreground and background features.
- The resulting class-agnostic activation maps are used to extract background cues that refine CAMs for improved semantic segmentation.
- The method is trained solely on unlabeled image data, eliminating the need for image-level supervision.
Experimental results
Research questions
- RQ1Can self-supervised contrastive learning on unlabeled data generate more complete and reliable foreground object regions than class-specific CAMs?
- RQ2How effective is cross-image foreground-background contrast in disentangling object and background representations without image-level supervision?
- RQ3Can the class-agnostic activation maps from C²AM improve both WSOL and WSSS performance when used to refine CAMs?
- RQ4How sensitive is C²AM to hyperparameters such as the rank weighting factor α and initialization of the activation head?
Key findings
- C²AM improved mIoU by 17.5% over the baseline PSA method and 15.1% over SC-CAM in semantic segmentation on ImageNet-1K.
- The background cues extracted from C²AM outperformed those from a fully supervised saliency detector in reducing false background activation.
- The GT-known localization accuracy on ImageNet-1K was stable across different initialization methods for the activation head, indicating low sensitivity to weight initialization.
- The hyperparameter α in the rank weighting mechanism significantly improved performance when set above 0, with stable results across α values from 0.1 to 0.9.
- Visualizations showed that C²AM effectively suppressed false background activation and recovered missing object parts (e.g., cow body, horse legs) in refined CAMs.
- The method achieved state-of-the-art performance in both WSOL and WSSS tasks without using any image-level annotations during training.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.