GroundingDINO icon indicating copy to clipboard operation
GroundingDINO copied to clipboard

Error while demo

Open MetehanYasar11 opened this issue 1 year ago • 1 comments

I installed and passed every installition steps without any error but i get this error below

/GroundingDINO/ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only! warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!") /home/metehan/.pyenv/versions/3.8.12/envs/dino_deneme/lib/python3.8/site-packages/torch/functional.py:568: 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:2228.) 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 "demo/inference_on_a_image.py", line 202, in model, image, text_prompt, box_threshold, text_threshold, cpu_only=args.cpu_only, token_spans=eval(token_spans) TypeError: eval() arg 1 must be a string, bytes or code object

also with python demo script which is provided, i get this error

Exception has occurred: NameError name '_C' is not defined File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 53, in forward output = _C.ms_deform_attn_forward( File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 338, in forward output = MultiScaleDeformableAttnFunction.apply( File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py", line 785, in forward src2 = self.self_attn( File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py", line 576, in forward output = checkpoint.checkpoint( File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py", line 258, in forward memory, memory_text = self.encoder( File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py", line 327, in forward hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer( File "/home/metehan/dino_deneme/GroundingDINO/groundingdino/util/inference.py", line 68, in predict outputs = model(image[None], captions=[caption]) File "/home/metehan/dino_deneme/GroundingDINO/inder.py", line 12, in boxes, logits, phrases = predict( NameError: name '_C' is not defined

MetehanYasar11 avatar Nov 03 '23 14:11 MetehanYasar11

Seeing the same issue here. Installed per the VRB repo (https://github.com/shikharbahl/vrb).

Edit: Seems this issue is common. Will see the other posts and check back.

ishan-gaur avatar Dec 05 '23 06:12 ishan-gaur