安装 torch,然后安装
pip install -r requirements.txt
关键是https://github.com/captainfffsama/GroundingDINO/tree/chiebot_dev 下的chiebot_dev 分支
本体权重:https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth 或者 https://huggingface.co/ShilongLiu/GroundingDINO/resolve/main/groundingdino_swint_ogc.pth
bert 配置:https://huggingface.co/google-bert/bert-base-uncased
修改 GroundingDINO_SwinT_OGC.py 中text_encoder_type 为bert配置文件的文件夹
参见 exam.py