Abstract
The Segment Anything Model (SAM) was originally designed for label-agnostic mask generation. Does this model also possess inherent semantic understanding, of value to broader visual tasks? In this work we follow a multi-staged approach towards exploring this question. We firstly quantify SAM's semantic capabilities by comparing base image encoder efficacy under classification tasks, in comparison with established models (CLIP and DINOv2). Our findings reveal a significant lack of semantic discriminability in SAM feature representations, limiting potential for tasks that require class differentiation. This initial result motivates our exploratory study that attempts to enable semantic information via in-context learning with lightweight fine-tuning where we observe that generalisability to unseen classes remains limited. Our observations culminate in the proposal of a training-free approach that leverages DINOv2 features, towards better endowing SAM with semantic understanding and achieving instance-level class differentiation through feature-based similarity. Our study suggests that incorporation of external semantic sources provides a promising direction for the enhancement of SAM's utility with respect to complex visual tasks that require semantic understanding.
Introduction
In the world of computer vision, the Segment Anything Model (SAM) represented a "Gutenberg moment" for segmentation. It can outline almost any object in any image with incredible precision. However, SAM is famously label-agnostic: it knows where an object is, but it has no idea what it is. It treats a cat, a car, and a cloud with the same mathematical indifference.
The researchers behind "There is no SAMantics!" sought to determine if semantic understanding was "hiding" inside SAM’s weights. If a model is trained on 1.1 billion masks, surely it must have learned something about the categories of those objects. This paper systematically tests that hypothesis, exploring whether SAM can be used as a backbone for high-level visual understanding tasks like classification and instance segmentation.
Methodological Framework
The authors took a three-staged approach to probe SAM’s internal representations:
- Quantifying (The "Linear Probe" Test): They froze the image encoders of SAM and SAM 2 and attached a simple linear classifier. This standard test determines if internal representations are "linearly separable" into categories. They compared this against "semantic-heavy" models like CLIP and DINOv2.
- Recovering (In-Context Fine-tuning): They attempted to "teach" SAM semantics by adding a lightweight DETR (Detection Transformer) head. The goal was in-context learning: showing the model a reference image of an object (e.g., a bicycle) to see if it could find and segment similar objects in a target image.
- Injecting (The Hybrid Approach): Realizing SAM’s internal features were insufficient, they proposed a training-free baseline using SAM for geometric "proposals" and DINOv2 for semantic feature extraction, matching them via cosine similarity.
Key Results and Analysis
The Semantic Gap
SAM’s Top-1 accuracy on ImageNet was a dismal 11.06%, compared to DINOv2’s 77.43%. While SAM 2 showed improvement (23.16%), it still lagged nearly 50 percentage points behind DINOv2. This confirms that training purely on geometric masks does not automatically grant an understanding of object categories.
Generalization Failure
When fine-tuned to recognize objects using a DETR head, the model performed well on training classes but failed on "novel" classes. In-context learning experiments showed a drop from 24.2 AP on base classes to just 7.1 AP on novel classes. The model did not learn the concept of an object; it simply memorized specific training features.
The Success of Injection
The training-free SAM+DINOv2 hybrid proved that external semantic sources are currently the only viable way to make SAM "semantically aware" for open-world tasks. By using SAM for the "where" and DINOv2 for the "what," the researchers achieved significantly better generalization without additional training.
Conclusion
The paper argues that vision models are diverging into two specialists: "Geometric" models like SAM that understand boundaries, and "Semantic" models like DINOv2 or CLIP that understand concepts. While SAM provides a great pair of "eyes" for the computer, it still requires an external "brain" to interpret what it sees. Future work must focus on better alignment mechanisms to effectively fuse geometric precision with semantic richness.
Summary updated