Abstract
While the Segment Anything Model (SAM) and its successor, SAM2, have set benchmarks in promptable image segmentation, they remain "semantically blind," requiring visual prompts like clicks or boxes rather than natural language. OpenWorldSAM addresses this limitation by extending SAM2 to support open-ended language prompts—ranging from simple category names to complex descriptive sentences. By utilizing a frozen foundation approach and a novel "positional tie-breaker" mechanism, OpenWorldSAM achieves state-of-the-art zero-shot performance across multiple benchmarks while maintaining the real-time efficiency of the original SAM2 architecture.
Introduction
The introduction of the Segment Anything Model (SAM) revolutionized computer vision by providing a foundation model capable of segmenting any object given a spatial prompt. However, the reliance on manual visual prompts limits its utility in automated workflows that require semantic understanding. For instance, a user cannot simply ask SAM to segment "the man in the red shirt" without first providing a bounding box or a point.
Existing attempts to bridge this gap typically fall into two categories: two-stage pipelines that segment everything and then classify masks using a vision-language model, or heavy integrations with Large Language Models (LLMs). The former is often slow and prone to error propagation, while the latter sacrifices the real-time inference capabilities that made SAM popular. Furthermore, language prompts introduce a unique challenge: multi-instance ambiguity. A single prompt like "zebra" in an image containing a herd requires the model to distinguish and segment multiple individual instances rather than a single merged mask. OpenWorldSAM is designed to solve these semantic and instance-level challenges efficiently.
Methodology
OpenWorldSAM adopts a lightweight adapter-based strategy to preserve the powerful features of pre-trained models while enabling language grounding.
Frozen Foundations
The architecture relies on two frozen backbones: SAM2 for visual feature extraction and mask decoding, and BEiT-3 as a multi-modal encoder. BEiT-3 is chosen for its early-fusion capabilities, where image and text features are processed together. This ensures that the resulting text embeddings are spatially aware before they interact with the mask decoder.
Positional Tie-Breakers
To resolve the multi-instance ambiguity problem, the authors introduce "positional tie-breakers." When a single text prompt (e.g., "car") is provided, the model adds $K$ (typically 20) learnable noise vectors to the text embedding. This effectively creates multiple distinct queries from a single semantic input. During training, these queries are encouraged to target different spatial regions, allowing the model to identify and segment up to 20 distinct instances of the same class simultaneously.
Lightweight Adapter
Instead of fine-tuning the massive backbones, OpenWorldSAM uses a tiny 4.5-million-parameter adapter. This module employs cross-attention to allow text queries to attend to SAM2’s high-resolution image features. This process "snaps" the semantic queries to actual object boundaries, ensuring high-quality mask generation. Because the backbones remain frozen, the model is extremely efficient to train and deploy.
Experimental Results
OpenWorldSAM was evaluated across several zero-shot and referring expression benchmarks, demonstrating significant improvements over existing generalist models.
Zero-Shot Segmentation
On the ADE20K-857 dataset, which contains a vast array of object categories, OpenWorldSAM achieved 33.1% mIoU. This represents a staggering 23.9 absolute point increase over the previous state-of-the-art, X-Decoder. The model also showed dominant performance on PASCAL VOC, PASCAL Context, and ScanNet, proving its robust generalization capabilities.
Referring Expressions
In tasks requiring the segmentation of specific objects based on complex descriptions (RefCOCOg), OpenWorldSAM achieved a 74.0 cIoU. This performance is comparable to specialized models utilizing 7-billion-parameter LLMs, despite OpenWorldSAM's adapter being orders of magnitude smaller.
Efficiency and Training
The model's efficiency is a key highlight. It was trained on a single NVIDIA A100 GPU in only 25 epochs using COCO2017-Stuff and RefCOCOg data. During inference, the language adapter adds only a ~20% latency overhead compared to the base SAM2 model, making it suitable for interactive applications.
Discussion and Limitations
Despite its success in general scenes, OpenWorldSAM faces challenges in specific domains, particularly outdoor driving datasets like Cityscapes and BDD10K. The authors identify two primary causes:
- Domain Shift: The training data (COCO) focuses on everyday photography, which differs significantly from the perspective and composition of dashcam footage.
- Resolution Constraints: SAM2's standard 1024x1024 input resolution can cause small, distant objects in high-resolution driving footage to be compressed into a few pixels, making precise segmentation difficult.
Conclusion
OpenWorldSAM demonstrates that high-performance, open-vocabulary segmentation does not require massive LLMs or computationally expensive pipelines. By smartly aligning frozen vision and multi-modal backbones through a lightweight adapter and addressing instance ambiguity with positional tie-breakers, OpenWorldSAM extends the utility of SAM2 into the realm of natural language interaction. Future work will focus on expanding the model's robustness in specialized domains and improving its handling of high-resolution imagery.
Summary updated