Grounding dino
Grounding DINO zero-shot object detection — natural-language queries to labeled 2D bounding boxes with confidence scores. Use when a workflow needs to locate named objects in an RGB image before segmenting or grasping them.From its SKILL.md
npx -y skills add graph-robots/open-robot-skills --skill grounding-dinoAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- runs commandsInstructs the agent to run 1 command, including `uv sync --extra grounding-dino`.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.3 KB, 414 tokens by cl100k_base, as published. Nobody here has run it
grounding-dino
The Grounding DINO servicer (IDEA-Research/grounding-dino-base via
transformers) as one in-process tool. Image in: RGB uint8 [H, W, 3] numpy
array; out: {detections: [{box, label, score}, ...]}.
When to use
- Locating a named object in a camera frame:
grounding-dino.detect(rgb, "cream cheese box."), pick the best box (highest score, or closest to a pointing-model pixel), thensam3.segment_boxfor a pixel-accurate mask. - Empty
detectionsmeans nothing cleared the thresholds — treat as not-found, don't retry blindly with the same prompt.
Install
uv sync --extra grounding-dino # torch + transformers
# (pip: pip install -e ".[grounding-dino]")
Weights download from HuggingFace on first call. Env knobs:
GAP_DINO_DEVICE (default cuda; CPU works but is slow) and
GAP_DINO_MODEL (default IDEA-Research/grounding-dino-base).
Gotchas (carried over from the servicer)
- Period-separated phrases: GDINO's text encoder expects each object
phrase terminated with
.("red cube. green cube."). A missing final period is appended automatically, but separate multiple objects yourself. - Default thresholds are deliberately low (0.20/0.20) for recall on household objects; raise them when false positives leak through. Zero or negative thresholds fall back to the defaults (proto-default semantics).
labelstrings are the matched text spans, not your full query — when querying multiple phrases, group detections by label.- The model is a lazy module-level singleton; the first call pays the weights-load latency, subsequent calls don't.
What ships with it: 3 files
7.6 KB alongside SKILL.md, 1 of them executable
- pyproject.toml1.2 KB
- .python-version5 B
- tools.pyruns6.3 KB