I met with an error when debugging step by step. And it seems that I change somewhere by mistake. And I cant find it now.
TypeError: ‘GroundingDINO’ object is not callable
Here’s my log
(groundingdino) root@d329247a7fcc:~/data3/zhengby/GroundingDINO-main# CUDA_VISIBLE_DEVICES=0 python demo/inference_on_a_image.py -c groundingdino/config/GroundingDINO_SwinT_OGC.py -p weights/groundingdino_swint_ogc.pth -i /root/data3/zhengby/GroundingDINO-main/demo/demo_input/16.jpg -o "/root/data3/zhengby/GroundingDINO-main/demo_output_16" -t "bottle . watch . glass . ipad . cleasing milk . Bags . ring . phone . earphone . shoes . hair dryer . toothbrush . camera . pot . taxi . car . cat . plant . paper . table . laptop . book . speakers . pillow . quilt"
/root/anaconda3/envs/groundingdino/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
final text_encoder_type: bert-base-uncased
_IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])
Traceback (most recent call last):
File "/root/data3/zhengby/GroundingDINO-main/demo/inference_on_a_image.py", line 226, in <module>
boxes_filt, pred_phrases = get_grounding_output(
File "/root/data3/zhengby/GroundingDINO-main/demo/inference_on_a_image.py", line 100, in get_grounding_output
outputs = model(image[None], captions=)
TypeError: 'GroundingDINO' object is not callable
Any help will be appreciated.
I have download groundingdino, run it and met with same error again.
Is that means it’s a bug about the environment?
New contributor
asabxkh74161835 gtptw0340 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1