Abstract
Transformers trained with self-supervision (DINO) produce attention maps highlighting salient objects. We propose TokenCut, a graph-based method using these features to discover objects without labels. By treating visual tokens as nodes in a weighted graph and applying Normalized Cut (Ncut) via spectral clustering, we segment foreground objects. Our approach significantly outperforms previous state-of-the-art methods like LOST on VOC and COCO datasets.
Introduction
Standard object detection requires extensive manual annotation, creating a bottleneck for scaling models. Unsupervised Object Discovery (UOD) seeks to identify objects automatically. While self-supervised models like DINO provide initial saliency hints, their attention maps are often noisy or incomplete. TokenCut addresses this by leveraging the global graph structure of image tokens to cleanly separate figure from ground, bypassing the need for complex heuristics like seed expansion.
Methodology
TokenCut utilizes a simple yet effective pipeline based on graph theory:
- Feature Extraction: Image patches (tokens) are processed through a pre-trained DINO Vision Transformer (ViT), using "keys" from the final attention layer as features.
- Graph Construction: Each token is a node; edge weights represent cosine similarity between features. High edge weights indicate tokens likely belonging to the same object.
- Normalized Cut (Ncut): Object discovery is framed as a graph partitioning problem. We aim to minimize similarity between foreground and background while maximizing similarity within each set.
- Spectral Solution: The problem is solved using the second smallest eigenvector of the graph Laplacian. The absolute values of this eigenvector provide a high-quality saliency map, indicating the likelihood that a token belongs to a foreground object.
Experimental Results
TokenCut demonstrates superior performance across multiple benchmarks without requiring further training:
- Unsupervised Object Discovery: On VOC12, TokenCut achieved 72.1% CorLoc, an 8.1% improvement over LOST. On VOC07 and COCO20K, it saw similar gains of 6.9% and 8.1% respectively.
- Saliency Detection: Intersection over Union (IoU) improved by 12.9% on the challenging DUT-OMRON dataset compared to previous state-of-the-art.
- Efficiency: Despite the graph-based formulation, the method is efficient, processing images in approximately 0.32 seconds on a single GPU.
Conclusion and Future Work
TokenCut proves that classic graph theory combined with modern self-supervised features can effectively solve unsupervised object discovery. While currently biased toward the single most salient object, future extensions could utilize additional eigenvectors to discover multiple objects simultaneously or handle heavy occlusion more robustly.
Summary updated