-
Notifications
You must be signed in to change notification settings - Fork 70
When I export the yolov5n.pt to yolov5n.onnx ,something goes wrong #24
Description
[ERROR:0@1.984] global onnx_importer.cpp:1061 handleNode DNN/ONNX: ERROR during processing node with 1 inputs and 1 outputs: [Floor]:(onnx_node!/model.11/Floor) from domain='ai.onnx'
Traceback (most recent call last):
File "/home/shenyexiang/yolo_v5/devel/lib/yolov5_ros/detect.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/shenyexiang/yolo_v5/src/yolov5_ros/src/detect.py", line 198, in
detector = Yolov5Detector()
File "/home/shenyexiang/.local/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/shenyexiang/.local/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 129, in
func = cast(F, lambda *args, **kwargs: orig_func(*args, **kwargs))
File "/home/shenyexiang/yolo_v5/src/yolov5_ros/src/detect.py", line 52, in init
self.model = DetectMultiBackend(weights, device=self.device, dnn=rospy.get_param("~dnn"), data=rospy.get_param("~data"))
File "/home/shenyexiang/yolo_v5/src/yolov5_ros/src/yolov5/models/common.py", line 353, in init
net = cv2.dnn.readNetFromONNX("/home/shenyexiang/yolo_v5/src/yolov5_ros/src/yolov5/weights/yolov5n.onnx")
cv2.error: OpenCV(4.8.1) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1083: error: (-2:Unspecified error) in function 'handleNode'
Node [Floor@ai.onnx]:(onnx_node!/model.11/Floor) parse error: OpenCV(4.8.1) /io/opencv/modules/dnn/src/layers/elementwise_layers.cpp:260: error: (-215:Assertion failed) src.size == dst.size && src.type() == dst.type() && src.isContinuous() && dst.isContinuous() && src.type() == CV_32F in function 'forward'