Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

When I export the yolov5n.pt to yolov5n.onnx ,something goes wrong #24

Open
an1ya1 opened this issue Nov 10, 2023 · 0 comments
Open

When I export the yolov5n.pt to yolov5n.onnx ,something goes wrong #24

an1ya1 opened this issue Nov 10, 2023 · 0 comments

Comments

@an1ya1
Copy link

an1ya1 commented Nov 10, 2023

[ERROR:[email protected]] 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 [[email protected]]:(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'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant