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

关于自己 run sh gen_det.sh ${MCMT_CONFIG_FILE} #19

Closed
Fish39171 opened this issue Mar 5, 2022 · 2 comments
Closed

关于自己 run sh gen_det.sh ${MCMT_CONFIG_FILE} #19

Fish39171 opened this issue Mar 5, 2022 · 2 comments

Comments

@Fish39171
Copy link

出现以下Error:
image 1/2001 /home/fish/AIC21-MTMC/datasets/detection/images/test/S06/c043/img1/img000000.jpg: Traceback (most recent call last):
File "detect2img.py", line 235, in
detect()
File "detect2img.py", line 95, in detect
pred = model(img, augment=opt.augment)[0]
File "/home/fish/anaconda3/envs/aic21/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/fish/AIC21-MTMC/detector/yolov5/models/yolo.py", line 119, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/home/fish/AIC21-MTMC/detector/yolov5/models/yolo.py", line 135, in forward_once
x = m(x) # run
File "/home/fish/anaconda3/envs/aic21/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/fish/AIC21-MTMC/detector/yolov5/models/yolo.py", line 54, in forward
y[..., 2:4] = (y[..., 2:4] * 2) ** 2 * self.anchor_grid[i] # wh
RuntimeError: The size of tensor a (160) must match the size of tensor b (48) at non-singleton dimension 3

想请问一下我应该如何处理?

@LCFractal
Copy link
Owner

yolov5没有进行修改,现在的yolov5版本可能已经和之前的不一致了,请尝试我们在Google网盘里提供的yolov5x.pt预训练模型。你也可以尝试使用最新的yolov5代码替换检测器部分

@Fish39171
Copy link
Author

感谢解答

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

2 participants