Open pratap73 opened 1 year ago
@WanliZhong Could you take a look on it?
opencv-python-rolling 4.6.0.20221112
I think you should have a try with the lastest 4.7. You can either upgrade opencv-python-rolling or uninstall the old one then install opencv-python.
@pratap73 Thanks for your feedback. I think this is a bug. OpenCV parse the inputs of onnx_node!p2o.MatMul.2
as 1x8x1x15 matmul 0x8x15
. I will try to fix it.
update: the dim is 0
or -1
means it's a dynamic shape
@pratap73 I found that the input shape of this layer is dynamic, but currently OpenCV does not support this kind of model well. OpenCV 5.0 will solve such problems completely, so I think this issue will not be solved until 5.0 released.
System Information
OpenCV opencv-python-rolling 4.6.0.20221112 Operating System / Platform: Ubuntu 20.04 Python version: 3.9.12 onnx : 1.12
Detailed description
[ERROR:0@16.377] global onnx_importer.cpp:1051 handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [MatMul]:(onnx_node!p2o.MatMul.2) from domain='ai.onnx'
`OpenCV(4.7.0) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1073: error: (-2:Unspecified error) in function 'handleNode'
when i use ppocr v3 rec model using opencv dnn readnet the above error occurs, onnx model link is given below https://drive.google.com/file/d/1BdGV-wYzEKBGogmLwHBFkJGwHWTMUnDx/view?usp=sharing
although it worked fine with the onnxruntime.
Steps to reproduce
install ppocr from paddleocr github repo. export the recognition model into onnx format using paddle2onnx.
then use open.dnn.readnet(rec_model.onnx) you will get the error
Issue submission checklist