Hugging Face Drops MM Grounding DINO, Pushing Zero-Shot Detection to 60.3 AP
MM Grounding DINO joins the Transformers library, bringing sharper zero-shot detection and LLMDet support to the same familiar API used for the original model.
ProTakeaways
- MM Grounding DINO has been merged into Hugging Face Transformers, usable with the standard zero-shot detection API.
- Gains +2.2 AP on COCO zero-shot (50.6) and +11.8 val AP on LVIS (31.9) versus the original Grounding DINO.
- Improvements come from a refined contrastive class head and removing parameter sharing across decoder layers.
- The same code path also runs LLMDet checkpoints for stronger long-tail detection.
- Checkpoints span Swin-T, Swin-B, and Swin-L backbones, with the large fine-tuned variant hitting 60.3 COCO mAP.
- Migration is a one-line model ID swap from
IDEA-Research/grounding-dino-tinyto anyopenmmlab-community/mm_grounding_dino_*.
Open-vocabulary object detection just got a meaningful upgrade inside the Hugging Face ecosystem. MM Grounding DINO, the MMDetection team's refined take on the popular Grounding DINO detector, has landed in the Transformers library, giving anyone with a pip install transformers access to a stronger zero-shot detector without leaving the standard API.
Grounding DINO's tiny checkpoint has been one of the most-downloaded zero-shot detection models on the Hub, and this new variant works as a near drop-in replacement that pushes accuracy higher across the board.
Surgical changes, sizeable gains
MM Grounding DINO was released in early 2024 and added to Hugging Face Transformers on August 1, 2025, based on the paper "An Open and Comprehensive Pipeline for Unified Object Grounding and Detection" by Xiangyu Zhao and collaborators. The port was tracked in issue #37744, where the contributor noted that it lifts zero-shot detection performance considerably (especially on LVIS), stays close to the original Grounding DINO implementation, and ships checkpoints with higher-resolution FPN features that were not available for the original model.
Architecturally, the changes are surgical rather than sweeping. MM Grounding DINO refines the contrastive class head and removes parameter sharing in the decoder, lifting zero-shot performance on both COCO (50.6, +2.2 AP) and LVIS (31.9, +11.8 val AP and 41.4, +12.6 minival AP). The contrastive class head is the module that scores how well a text token matches an image region, and untangling shared decoder weights gives each decoder layer more room to specialize.
The numbers, by checkpoint
The Transformers docs publish a full grid of pretrained variants across three backbone sizes. Here are the headline COCO zero-shot results:
| Checkpoint | Backbone | Pre-Train Data | COCO mAP |
|---|---|---|---|
| mm_grounding_dino_tiny_o365v1_goldg_v3det | Swin-T | O365, GoldG, V3Det | 50.6 |
| mm_grounding_dino_base_o365v1_goldg_v3det | Swin-B | O365, GoldG, V3Det | 52.5 |
| mm_grounding_dino_base_all | Swin-B | O365, ALL | 59.5 |
| mm_grounding_dino_large_all | Swin-L | O365V2, OpenImageV6, ALL | 60.3 |
For context, the original Grounding DINO achieves 52.5 AP on COCO zero-shot, so the large fine-tuned variant clears 60 AP without seeing COCO labels directly during training.
Same API, one line to swap
Existing Grounding DINO code migrates trivially. You keep the same processor and detection class, and only change the model ID. A minimal example from the docs looks like this:
from transformers import AutoModelForZeroShotObjectDetection, AutoProcessor
from transformers.image_utils import load_image
model_id = "openmmlab-community/mm_grounding_dino_tiny_o365v1_goldg_v3det"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id, device_map="auto")
image = load_image("http://images.cocodataset.org/val2017/000000039769.jpg")
text_labels = [["a cat", "a remote control"]]
inputs = processor(images=image, text=text_labels, return_tensors="pt").to(model.device)
outputs = model(**inputs)
results = processor.post_process_grounded_object_detection(
outputs, threshold=0.4, target_sizes=[(image.height, image.width)]
)
The text prompt convention matches the original: lowercase phrases, one per class, in a list. Under the hood the config exposes the usual detector knobs, including num_queries=900, a two-stage decoder, and a max_text_len of 256 tokens.
Bonus: LLMDet rides the same code path
One quiet win of this PR is that the new module also handles a second model family. The same code supports LLMDet inference, with checkpoints available under the LLMDet collection. LLMDet is a detector trained with an auxiliary caption dataset, and its numbers on rare LVIS classes run meaningfully higher than MM Grounding DINO alone, making it attractive when long-tail categories matter.
When to reach for it
MM Grounding DINO is worth trying if you already use Grounding DINO for any of these:
- Zero-shot bounding boxes from free-form text prompts, without labeled data for your categories
- Automatic labeling pipelines that feed a downstream segmenter like SAM
- Rare-class detection where LVIS-style long tails matter, thanks to the +11.8 val AP jump
- Any application currently pinned to
IDEA-Research/grounding-dino-tinywhere you want more accuracy at the same parameter count
The trade-off is unchanged from the original family: this remains a heavy transformer detector, not a real-time model. For edge or high-FPS use cases, lighter open-vocabulary detectors like OmDet-Turbo or OWLv2 may still fit better. For offline labeling, dataset bootstrapping, and research prototypes, the accuracy gains here come essentially for free once you bump your Transformers version and change one string.