dyh / unbox_yolov5_deepsort_counting

yolov5 deepsort 行人 车辆 跟踪 检测 计数
953 stars 243 forks source link

RuntimeError: "unfolded2d_copy" not implemented for 'Half' #3

Closed yuanjim closed 3 years ago

yuanjim commented 3 years ago

RuntimeError: "unfolded2d_copy" not implemented for 'Half' why?Did you meet this error before?Waiting your answer. Thanks.

dyh commented 3 years ago

你好,请复制粘贴提供整体的错误信息。 另外,请提供 pip list 环境信息。

dyh commented 3 years ago

补充,使用测试视频 /video/test.mp4 尝试一下。

yuanjim commented 3 years ago

main.py 使用的就是 /video/test.mp4

(yolov5deepsort) yuanjingdeMacBook-Pro:007_unbox_yolov5_deepsort_counting yuanjing$ python main.py /Users/yuanjing/Desktop/projects_list/0003_videodetection/007_unbox_yolov5_deepsort_counting/deep_sort/utils/parser.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.update(yaml.load(fo.read())) Fusing layers... Traceback (most recent call last): File "main.py", line 79, in bboxes = detector.detect(im) File "/Users/yuanjing/Desktop/projects_list/0003_videodetection/007_unbox_yolov5_deepsort_counting/detector.py", line 47, in detect pred = self.m(img, augment=False)[0] File "/opt/anaconda3/envs/yolov5deepsort/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, kwargs) File "/Users/yuanjing/Desktop/projects_list/0003_videodetection/007_unbox_yolov5_deepsort_counting/models/yolo.py", line 110, in forward return self.forward_once(x, profile) # single-scale inference, train File "/Users/yuanjing/Desktop/projects_list/0003_videodetection/007_unbox_yolov5_deepsort_counting/models/yolo.py", line 126, in forward_once x = m(x) # run File "/opt/anaconda3/envs/yolov5deepsort/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, *kwargs) File "/Users/yuanjing/Desktop/projects_list/0003_videodetection/007_unbox_yolov5_deepsort_counting/models/common.py", line 90, in forward return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1)) File "/opt/anaconda3/envs/yolov5deepsort/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(input, kwargs) File "/Users/yuanjing/Desktop/projects_list/0003_videodetection/007_unbox_yolov5_deepsort_counting/models/common.py", line 34, in fuseforward return self.act(self.conv(x)) File "/opt/anaconda3/envs/yolov5deepsort/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/opt/anaconda3/envs/yolov5deepsort/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 423, in forward return self._conv_forward(input, self.weight) File "/opt/anaconda3/envs/yolov5deepsort/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 420, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: "unfolded2d_copy" not implemented for 'Half'

dyh commented 3 years ago

你好,我没在mac os和win下测试过。 1、请尝试使用python3.6运行。 2、请尝试使用pip作为env运行。 3、请尝试在 ubuntu 18.04.5 下运行。 逐步排除问题。

dyh commented 3 years ago

https://github.com/ultralytics/yolov5/issues?q=+not+implemented+for+Half

你遇到的问题,可能是CPU运行yolov5的问题。建议在ubuntu 18.04.5 + CUDA 环境下运行。

dyh commented 3 years ago

你可以先测试一下 https://github.com/ultralytics/yolov5 能否正常运行。如果运行失败,先把这个搞定。再战deepSORT。祝好运。