Skip to content

A simple demo for utilizing grounding dino and segment anything v2 models together

Notifications You must be signed in to change notification settings

CoffeeVampir3/grounding-sam2-demo

Repository files navigation

How 3:

pip install -r requirements.txt python download_models.py python interface.py

The text box controls the grounding, and is what gives you the mask. Type something in and hit ground image. The 2nd from the right image can place control points, you can switch the control points be positive (include this part of the image) or negative (exclude this part of the image.) Control points are optional but will give SAM2 a better chance of segmenting well if you pick good points.