-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Support Exporting Mask Rcnn to ONNX #1461
Support Exporting Mask Rcnn to ONNX #1461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks pretty good, thanks!
I'd like to have some more tests for the functions that have custom implementation for ONNX, so that we can enforce that they are not going to be broken in the future by changes to one function or another.
Codecov Report
@@ Coverage Diff @@
## master #1461 +/- ##
==========================================
- Coverage 64.34% 63.69% -0.66%
==========================================
Files 83 83
Lines 6454 6561 +107
Branches 992 1010 +18
==========================================
+ Hits 4153 4179 +26
- Misses 2006 2087 +81
Partials 295 295
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did one more pass, let me know what you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost good to go, thanks!
There is a lint failure, and I'd like to have one more test to make sure that the scripted model indeed captures control-flow as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot Lara!
Hi, i just wonder which version of torch and torchvison would be suitable for export maskrcnn to onnx. I tried the nightly version of both , but all failed |
@niaoyu, as explained in pytorch/pytorch#27969 there are some PRs that are not yet merged in PyTorch to export this model. |
In addition to #1401 , these are the last changes to export Maskrcnn to ONNX.
pytorch/pytorch#27566 and pytorch/pytorch#26549.
Like for Faster rcnn, for now we will only be able to export with a batch of 1 (until we support dynamic cases for split).
The test is disabled until the referenced PRs are merged and Resize is implemented in opset 11.