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 can't load mask-rcnn onnx model, error(-212:Parsing error) #23058
Comments
It won't work even if your issue is solved: DNN does not support ONNX models with dynamic input shape (dynamic height & width). Try with exporting without |
I simplified the onnx model according to your comments. However, when I loaded the simplified model, the function threw a new error as follows:
I notice that a related problem has been raised in Issue, which has not been solved. Does this mean the mask-rcnn onnx model cannot be load with |
onnx-simplifier cannot work with your model.
I am afraid the answer is yes for now. However, the tensorflow one seems to work with dnn: https://github.com/opencv/opencv/wiki/Deep-Learning-in-OpenCV#tensorflow-1. You could take a look at this and meanwhile I will look into your problem. |
Maybe my file got corrupted while uploading to onedrive, you can try this, both onnx model and simplified model are in the compressed folder: |
Thanks for the simplified model! Although there seems to be only one issue when trying to read the model with opencv dnn, which is Could you share the pytorch mask-rcnn repo to me if possible? I would suggest removing the post-processing stage when exporting to ONNX model to get rid of non-supported operators for a quick fix. |
Thanks for you reply. I have publicized the pytorch mask-rcnn repo, which are available on https://github.com/GilbertPan97/MaskRCNN-Pytorch, and the dataset can be download on https://drive.google.com/file/d/14Ebfl0ojDB7xJqbqCk_1KELBtILrNCKU/view?usp=sharing You can decompress the dataset to the root directory and run the training script |
System Information
Environment:
Detailed description
Export pytorch model to onnx code:
Report error:
The report show Div_766 not found, however, I review my model on netron, Div_766 exists (as shown in fig). Moreover, I test my onnx model on python-onnx, it can work correctly.
Here is my mask-rcnn onnx model:
https://1drv.ms/u/s!ArseFaneAcYbwV2H1spjyCEcOsUZ?e=Cmu3Xj
Steps to reproduce
Issue submission checklist
The text was updated successfully, but these errors were encountered: