When running the program, pay attention to the format of the input prompt words, separate the categories with ". ", and make sure that the category name exists in the dictionary file vocab.txt, and the category name in the input prompt word is the target category you want to detect, otherwise the target may not be detected.
If you want to export the onnx file, run export_onnx.py in https://github.com/wenyi5608/GroundingDINO to generate the onnx file. Note that the pytorch version needs to be above 2.0. The difference between the code in this repository and the code in the official repository https://github.com/IDEA-Research/GroundingDINO is that the input parameters of the forward function in grounddinomodelsGroundingDINOgroundingdino.py are different.
The exported onnx file is in Baidu Cloud Drive, download link: https://pan.baidu.com/s/1_dDxaSMG2vbw47FJ7FdUUg Extraction code: u6lr