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
DNN/ONNX: outputs registration regression, feature request for new version of Clip operator #21698
Comments
are you sure about this ? i checked your code using the however, i could NOT import the
while this works ok with a previous one (
there seems to be some regression here @cesarpgouveia , can you check the version again ? sure it's 4.5.5 ? |
Yes, if you load the onnx model to netron for example you will see that the input is channels last, you can check it on the image bellow:
I didn't tried with the tensorflow model but that might be a good option! I will try it today and get back to you.
Yes, it's release 4.5.5 with OpenVINO. |
yea, seems you're right about the onnx, would not have expected such fundamental differences between different exports of the same model.. however, this seems wrong:
you cant simply reshape from BCHW to BHWC, memory needs to be reshuffled (like a transpose or permute op)
|
Yes you are right, this needs to be reshuffled off course. However, the worst that could happen in this case is that the results would not match, however I get only nan, which suggests that the problem is something else I think. I tried using your approach:
I just changed dimensions and sz because I think they were swapped. Unfortunately I get the same output, a mat filled with nan. Do you have some more ideias on why this could be happening? And thank you very much for the help you are providing! |
I tried with the pb model and yes the inference runs with no problems. |
yep, just give it an input scale factor of 1.0/255, then it makes less noise (almost perfect mask) |
@rogday could you take a look on the issue. |
@cesarpgouveia, This network doesn't work on the current master for the following reasons:
|
System information (version)
Detailed description
I tried to infer using a Selfie Segmenter ONNX model (you can find the model here: https://github.com/PINTO0309/PINTO_model_zoo/tree/main/109_Selfie_Segmentation), however I get Nan on all output values.
Steps to reproduce
You can replicate this issue simply by running this simple script with OpenCV 4.5.5:
The model can be downloaded by the link I provided. This is the first "channels last" model that I use with OpenCVDNN, all my other models are channel first and I never had this code behavior before. I tried to access the mat and the contiguos memory array but neither of them worked.
Thanks,
César.
The text was updated successfully, but these errors were encountered: