# In-sample Contrastive Learning and Consistent Attention for Weakly Supervised Object Localization

arXiv: https://arxiv.org/abs/2009.12063 · HTML: https://mlsanity.com/paper/2009.12063/

## Key facts

- Cited by 16 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 25 Sep 2020.

## Built on by (most cited first, 16 of 16)

- [Contrastive Positive Sample Propagation along the Audio-Visual Event Line](https://mlsanity.com/paper/2211.09980/) (2022)
- [F-CAM: Full Resolution Class Activation Maps via Guided Parametric Upscaling](https://mlsanity.com/paper/2109.07069/) (2021)
- [Bridging the Gap between Classification and Localization for Weakly Supervised Object Localization](https://mlsanity.com/paper/2204.00220/) (2022)
- [Efficient Classification of Very Large Images with Tiny Objects](https://mlsanity.com/paper/2106.02694/) (2021)
- [Weakly Supervised Object Localization as Domain Adaption](https://mlsanity.com/paper/2203.01714/) (2022)
- [Keep CALM and Improve Visual Feature Attribution](https://mlsanity.com/paper/2106.07861/) (2021)
- [Discriminative Sampling of Proposals in Self-Supervised Transformers for Weakly Supervised Object Localization](https://mlsanity.com/paper/2209.09209/) (2022)
- [Anti-Adversarially Manipulated Attributions for Weakly Supervised Semantic Segmentation and Object Localization](https://mlsanity.com/paper/2204.04890/) (2022)
- [On Label Granularity and Object Localization](https://mlsanity.com/paper/2207.10225/) (2022)
- [TCAM: Temporal Class Activation Maps for Object Localization in Weakly-Labeled Unconstrained Videos](https://mlsanity.com/paper/2208.14542/) (2022)
- [Bagging Regional Classification Activation Maps for Weakly Supervised Object Localization](https://mlsanity.com/paper/2207.07818/) (2022)
- [DiPS: Discriminative Pseudo-Label Sampling with Self-Supervised Transformers for Weakly Supervised Object Localization](https://mlsanity.com/paper/2310.06196/) (2023)
- [CoLo-CAM: Class Activation Mapping for Object Co-Localization in Weakly-Labeled Unconstrained Videos](https://mlsanity.com/paper/2303.09044/) (2023)
- [Background-aware Classification Activation Map for Weakly Supervised Object Localization](https://mlsanity.com/paper/2112.14379/) (2021)
- [Boosting Weakly-Supervised Image Segmentation via Representation, Transform, and Compensator](https://mlsanity.com/paper/2309.00871/) (2023)
- [Model-Assisted Labeling via Explainability for Visual Inspection of Civil Infrastructures](https://mlsanity.com/paper/2209.11159/) (2022)

## Abstract (arXiv)

Weakly supervised object localization (WSOL) aims to localize the target object using only the image-level supervision. Recent methods encourage the model to activate feature maps over the entire object by dropping the most discriminative parts. However, they are likely to induce excessive extension to the backgrounds which leads to over-estimated localization. In this paper, we consider the background as an important cue that guides the feature activation to cover the sophisticated object region and propose contrastive attention loss. The loss promotes similarity between foreground and its dropped version, and, dissimilarity between the dropped version and background. Furthermore, we propose foreground consistency loss that penalizes earlier layers producing noisy attention regarding the later layer as a reference to provide them with a sense of backgroundness. It guides the early layers to activate on objects rather than locally distinctive backgrounds so that their attentions to be similar to the later layer. For better optimizing the above losses, we use the non-local attention blocks to replace channel-pooled attention leading to enhanced attention maps considering the spatial similarity. Last but not least, we propose to drop background regions in addition to the most discriminative region. Our method achieves state-of-theart performance on CUB-200-2011 and ImageNet benchmark datasets regarding top-1 localization accuracy and MaxBoxAccV2, and we provide detailed analysis on our individual components. The code will be publicly available online for reproducibility.
