-
-
Notifications
You must be signed in to change notification settings - Fork 55.7k
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
ONNX broken for identity function #25763
Comments
@Abdurrahheem could you take a look? |
Error cases are:
Let me explain one by one.
|
Do you mean that the errors for 0 and 1 dimensions are expected? I feels like a very bad bug to me, and it will leave ONNX integration in a broken state until fixed. So I hope this is not considered expected by OpenCV devs. OpenCV 4.10 is latest released version, so I am not sure how to test your hypothesis for 5.x without more help. Can you please confirm that this is fixed in 5.x? If that is the case I think it should be back-ported to 4.11 as well. |
0d/1d mat support is introduced since 5.x. It was a big patch and breaks some existing things. So maybe not a good idea to do a backport. |
@fengyuentau Ok good point. Is the fix for 3d input also not backwards compatible or can it be included in 4.x? |
The 3d issue is not handle yet in either branch. |
System Information
OpenCV python version: 4.10.0.82
PyTorch version: 2.0.0+cu117
Operating System / Platform: Ubuntu 22.04
Python version: 3.10.6
Detailed description
I have been having some issues with ONNX files lately.
Decided to check that the simplest function of them all works: the identity ...
Here is a script that shows for what input shapes ONNX is broken (0, 1 and 3 dimensional inputs).
I redirect stdout when exporting the ONNX file to make the output more readable.
I suspect that this is the underlying error to #25762
Steps to reproduce
which gives me the following output (format: Dimension, OK/ERROR, PyTorch/OpenCV, SourceShape, TargetShape)
As you can see, it's broken for 0, 1 and 3 dimensional inputs.
Issue submission checklist
The text was updated successfully, but these errors were encountered: