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

[Feature] enable exporting to onnx for PointRend #953

Merged
merged 24 commits into from
Jun 11, 2021

Conversation

DmitriySidnev
Copy link

This PR enables exporting to ONNX for PointRend based models.

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #953 (84cd692) into master (d212bd5) will decrease coverage by 0.15%.
The diff coverage is 54.21%.

❗ Current head 84cd692 differs from pull request most recent head 152aa19. Consider uploading reports for the commit 152aa19 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #953      +/-   ##
==========================================
- Coverage   65.72%   65.56%   -0.16%     
==========================================
  Files         157      154       -3     
  Lines       10092     9950     -142     
  Branches     1828     1806      -22     
==========================================
- Hits         6633     6524     -109     
+ Misses       3113     3090      -23     
+ Partials      346      336      -10     
Flag Coverage Δ
unittests 65.56% <54.21%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmcv/ops/point_sample.py 44.02% <54.21%> (+24.02%) ⬆️
mmcv/tensorrt/__init__.py 50.00% <0.00%> (-10.00%) ⬇️
mmcv/tensorrt/init_plugins.py 43.75% <0.00%> (-6.25%) ⬇️
mmcv/ops/nms.py 56.42% <0.00%> (-5.21%) ⬇️
mmcv/runner/hooks/logger/base.py 68.93% <0.00%> (-1.95%) ⬇️
mmcv/runner/hooks/logger/wandb.py 68.75% <0.00%> (-0.95%) ⬇️
mmcv/runner/hooks/logger/mlflow.py 80.64% <0.00%> (-0.61%) ⬇️
mmcv/runner/hooks/logger/pavi.py 70.58% <0.00%> (-0.43%) ⬇️
mmcv/ops/deform_conv.py 61.76% <0.00%> (-0.28%) ⬇️
mmcv/cnn/__init__.py 100.00% <0.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d212bd5...152aa19. Read the comment docs.

@RunningLeon
Copy link
Collaborator

@DmitriySidnev To fix lint, could you merge master and push again?

@DmitriySidnev DmitriySidnev force-pushed the fix/pointrend_to_onnx branch from b46f0de to 7173a94 Compare April 22, 2021 09:38
@ZwwWayne ZwwWayne mentioned this pull request Apr 27, 2021
13 tasks
@DmitriySidnev DmitriySidnev force-pushed the fix/pointrend_to_onnx branch from b3fb41c to 2890900 Compare April 30, 2021 10:54
mmcv/ops/point_sample.py Show resolved Hide resolved
mmcv/ops/point_sample.py Show resolved Hide resolved
mmcv/ops/point_sample.py Show resolved Hide resolved
@ZwwWayne ZwwWayne mentioned this pull request May 14, 2021
9 tasks
@RunningLeon RunningLeon requested a review from ZwwWayne May 19, 2021 02:47
@zhouzaida zhouzaida mentioned this pull request May 26, 2021
11 tasks
@zhouzaida
Copy link
Collaborator

hi @DmitriySidnev , CI failed.

@DmitriySidnev
Copy link
Author

@zhouzaida, hi! I have merged master branch. Hope it helps. With onnxruntime==1.5.1 all onnx tests passed successfully.

@zhouzaida
Copy link
Collaborator

@zhouzaida, hi! I have merged master branch. Hope it helps. With onnxruntime==1.5.1 all onnx tests passed successfully.

got it

@DmitriySidnev
Copy link
Author

In the failed job build / build_cpu (3.7, 1.7.0) (pull_request) I can see the following lines:

Collecting onnxruntime==1.4.0
  Downloading onnxruntime-1.4.0-cp37-cp37m-manylinux2010_x86_64.whl (4.4 MB)

But this version of onnxruntime does not satisfy this statement.

@RunningLeon
Copy link
Collaborator

@DmitriySidnev You could find the reason why test_bilinear_grid_sample failed with torch==1.7.0 on cpu.

@DmitriySidnev
Copy link
Author

DmitriySidnev commented Jun 4, 2021

@RunningLeon, bilinear_grid_sample function fixed. In onnxruntime 1.5.1 onnx models obtained from pytorch 1.7.0 and 1.8.1 now work.

@RunningLeon
Copy link
Collaborator

@DmitriySidnev Thanks for the effort. Could you fix CI error? Thanks again.

@DmitriySidnev
Copy link
Author

@RunningLeon, the bilinear_grid_sample function fixed for pytorch < 1.8.

@RunningLeon
Copy link
Collaborator

kindly ping @ZwwWayne

@RunningLeon
Copy link
Collaborator

LGTM. Kindly ping @ZwwWayne

Copy link
Member

@RangiLyu RangiLyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants