Abstract
UnSAMv2 introduces a self-supervised framework that provides a continuous "granularity slider" for image and video segmentation. By training on only 6,000 unlabeled images, the model enables precise control over the scale of segmentation—from fine-grained parts to whole entities—using a single point prompt. UnSAMv2 significantly outperforms SAM-2 across 11 benchmarks, transforming discrete mask generation into a controllable, hierarchical reasoning process.
Introduction
Defining what constitutes an "object" is a fundamental challenge in computer vision. Is a car a single entity, or is it a collection of wheels, doors, and handles? Current foundation models like the Segment Anything Model (SAM) typically address this ambiguity by providing a few discrete mask hypotheses (e.g., small, medium, large). However, this approach is limited by the fixed number of hypotheses and the inherent bias of human annotators who provide the training labels.
UnSAMv2 addresses these limitations by learning structural hierarchies through self-supervision. It introduces a continuous granularity score ($g \in [0.1, 1.0]$) that acts as a prompt, allowing users to navigate the part-to-whole relationship of any scene with a simple slider interface.
Methods
The core of UnSAMv2 is a granularity-aware divide-and-conquer pipeline built upon the SAM-2 architecture. This pipeline operates through several key stages:
- Unsupervised Hierarchy Discovery: The system first identifies instances using "MaskCut" (normalized cuts). It then recursively merges similar pixels within these instances based on DINOv3 features to discover finer sub-parts.
- Relative Granularity Scoring: To ensure consistency across different object scales, the model uses a relative granularity score. A score of 0.1 represents the finest discovered part, while 1.0 represents the whole entity, regardless of the absolute pixel size of the object.
- Architectural Integration: The authors added a lightweight Fourier-based granularity encoder and a specific mask token to the SAM-2 decoder. This allows the granularity score to be treated as a standard prompt alongside points or boxes, requiring only 0.02% additional parameters.
Key Results and Insights
UnSAMv2 demonstrates that foundation models already possess latent knowledge of object hierarchies, which supervised training on "flat" labels often obscures. By using self-supervision on just 6,000 unlabeled images from the SA-1B dataset, the model achieves state-of-the-art performance across multiple domains:
- Interactive Segmentation: Mask quality (measured by 1-IoU) improved from 58.0 to 73.1 compared to the base SAM-2. The efficiency of interaction also improved, with the number of clicks required to reach 90% IoU (NoC90) dropping from 5.69 to 4.75.
- Whole-Image Segmentation: In zero-shot tasks, UnSAMv2 achieved an Average Recall (AR1000) of 68.3, a substantial jump from SAM's 49.6.
- Temporal Consistency: Although trained exclusively on static images, the granularity control generalizes remarkably well to video. By prompting the first frame with a specific granularity, the model maintains that specific "zoom level" across subsequent frames.
Limitations and Future Work
While the unsupervised pipeline is powerful, the generated pseudo-labels can be noisy. The authors noted that a "lightly supervised" version (UnSAMv2+) using some ground-truth masks can further stabilize learning. Additionally, the method's effectiveness is tied to the quality of the underlying self-supervised features (DINO); if these features cannot distinguish between adjacent parts, the hierarchy discovery is limited. Future work may involve integrating this continuous granularity control into multi-modal models to allow for intuitive text-based "zoom-in/zoom-out" interactions in image editing.
Summary updated