GlassyWing / yolo_deepsort

Fast MOT base on yolo+deepsort, support yolo3 and yolo4
GNU General Public License v3.0
55 stars 13 forks source link

运行video_deepsort.py错误RuntimeError: "unfolded2d_copy" not implemented for 'Half' #8

Closed flameoffirefly closed 4 years ago

flameoffirefly commented 4 years ago

您好,我尝试yolov3-tiny,yolov4,yolov4-tiny都出现同样的问题,请问能否指点下,错误具体如下: Traceback (most recent call last): File "video_deepsort.py", line 50, in skip_secs=0): File "/root/yolo_deepsort/yolo3/detect/video_detect.py", line 141, in detect detections = self.image_detector.detect(frame) File "/root/yolo_deepsort/yolo3/detect/img_detect.py", line 85, in detect detections = self.model(image) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/root/yolo_deepsort/yolo3/models/models.py", line 299, in forward x = module(x) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, *kwargs) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/torch/nn/modules/container.py", line 100, in forward input = module(input) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(input, kwargs) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 349, in forward return self._conv_forward(input, self.weight) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 346, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: "unfolded2d_copy" not implemented for 'Half' terminate called without an active exception Aborted (core dumped)

GlassyWing commented 4 years ago

CPU下或某些型号的GPU不支持半精度模式运行,尝试将half参数设为False

flameoffirefly commented 4 years ago

您好,我后来用GPU解决了上面问题,但是出现了cv2.error: OpenCV(4.3.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor',我的检测视频是没问题的,错误具体如下: Exception in thread Thread-1: Traceback (most recent call last): File "/root/anaconda3/envs/python377/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/root/anaconda3/envs/python377/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/imutils/video/filevideostream.py", line 67, in update frame = self.transform(frame) File "/root/yolo_deepsort/yolo3/detect/video_detect.py", line 34, in _transform return cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(4.3.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' 我的检测视频路径是'/root/yolo_deepsort/det2.avi',输出路径'/root/yolo_deepsort/output_yolov3.avi',应该不是路径问题吧,请大佬指点一二,非常感谢!

GlassyWing commented 4 years ago

您好,我后来用GPU解决了上面问题,但是出现了cv2.error: OpenCV(4.3.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor',我的检测视频是没问题的,错误具体如下: Exception in thread Thread-1: Traceback (most recent call last): File "/root/anaconda3/envs/python377/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/root/anaconda3/envs/python377/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/root/anaconda3/envs/python377/lib/python3.7/site-packages/imutils/video/filevideostream.py", line 67, in update frame = self.transform(frame) File "/root/yolo_deepsort/yolo3/detect/video_detect.py", line 34, in _transform return cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(4.3.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' 我的检测视频路径是'/root/yolo_deepsort/det2.avi',输出路径'/root/yolo_deepsort/output_yolov3.avi',应该不是路径问题吧,请大佬指点一二,非常感谢!

错误表明opencv未发现视频,请检查视频路径是否正确

flameoffirefly commented 4 years ago

您好,我原来在服务器上可以运行没问题,在Jetsonnano上部署运行,出现这样的错误,不知道怎么解决,再次打扰了: Traceback (most recent call last): File "video_deepsort.py", line 49, in skip_secs=0): File "/home/xwx/code/yolo_deepsort/yolo3/detect/video_detect.py", line 157, in detect detections = self.tracker.update(boxs.float(), confidences, frame, class_ids) File "/home/xwx/code/yolo_deepsort/deep_sort/deep_sort.py", line 61, in update self.tracker.update(detections) File "/home/xwx/code/yolo_deepsort/deep_sort/sort/tracker.py", line 149, in update updated_means, updated_covs = self.kf.update(matched_track_means, matched_track_covs, matched_measures) File "/home/xwx/code/yolo_deepsort/deep_sort/sort/kalman_filter.py", line 192, in update kalman_gain = torch.solve(torch.matmul(covariance, self._update_mat).permute(0, 2, 1), projected_cov)[ RuntimeError: solve: MAGMA library not found in compilation. Please rebuild with MAGMA. 感谢您!

GlassyWing commented 4 years ago

RuntimeError: solve: MAGMA library not found in compilation. Please rebuild with MAGMA.

该问题已在https://github.com/pytorch/pytorch/issues/27053进行过讨论,请参考