Grounding DINO 是一个开集(Open-Set)的目标检测模型,根据输入的文本提示,进行目标检测。 本仓库是Grounding DINO的Paddle实现,提供部署代码。
#Multi-scale deformable attention custom OP compilation
cd /paddlemix/models/groundingdino/csrc/
python setup_ms_deformable_attn_op.py install
cd deploy/groundingdino
#静态图模型导出
python export.py \
--dino_type GroundingDino/groundingdino-swint-ogc
#静态图预测
python predict.py \
--text_encoder_type GroundingDino/groundingdino-swint-ogc \
--model_path output_groundingdino/GroundingDino/groundingdino-swint-ogc \
--input_image https://bj.bcebos.com/v1/paddlenlp/models/community/GroundingDino/000000004505.jpg \
--output_dir ./groundingdino_predict_output \
--prompt "bus"