Grounded SAM 2

Pipeline that turns a text prompt into segmentation masks and tracked object IDs across images and video.

Open SourceSelf HostedOffline CapableGPU Required (8GB+ VRAM)
0.0 (0)

About

Type a phrase such as 'hippo' or 'person holding a cup' and this IDEA Research pipeline returns boxes, pixel masks, and object IDs that persist from frame to frame in video. Locally it pairs Grounding DINO 1.0, loaded through Hugging Face Transformers or from the original checkpoint, or Microsoft Florence-2 with Meta's SAM 2 and SAM 2.1, passing detections on as box, point, or mask prompts. Demo scripts handle still images, your own MP4 files, live camera feeds, fresh IDs for objects that appear mid-clip, reverse tracking, and JSON dumps with RLE-encoded masks. IDEA's newer detectors, DINO-X and Grounding DINO versions 1.5 and 1.6, plus SAHI tiling for dense 4K scenes, work only through a token-gated cloud API. Expect Python 3.10, PyTorch 2.3 or newer, and a CUDA toolkit for building the custom deformable-attention op, or use the bundled Docker setup. The repository is Apache-2.0, so it fits auto-labeling jobs, dataset bootstrapping, and vision prototypes where the cloud models stay optional.

Should you use Grounded SAM 2?

Pick it when

Pick Grounded SAM 2 when you need to detect, mask and track objects named in plain text across video, such as auto-labeling footage, and want swappable Apache 2.0 components on a GPU with 8 GB or more.

Look elsewhere when

Skip it if one model is simpler for you: SAM 3 does text-prompted concept segmentation and tracking natively. If boxes are enough, Grounding DINO alone runs at half the GPU memory floor, 4 GB versus 8.

Alternatives to Grounded SAM 2

  • SAM 3

    Single model that segments and tracks every instance of a text concept, simpler than chaining two, but needs Python 3.12, CUDA 12.6 and the custom SAM License.

  • Grounding DINO

    Text-prompted boxes only at a 4 GB floor, enough for counting or cropping, without masks or video tracking.

  • Segment Anything 2 (SAM 2)

    The segmentation and tracking half alone, prompted by clicks or boxes rather than text, so you supply the prompts or your own detector.

  • Florence-2

    One MIT model for captions, grounding, OCR and segmentation via prompts with a lower 6 GB floor, but no SAM 2 style video mask tracking.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!

Details

Price
Free
Platform
Local/Desktop
Difficulty
Intermediate (3/5)
License
Apache-2.0
Minimum VRAM
8 GB
Added
Apr 3, 2026

Tags