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

When I inference with single class, e.g.,person, got this error #18

Open
zxq309 opened this issue Dec 15, 2021 · 1 comment
Open

When I inference with single class, e.g.,person, got this error #18

zxq309 opened this issue Dec 15, 2021 · 1 comment

Comments

@zxq309
Copy link

zxq309 commented Dec 15, 2021

Traceback (most recent call last):
File "clip_object_tracker.py", line 360, in
detect()
File "clip_object_tracker.py", line 160, in detect
pred = yolov5_engine.infer(img)
File "/home/zx/zero-shot-object-tracking/utils/yolov5.py", line 16, in infer
pred = self.model(img, augment=self.augment)[0]
File "/home/zx/anaconda3/envs/roboflow/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/zx/zero-shot-object-tracking/models/yolo.py", line 123, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/home/zx/zero-shot-object-tracking/models/yolo.py", line 139, in forward_once
x = m(x) # run
File "/home/zx/anaconda3/envs/roboflow/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/zx/zero-shot-object-tracking/models/common.py", line 120, in forward
return torch.cat(x, self.d)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 30 but got size 29 for tensor number 1 in the list.

@zxq309
Copy link
Author

zxq309 commented Dec 15, 2021

I set --img-size to 1280 or 1536 got same errors, but set default img-size 640 could run successfully, please help me how to change inference image size

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