grounding-dino
Use GroundingDINO for open-vocabulary object detection, single-image inference, COCO evaluation, pseudo-label dataset creation, and safe web or downstream integrations.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- grounding-dino
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use GroundingDINO for open-vocabulary object detection, single-image inference, COCO evaluation, pseudo-label dataset creation, and safe web or downstream integrations.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/api-overview.md2.1 KB
- 参考文档references/install-and-models.md2.7 KB
- 参考文档references/prompt-and-threshold-guide.md1.6 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json342 B
- 参考文档references/troubleshooting.md2.7 KB
- 脚本scripts/check_grounding_dino_install.py3.3 KB
03 SKILL.md 正文
GroundingDINO Repo Skill
Use this repo skill when a user asks about the groundingdino Python package, GroundingDINO open-set object detection, Grounding DINO config/checkpoint workflows, or the original demo capabilities from the IDEA-Research GroundingDINO project.
Choose A Route
sub-skills/inference/: single-image CLI/API inference,load_model,load_image,predict,annotate, theModelwrapper, class-list prompts, token spans, thresholds, devices, and output boxes.sub-skills/evaluation/: COCO-style zero-shot AP evaluation, category-prompt construction,CocoGroundingEvaluator,pycocotools, benchmark caveats, and low-AP diagnosis.sub-skills/dataset-annotation/: pseudo-label an image folder, draw review images, export COCO-format data, and manage optional FiftyOne workflow dependencies.sub-skills/integrations/: Gradio apps, Hugging Face checkpoint UX, Grounded-SAM/SAM handoffs, Stable Diffusion or GLIGEN notebook-style integrations, and color/box contracts.
Quick Install Check
GroundingDINO is a PyTorch package named groundingdino. A minimal install typically needs:
pip install -e .
For a reusable project or app, verify the installed package before running model code:
python scripts/check_grounding_dino_install.py
Read references/install-and-models.md before changing dependencies, compiling custom ops, selecting a config/checkpoint pair, or interpreting CPU-only warnings.
Core Facts
- The packaged model configs are
GroundingDINO_SwinT_OGC.pyandGroundingDINO_SwinB_cfg.py; both usemodelname="groundingdino",num_queries=900,max_text_len=256, andbert-base-uncasedtext encoding. - Released workflows require a config file and a matching checkpoint file; this skill does not download checkpoints unless an integration helper explicitly receives Hugging Face download arguments.
- The public inference API returns normalized
cxcywhboxes, logits/confidence scores, and phrases; annotation helpers convert boxes for visualization. - Training code is not part of this repo skill because the source README lists training-code release as incomplete.
Shared References
references/api-overview.md: package modules, public API surfaces, and where detailed signatures live.references/install-and-models.md: install/build behavior, dependencies, model variants, checkpoints, and device guidance.references/prompt-and-threshold-guide.md: prompt punctuation, class lists, thresholds, token spans, and no-detection diagnosis.references/troubleshooting.md: cross-cutting install, import, model, data, device, and workflow failures.references/repo-provenance.md: source commit, dirty-state baseline, package version, and evidence paths.references/repo-routing-metadata.json: structured DisCo router metadata used during managed import.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).