Skip to content
ModelListedExternal
Download

Mm Grounding Dino Tiny O365v1 Goldg

MM Grounding DINO model was proposed in An Open and Comprehensive Pipeline for Unified Object Grounding and Detection by Xiangyu Zhao, Yicheng Chen, Shilin Xu, Xiangtai Li, Xinjiang Wang, Yining Li, Haian Huang.

KindOtherVersionRevision 80b3081Bgrade

Model source

Kind
Other
File size
660 MB
Version
vRevision 80b3081
Updated
Oct 10, 2026
Downloads
261
Source
Hugging Face

Source description

MM Grounding DINO (tiny variant)

MM Grounding DINO model was proposed in An Open and Comprehensive Pipeline for Unified Object Grounding and Detection by Xiangyu Zhao, Yicheng Chen, Shilin Xu, Xiangtai Li, Xinjiang Wang, Yining Li, Haian Huang.

MM Grounding DINO improves upon the Grounding DINO by improving the contrastive class head and removing the parameter sharing in the decoder, improving zero-shot detection performance on both COCO (50.6(+2.2) AP) and LVIS (31.9(+11.8) val AP and 41.4(+12.6) minival AP).

You can find all the original MM Grounding DINO checkpoints under the MM Grounding DINO collection.

Intended uses

You can use the raw model for zero-shot object detection.

Here's how to use the model for zero-shot object detection:

import torch
from transformers import AutoModelForZeroShotObjectDetection, AutoProcessor
from transformers.image_utils import load_image


# Prepare processor and model
model_id = "rziga/mm_grounding_dino_tiny_o365v1_goldg"
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)

# Prepare inputs
image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = load_image(image_url)
text_labels = [["a cat", "a remote control"]]
inputs = processor(images=image, text=text_labels, return_tensors="pt").to(device)

# Run inference
with torch.no_grad():
    outputs = model(**inputs)

# Postprocess outputs
results = processor.post_process_grounded_object_detection(
    outputs,
    threshold=0.4,
    target_sizes=[(image.height, image.width)]
)

# Retrieve the first image result
result = results[0]
for box, score, labels in zip(result["boxes"], result["scores"], result["labels"]):
    box = [round(x, 2) for x in box.tolist()]
    print(f"Detected {labels} with confidence {round(score.item(), 3)} at location {box}")

Training Data

This model was trained on:

Evaluation results

BibTeX entry and citation info

@article{zhao2024open,
  title={An Open and Comprehensive Pipeline for Unified Object Grounding and Detection},
  author={Zhao, Xiangyu and Chen, Yicheng and Xu, Shilin and Li, Xiangtai and Wang, Xinjiang and Li, Yining and Huang, Haian},
  journal={arXiv preprint arXiv:2401.02361},
  year={2024}
}

Sources

1 source
Hugging FacePrimaryVersion 80b3081e63ff7c265a9b404296d848f0f0aa0006
huggingface.co/openmmlab-community/mm_grounding_dino_tiny_o365v1_goldg/tree/80b3081e63ff7c265a9b404296d848f0f0aa0006

Verified Oct 10

Model artifacts

1 artifact

model.safetensors

safetensors · 660 MB · SHA-256 2d9bdfd0247f…0688 · Hugging Face

Download

Source excerpts

3 excerpts

--- library_name: transformers tags: - vision license: apache-2.0 pipeline_tag: zero-shot-object-detection --- # MM Grounding DINO (tiny variant) [MM Grounding DINO](https://arxiv.org/abs/2401.02361) model was proposed in [An Open and Comprehensive Pipeline for Unified Object Grounding and Detection](https://arxiv.org/abs/2401.02361) by Xiangyu Zhao, Yicheng Chen, Shilin Xu, Xiangtai Li, Xinjiang Wang, Yining Li, Haian Huang. MM Grounding DINO improves upon the [Grounding DINO](https://huggingface.co/docs/transformers/model_doc/grounding-dino) by improving the contrastive class head and removing the parameter sharing in the decoder, improving zero-shot detection performance on both COCO (50.6(+2.2) AP) and LVIS (31.9(+11.8) val AP and 41.4(+12.6) minival AP). You can find all the original MM Grounding DINO checkpoints under the [MM Grounding DINO](https://huggingface.co/collections/rziga/mm-grounding-dino-6839881a7f983113fafdbb0e) collection. ## Intended uses You can use the raw model for zero-shot object detection. Here's how to use the model for zero-shot object detection: ```py import torch from transformers import AutoModelForZeroShotObjectDetection, AutoProcessor from transformers.image_utils import load_image # Prepare processor and model model_id = "rziga/mm_grounding_dino_tiny_o365v1_goldg" device = "cuda" if torch.cuda.is_available() else "cpu" processor = AutoProcessor.from_pretrained(model_id) model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device) # Prepare inputs image_url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = load_image(image_url) text_labels = [["a cat", "a remote control"]] inputs = processor(images=image, text=text_labels, return_tensors="pt").to(device) # Run inference with torch.no_grad(): outputs = model(**inputs) # Postprocess outputs results = processor.post_process_grounded_object_detection( outputs, threshold=0.4, target_sizes=[(image.height, image.width)] ) # Retrieve the first image result result = results[0] for box, score, labels in zip(result["boxes"], result["scores"], result["labels"]): box = [round(x, 2) for x in box.tolist()] print(f"Detected {labels} with confidence {round(score.item(), 3)} at location {box}") ``` ## Training Data This model was trained on: - [Objects365v1](https://www.objects365.org/overview.html) - [GOLD-G](https://arxiv.org/ab...

Source context: 261 downloads · 3 likes · Pipeline zero-shot-object-detection · Library transformers · Repo openmmlab-community/mm_grounding_dino_tiny_o365v1_goldg

Source context: 212 downloads · 3 likes · Pipeline zero-shot-object-detection · Library transformers · Repo openmmlab-community/mm_grounding_dino_tiny_o365v1_goldg