Grounded-Segment-Anything README

The project's README from github.com/IDEA-Research/Grounded-Segment-Anything. As one markdown file: README.md.

Grounded-Segment-Anything

YouTube Colab Open in Colab HuggingFace Space Replicate ModelScope Official Demo Huggingface Demo by Community Stable-Diffusion WebUI Jupyter Notebook Demo Static Badge Static Badge Static Badge

We plan to create a very interesting demo by combining Grounding DINO and Segment Anything which aims to detect and segment anything with text inputs! And we will continue to improve it and create more interesting demos based on this foundation. And we have already released an overall technical report about our project on arXiv, please check Grounded SAM: Assembling Open-World Models for Diverse Visual Tasks for more details.

We are very willing to help everyone share and promote new projects based on Segment-Anything, Please check out here for more amazing demos and works in the community: Highlight Extension Projects. You can submit a new issue (with project tag) or a new pull request to add new project's links.

🍄 Why Building this Project?

The core idea behind this project is to combine the strengths of different models in order to build a very powerful pipeline for solving complex problems. And it's worth mentioning that this is a workflow for combining strong expert models, where all parts can be used separately or in combination, and can be replaced with any similar but different models (like replacing Grounding DINO with GLIP or other detectors / replacing Stable-Diffusion with ControlNet or GLIGEN/ Combining with ChatGPT).

🍇 Updates

Table of Contents

Preliminary Works

Here we provide some background knowledge that you may need to know before trying the demos.

Title Intro Description Links
Segment-Anything A strong foundation model aims to segment everything in an image, which needs prompts (as boxes/points/text) to generate masks [Github]
[Page]
[Demo]
Grounding DINO A strong zero-shot detector which is capable of to generate high quality boxes and labels with free-form text. [Github]
[Demo]
OSX A strong and efficient one-stage motion capture method to generate high quality 3D human mesh from monucular image. OSX also releases a large-scale upper-body dataset UBody for a more accurate reconstrution in the upper-body scene. [Github]
[Page]
[Video]
[Data]
Stable-Diffusion A super powerful open-source latent text-to-image diffusion model [Github]
[Page]
RAM++ RAM++ is the next generation of RAM, which can recognize any category with high accuracy. [Github]
RAM RAM is an image tagging model, which can recognize any common category with high accuracy. [Github]
[Demo]
BLIP A wonderful language-vision model for image understanding. [GitHub]
Visual ChatGPT A wonderful tool that connects ChatGPT and a series of Visual Foundation Models to enable sending and receiving images during chatting. [Github]
[Demo]
Tag2Text An efficient and controllable vision-language model which can simultaneously output superior image captioning and image tagging. [Github]
[Demo]
VoxelNeXt A clean, simple, and fully-sparse 3D object detector, which predicts objects directly upon sparse voxel features. [Github]

Highlighted Projects

Here we provide some impressive works you may find interesting:

Title Description Links
Semantic-SAM A universal image segmentation model to enable segment and recognize anything at any desired granularity [Github]
[Demo]
SEEM: Segment Everything Everywhere All at Once A powerful promptable segmentation model supports segmenting with various types of prompts (text, point, scribble, referring image, etc.) and any combination of prompts. [Github]
[Demo]
OpenSeeD A simple framework for open-vocabulary segmentation and detection which supports interactive segmentation with box input to generate mask [Github]
LLaVA Visual instruction tuning with GPT-4 [Github]
[Page]
[Demo]
[Data]
[Model]
GenSAM Relaxing the instance-specific manual prompt requirement in SAM through training-free test-time adaptation [Github]
[Page]

We also list some awesome segment-anything extension projects here you may find interesting:

Grounded-Segment-Anything (IDEA-Research/Grounded-Segment-Anything)

Searching Database…

What is this?Grounded SAM, a research demo project that combines Grounding DINO with Segment Anything to detect and segment any object in an image from a plain text prompt, extended with Stable Diffusion, RAM, Whisper and more.
Is it a library I can import, or a set of demos I run?It is a collection of runnable research demos rather than an installable package: step-by-step notebook demos, a Grounded-SAM playground, and Gradio apps, with a Docker install option.
How do I get it running?Clone the repo and follow the Installation section of the README: either install with Docker or set up the local Python environment, then run the notebook demo or Gradio app you want.
Which models am I actually running under the hood?Several heavyweight open-world models together: Grounding DINO for detection, Segment Anything for masks, plus optional Stable Diffusion for inpainting, RAM or BLIP for automatic labeling, and Whisper for audio prompts.
Is the segmentation fully automatic, or do I have to prompt it?You always prompt it: SAM itself needs prompts like boxes, points or text to produce masks — in this pipeline Grounding DINO supplies them from your free-form text.
What is Grounding DINO?IDEA-Research's zero-shot open-world detector: you feed it free-form text and it returns high-quality bounding boxes and labels for the objects the text names, without training on your classes.
Can I swap models in the pipeline?Yes. The authors frame it as a workflow of expert models where every part can run separately or in combination and be replaced — e.g. GLIP instead of Grounding DINO, or ControlNet and GLIGEN instead of Stable Diffusion.
Can I try it without installing anything?There is a RAM-Grounded-SAM online demo on Replicate, and both Grounding DINO and Grounded SAM are supported on Hugging Face with official documentation.
What is Grounded SAM 2?The newer iteration that pairs Grounding DINO with SAM 2, adding tracking of any object in open-world scenarios on top of the original text-prompted detect-and-segment flow.
Size
155.8 MB
Stars
17.8K
Updated
CommitSep 05
Age
3y
Commits · 90 Days