Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo script running issue #19

Open
liang315 opened this issue Nov 29, 2024 · 0 comments
Open

Demo script running issue #19

liang315 opened this issue Nov 29, 2024 · 0 comments

Comments

@liang315
Copy link

liang315 commented Nov 29, 2024

Do I need to modify the configuration file when running the demo script? I encountered this error

python demo.py --config-file .\configs\VLDet_OVCOCO_CLIP_R50_1x_caption.yaml --input .\heatmap_inputs\000000059598.jpg --output .\demo_outputs\ --vocabulary coco --opts MODEL.WEIGHTS models/coco_vldet.pth
Traceback (most recent call last):
  File "E:\VLDet\VLDet\demo.py", line 152, in <module>
    predictions, visualized_output = demo.run_on_image(img)
  File "E:\VLDet\VLDet\vldet\predictor.py", line 84, in run_on_image
    predictions = self.predictor(image)
  File "E:\VLDet\VLDet\detectron2\detectron2\engine\defaults.py", line 317, in __call__
    predictions = self.model([inputs])[0]
  File "E:\anaconda3\envs\VLDet\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "E:\VLDet\VLDet\vldet\modeling\meta_arch\custom_rcnn.py", line 111, in forward
    return self.inference(batched_inputs)
  File "E:\VLDet\VLDet\vldet\modeling\meta_arch\custom_rcnn.py", line 96, in inference
    results, _ = self.roi_heads(images, features, proposals)
  File "E:\anaconda3\envs\VLDet\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "E:\VLDet\VLDet\vldet\modeling\roi_heads\vldet_roi_heads.py", line 230, in forward
    features, proposals, classifier_info=classifier_info)
  File "E:\VLDet\VLDet\vldet\modeling\roi_heads\vldet_roi_heads.py", line 121, in _forward_box
    ann_type=ann_type, classifier_info=classifier_info)
  File "E:\VLDet\VLDet\vldet\modeling\roi_heads\vldet_roi_heads.py", line 331, in _run_stage
    classifier_info=classifier_info)
  File "E:\anaconda3\envs\VLDet\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "E:\VLDet\VLDet\vldet\modeling\roi_heads\vldet_fast_rcnn.py", line 1604, in forward
    cls_scores, proj_region, zs_weight = self.cls_score(x, ann_type)
  File "E:\anaconda3\envs\VLDet\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "E:\VLDet\VLDet\vldet\modeling\roi_heads\zero_shot_classifier.py", line 135, in forward
    x = torch.mm(proj_x, zs_weight)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (256x1024 and 512x1204)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant