Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCV dnn cv.dnn.readNetFromONNX #5999

Closed
wllwel opened this issue Mar 5, 2024 · 1 comment
Closed

OpenCV dnn cv.dnn.readNetFromONNX #5999

wllwel opened this issue Mar 5, 2024 · 1 comment
Labels
question Questions about ONNX

Comments

@wllwel
Copy link

wllwel commented Mar 5, 2024

Hi!

Question

I trained the U2net model on my own custom dataset.
I converted ".pth" file to ONNX file. The ONNX model I created works fine.
I converted ONNX file to Quantize ONNX file. It cannot read the file "u2net_quant.onnx" that I created.
(I tried the official U2net model and the same problem occurred)

The error information:

[ERROR:0@3.332] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp (909) cv::dnn::dnn4_v20211220::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 1 inputs and 3 outputs: [DynamicQuantizeLinear]:(input_quantized) from domain='ai.onnx'
Traceback (most recent call last):
File "F:/mallPycharmProjects/projects/test/test.py", line 90, in
net = cv.dnn.readNetFromONNX('onnx/official/u2net_official_conF.quantU.onnx')
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:928: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20211220::ONNXImporter::handleNode'

Node [DynamicQuantizeLinear@ai.onnx]:(input_quantized) parse error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:508: error: (-5:Bad argument) Blob inputscale not found in const blobs in function 'cv::dnn::dnn4_v20211220::ONNXImporter::getBlob'

System Information

Python 3.8.8
OpenCV version: '4.5.5'
windows 7

@wllwel wllwel added the question Questions about ONNX label Mar 5, 2024
@justinchuby
Copy link
Contributor

This would be a good question for opencv. Thanks!

@justinchuby justinchuby closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about ONNX
Projects
None yet
Development

No branches or pull requests

2 participants