Registry / ai-ml / rf-groundingdino

rf-groundingdino

JSON →
library0.3.0pypypi✓ verified 82d ago

A Roboflow-maintained fork of Grounding DINO, a state-of-the-art open-set object detector that can detect arbitrary objects based on text prompts. Version 0.3.0 combines image and text encoders with a transformer-based fusion approach. Release cadence is irregular; actively maintained.

pip install rf-groundingdino
INSTALL
IMPORT
SIG · RF-GROUNDINGDINO
R
rf-groundingdino
ai-mlpythonv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

groundingdino
import groundingdino
from rf_groundingdino import groundingdino

Load the model and run inference on an image with text prompts.

from rf_groundingdino import groundingdino from rf_groundingdino.util.inference import load_model, predict import torch device = 'cuda' if torch.cuda.is_available() else 'cpu' model = load_model('groundingdino_swint_ogc', 'path/to/config.py', 'path/to/weights.pth') # For inference, use predict() or model() import cv2 image = cv2.imread('image.jpg') prompts = 'cat . dog .' # separate classes with ' . ' boxes, logits, phrases = predict(model, image, prompts, box_threshold=0.3, text_threshold=0.25) print('Detections:', len(phrases))
Debug
Known issues
breakingPackage renamed from 'groundingdino' to 'rf_groundingdino' in v0.1.2. All imports must use 'rf_groundingdino' prefix.
fix
Change imports: 'import groundingdino' -> 'from rf_groundingdino import groundingdino'
affects: >=0.1.2
gotchaThe predict() function expects prompts in a specific format: separate each class with ' . ' (space-dot-space). Omitting spaces or using different separators leads to zero detections.
fix
Use format: 'cat . dog . person' (note the spaces around the dot).
affects: all
gotchaModel weights are not included in pip install. You must download them manually from the GitHub releases page.
fix
Download weights from https://github.com/roboflow/GroundingDINO/releases and provide the path.
affects: all
deprecatedThe old 'groundingdino' package (v0.1.0) is unmaintained and incompatible with this fork.
fix
Uninstall old package and install rf-groundingdino: pip install rf-groundingdino
affects: <=0.1.0
Upgrade
Version history
0.3.0latest on PyPI · released Dec 8, 2025
Audit
Dependencies
torchrequiredCore dependency for model computation
transformersrequiredRequired for text encoder (BERT-based)
supervisionoptionalUsed for detection result processing (loading, annotation)
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
rf-groundingdino — pip install rf-groundingdino · libregistry