HEAP: Unsupervised Object Discovery and Localization with Contrastive Grouping
Xin Zhang, Jinheng Xie, Yuan Yuan, Michael Bi Mi, Robby T. Tan
TL;DR
HEAPAddress unsupervised object discovery and localization by building hierarchical relationships from patch to region to image level using a lightweight cross-attention head with learnable group tokens. It introduces three unsupervised losses—$L_{ ext{intra}}$ for intra-image grouping, $L_{ ext{neg}}$ for foreground-background disentanglement, and $L_{ ext{inter}}$ for inter-image clustering—to produce semantically coherent regions and discriminative foregrounds across images. The approach achieves state-of-the-art results on semantic segmentation retrieval, unsupervised object discovery, and saliency detection while remaining efficient, thanks to its encoder-free head and avoidance of extensive extra supervision. Overall, HEAP demonstrates that hierarchical contrastive grouping with cross-image context significantly improves object discovery across diverse datasets and tasks, with strong practical implications for weakly supervised learning and retrieval pipelines.
Abstract
Unsupervised object discovery and localization aims to detect or segment objects in an image without any supervision. Recent efforts have demonstrated a notable potential to identify salient foreground objects by utilizing self-supervised transformer features. However, their scopes only build upon patch-level features within an image, neglecting region/image-level and cross-image relationships at a broader scale. Moreover, these methods cannot differentiate various semantics from multiple instances. To address these problems, we introduce Hierarchical mErging framework via contrAstive grouPing (HEAP). Specifically, a novel lightweight head with cross-attention mechanism is designed to adaptively group intra-image patches into semantically coherent regions based on correlation among self-supervised features. Further, to ensure the distinguishability among various regions, we introduce a region-level contrastive clustering loss to pull closer similar regions across images. Also, an image-level contrastive loss is present to push foreground and background representations apart, with which foreground objects and background are accordingly discovered. HEAP facilitates efficient hierarchical image decomposition, which contributes to more accurate object discovery while also enabling differentiation among objects of various classes. Extensive experimental results on semantic segmentation retrieval, unsupervised object discovery, and saliency detection tasks demonstrate that HEAP achieves state-of-the-art performance.
