-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
error loading onnx model while reading it from opencv dnn module #24319
Copy link
Copy link
Closed
Labels
bugcategory: dnncategory: dnn (onnx)ONNX suport issues in DNN moduleONNX suport issues in DNN moduleconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
Milestone
Description
System Information
ubuntu 22.04
python 3.8
python 4.8.0
opset version = 14
Detailed description
Hello i have converted the raf-db-model_best.pth model into onnx for facial emotion recognition
i am able to read the model using onnxruntime and able to generate inference, but when read it using cv2.dnn.readNetFromONNX, it's throwing me error
OpenCV(4.8.0) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1083: error: (-2:Unspecified error) in function 'handleNode'
Node [Transpose@ai.onnx]:(onnx_node!/attn2/Transpose_1) parse error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/layers/permute_layer.cpp:162: error: (-215:Assertion failed) (int)_numAxes == inputs[0].size() in function 'getMemoryShapes'
can someone explain me how to solve this error?
Steps to reproduce
using cv2.readNetFromONNX("model_path")
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: dnncategory: dnn (onnx)ONNX suport issues in DNN moduleONNX suport issues in DNN moduleconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete