OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

TypeError: 'GroundingDINO' object is not callable

  • Thread starter Thread starter asabxkh74161835 gtptw0340
  • Start date Start date
A

asabxkh74161835 gtptw0340

Guest
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

Code:
(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=[caption])    
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?
<p>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.</p>
<blockquote>
<p>TypeError: 'GroundingDINO' object is not callable</p>
</blockquote>
<p>Here's my log</p>
<pre><code>(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=[caption])
TypeError: 'GroundingDINO' object is not callable
</code></pre>
<p>Any help will be appreciated.</p>
<p>I have download groundingdino, run it and met with same error again.
Is that means it's a bug about the environment?</p>
 
Top