Skip to content

Cannot load yolov8n-pose ONNX model #23464

@dizcza

Description

@dizcza

Descripe the feature and motivation

Ultralytics has just released Yolov8-pose estimation models. But I cannot load them in OpenCV DNN. It'd be really nice to support their models - I'm forced to use onnxruntime.

Here is the model I exported from their yolov8n-pose.pt with default parameters: yolov8n-pose.onnx

The error I'm getting:

  File "/home/dizcza/Projects/Airtouch/edgeai-yolov5/onnx_inference/yolo_pose_onnx_inference.py", line 148, in inference_video
    net = cv2.dnn.readNet(model_path)
cv2.error: OpenCV(4.7.0) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1073: error: (-2:Unspecified error) in function 'handleNode'
> Node [Reshape@ai.onnx]:(onnx_node!/model.22/dfl/Reshape) parse error: OpenCV(4.7.0) /io/opencv/modules/dnn/src/layers/reshape_layer.cpp:109: error: (-215:Assertion failed) total(srcShape, srcRange.start, srcRange.end) == maskTotal in function 'computeShapeByReshapeMask'

Additional context

I'm marking the issue as a feature request cause I'm aware of ONNX not fully supported by OpenCV DNN module.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions