Abstract
EntitySAM is a zero-shot framework that extends the "segment everything" capability to the video domain by automating the discovery and tracking of all entities. By augmenting the Segment Anything Model 2 (SAM 2) with an automatic prompt generator and a semantic-aware decoder, EntitySAM eliminates the need for manual user prompts while maintaining consistent tracking for objects that appear mid-video. The model achieves state-of-the-art performance on zero-shot video segmentation benchmarks, demonstrating significant improvements in handling occlusions and complex scene dynamics.
Introduction
While Meta’s SAM 2 established a new baseline for video segmentation, it remains constrained by two primary bottlenecks. First, it is prompt-dependent, requiring manual clicks or masks to initiate tracking. This makes it unsuitable for fully automated workflows where new objects may enter a scene at any time. Second, it tracks objects independently, lacking a global understanding of the scene, which often results in overlapping masks and inefficient processing.
To address these challenges, this research introduces the task of Video Entity Segmentation (VES). VES is a class-agnostic challenge focused on segmenting and tracking every semantically coherent group in a video, regardless of whether they belong to predefined categories or when they appear in the timeline.
Methodology
EntitySAM builds upon the frozen architecture of SAM 2, introducing three learnable components to enable automated, entity-aware segmentation:
- Automatic Prompt Generator: This module utilizes learnable object queries to automatically identify potential entities, generating prompt embeddings for the decoder without human intervention.
- Entity Decoder: Replacing the original SAM 2 mask decoder, this specialized version facilitates "inter-object communication." Through self-attention between different object queries, the model ensures masks do not overlap and respects the global scene context.
- Dual Visual Encoder (DINOv2 Integration): To bridge the gap between geometric boundary detection and high-level semantic awareness, the researchers integrated features from DINOv2. This self-supervised model provides strong semantic representations that help EntitySAM distinguish between different types of entities more effectively.
Crucially, the model is trained on image-level data (COCO) using "pseudo-video" sequences generated from static images, yet it demonstrates powerful zero-shot generalization to real-world video sequences.
Evaluation and Results
The model was evaluated on several standard benchmarks, including VIPSeg, VSPW, and OVIS, as well as a new benchmark introduced in this paper: VIPEntitySeg. This new dataset focuses specifically on class-agnostic entity tracking by removing category labels from the original VIPSeg data.
Key Performance Metrics
EntitySAM sets new state-of-the-art standards for zero-shot video segmentation:
- Superior Tracking: On the VIPEntitySeg benchmark, EntitySAM achieved a Video Entity Quality (VEQ) of 51.8 (with a ViT-S backbone), significantly outperforming SAM 2 with grid-based prompts (26.9) and the previous state-of-the-art, DEVA (49.0).
- Robustness to Occlusion: On the OVIS dataset, known for heavy occlusions, EntitySAM outperformed existing open-vocabulary models by a wide margin, achieving 21.0 AP compared to 14.8 AP for OV-DVIS++.
- Efficiency: Leveraging SAM 2’s frozen memory modules, the model can track over 50 entities simultaneously in a single pass.
Discussion and Limitations
A major insight from this work is the necessity of a "semantic anchor." While SAM 2 is excellent at defining boundaries, adding DINOv2 features significantly reduced false positives and improved mask quality. Furthermore, the separation of "discovery" (via queries) from "tracking" (via memory) allows the model to handle emerging entities seamlessly.
Despite its strengths, EntitySAM has limitations. It currently relies on a multi-step process using external models like GPT-4o for tasks requiring specific semantic labels. Additionally, very small or highly camouflaged objects in the background can sometimes be missed by the initial discovery phase. Future work will focus on end-to-end classification and training on large-scale real video data to further enhance temporal consistency.
Summary updated