language:
- zh tasks:
- grounding-dino-task license: Apache License 2.0 pipeline_tag: Groundingdino-generation-pipe
模型描述 (Model Description)
运行环境 (Operating environment)
pip install supervision==0.18.0
代码范例 (Code example)
import cv2
from modelscope.pipelines import pipeline
from modelscope.hub.snapshot_download import snapshot_download
model_dir = snapshot_download('AI-ModelScope/GroundingDINO')
pipe = pipeline('grounding-dino-task', model=model_dir)
inputs = {
"IMAGE_PATH":"dog-3.jpg",
"TEXT_PROMPT":"chair . person . dog .",
"BOX_TRESHOLD":0.35,
"TEXT_TRESHOLD":0.25
}
output = pipe(inputs)
cv2.imwrite("annotated_image.jpg", output["annotated_frame"])
Citation
If you find our work helpful for your research, please consider citing the following BibTeX entry.
@inproceedings{ShilongLiu2023GroundingDM,
title={Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detection},
author={Shilong Liu and Zhaoyang Zeng and Tianhe Ren and Feng Li and Hao Zhang and Jie Yang and Chunyuan Li and Jianwei Yang and Hang Su and Jun Zhu and Lei Zhang},
year={2023}
}