-
Notifications
You must be signed in to change notification settings - Fork 98
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
运行detect.py时遇到了问题,这该怎么解决呢 #25
Comments
这个错误只要把OpenCV版本切换到4.2即可解决,但是又遇到了新问题如下,猜想会不会是因为torch的版本问题,我想将torch版本切换到1.6可是,提示我不能切换。 |
非常感谢您的解决方案,关于opencv的问题,只需要把getRotationMatrix2D参数改为int就可以了,就像作者说的后面的opencv可能不支持double |
Fusing layers...
Model Summary: 188 layers, 2.22122e+07 parameters, 0 gradients
image 1/1 D:\Weld inspection\YOLOv5\rotation-yolov5-master\inference\images\1.tif: Traceback (most recent call last):
File "D:\Weld inspection\YOLOv5\rotation-yolov5-master\detect.py", line 174, in
detect()
File "D:\Weld inspection\YOLOv5\rotation-yolov5-master\detect.py", line 79, in detect
pred = rotate_non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classes=opt.classes, agnostic=True)
File "D:\Weld inspection\YOLOv5\rotation-yolov5-master\utils\general.py", line 869, in rotate_non_max_suppression
i = nms(boxes, scores)
File "D:\Weld inspection\YOLOv5\rotation-yolov5-master\utils\general.py", line 797, in nms
rotate_ious = rotate_iou(max_iou_boxes[-1], sort_boxes[1:])
File "D:\Weld inspection\YOLOv5\rotation-yolov5-master\utils\general.py", line 710, in rotate_iou
r_b1 = get_rotated_coors(box1[i])
File "D:\Weld inspection\YOLOv5\rotation-yolov5-master\utils\general.py", line 729, in get_rotated_coors
R[:2] = cv2.getRotationMatrix2D(angle=-a*180/math.pi, center=(cx,cy), scale=1)
TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type
The text was updated successfully, but these errors were encountered: