Abstract
Weakly Supervised Object Localization (WSOL) is the task of identifying object bounding boxes using only image-level category labels during training. Existing CNN-based approaches often fail to capture the full extent of objects, focusing instead on small, highly discriminative regions. We introduce ViTOL (Vision Transformer for Object Localization), a framework that leverages the global receptive fields of Vision Transformers. ViTOL incorporates a patch-based attention dropout layer (p-ADL) to encourage exploration of non-discriminative regions and a gradient-weighted attention rollout (GAR) for class-specific localization. Our method achieves state-of-the-art performance on ImageNet and CUB-200-2011 benchmarks, significantly improving localization accuracy.
Introduction
The primary goal of WSOL is to bridge the gap between inexpensive image-level annotations and expensive bounding box labels. However, standard models face three significant hurdles:
- Discriminative Bias: Models often focus on the most salient features (e.g., a bird's beak) rather than the entire object.
- Class Agnosticism: Localization maps may highlight all objects in a scene, failing to distinguish the target class.
- Background Noise: Cluttered backgrounds can distract the model, leading to false positives.
While Convolutional Neural Networks (CNNs) are limited by local receptive fields, Vision Transformers (ViTs) offer a global perspective through self-attention, making them naturally suited for capturing entire object structures.
Methodology
ViTOL builds upon the Vision Transformer architecture, introducing two novel components to enhance localization:
Patch-based Attention Dropout Layer (p-ADL)
To combat discriminative bias, p-ADL computes a "patch importance map" during training. It randomly chooses between highlighting informative patches or dropping the most discriminative ones. By masking the most "telling" parts of an object, the model is forced to identify secondary features to maintain classification performance, leading to more comprehensive localization maps.
Gradient-weighted Attention Rollout (GAR)
While standard attention rollout aggregates attention across layers, it lacks class specificity. GAR weights these attention matrices with gradients relative to the target class. This ensures the final localization map is specific to the category of interest and uses negative clamping to effectively suppress background noise.
Experimental Results
ViTOL was evaluated on the ImageNet-1K and CUB-200-2011 datasets using the MaxBoxAcc-V2 metric.
- ImageNet: ViTOL achieved 70.47%, a substantial improvement over the previous state-of-the-art (63.9%).
- CUB: ViTOL reached 73.17%, outperforming previous methods like ACoL (66.5%).
Qualitative analysis demonstrates that ViTOL produces heatmaps that cover the entire object body rather than just isolated parts. It also shows superior performance in multi-object scenes and cluttered backgrounds compared to baseline methods.
Conclusion and Future Work
ViTOL demonstrates that the global attention mechanism of Transformers, combined with adversarial patch dropping and gradient-weighted rollout, provides a powerful solution for WSOL. While the current patch-based approach (16x16) limits fine-grained resolution, future iterations could utilize higher-resolution attention maps. The framework also holds promise for extension into weakly supervised semantic segmentation and video action localization.
Summary updated