LCFractal / AIC21-MTMC

🏆The 1st place solution of track3 (City-Scale Multi-Camera Vehicle Tracking) in the NVIDIA AI City Challenge at CVPR 2021 Workshop.
MIT License
128 stars 35 forks source link

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

Closed Fish39171 closed 2 years ago

Fish39171 commented 2 years ago

出现以下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 commented 2 years ago

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

Fish39171 commented 2 years ago

感谢解答