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] follow-up work to enable exporting to onnx for PointRend (#4977) #5440

Merged
merged 28 commits into from
Jun 29, 2021

Conversation

AronLin
Copy link
Contributor

@AronLin AronLin commented Jun 24, 2021

This PR is the follow-up work to enable exporting to ONNX for PointRend.
The origin PR is #4977 and open-mmlab/mmcv#953.

Motivation

The origin PR completes the exporting work but we refactor the code logic for ONNX exporting.
So I completed the follow-up logic reconstruction work for PointRend.

Test

Here is the result:

Model Type box mAP box AP50 box AP75 mask mAP mask AP50 mask AP75
point_rend_r50_caffe_fpn_mstrain_1x_coco PyTorch 38.4 59.0 41.8 36.3 56.9 38.7
point_rend_r50_caffe_fpn_mstrain_1x_coco ONNX 38.4 59.0 41.8 35.2 56.5 37.1

It seems all right.

@AronLin AronLin requested a review from jshilong June 24, 2021 11:02
@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #5440 (d5ed09e) into master (269bb9e) will decrease coverage by 0.10%.
The diff coverage is 8.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5440      +/-   ##
==========================================
- Coverage   64.90%   64.80%   -0.11%     
==========================================
  Files         276      276              
  Lines       21347    21527     +180     
  Branches     3543     3562      +19     
==========================================
+ Hits        13856    13951      +95     
- Misses       6733     6820      +87     
+ Partials      758      756       -2     
Flag Coverage Δ
unittests 64.77% <8.64%> (-0.10%) ⬇️

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

Impacted Files Coverage Δ
...det/models/roi_heads/mask_heads/mask_point_head.py 31.53% <0.00%> (-1.18%) ⬇️
mmdet/models/roi_heads/standard_roi_head.py 50.31% <ø> (ø)
mmdet/models/roi_heads/test_mixins.py 57.25% <0.00%> (ø)
mmdet/models/roi_heads/point_rend_roi_head.py 16.09% <10.14%> (-3.54%) ⬇️
mmdet/models/detectors/single_stage.py 66.03% <0.00%> (-5.67%) ⬇️
mmdet/models/detectors/cornernet.py 94.87% <0.00%> (-5.13%) ⬇️
mmdet/models/dense_heads/corner_head.py 67.48% <0.00%> (-2.46%) ⬇️
mmdet/models/roi_heads/cascade_roi_head.py 74.69% <0.00%> (-1.68%) ⬇️
mmdet/models/backbones/ssd_vgg.py 64.44% <0.00%> (-1.47%) ⬇️
mmdet/models/backbones/darknet.py 57.69% <0.00%> (-1.29%) ⬇️
... and 14 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 269bb9e...d5ed09e. Read the comment docs.

@AronLin AronLin requested a review from jshilong June 25, 2021 11:28
@AronLin
Copy link
Contributor Author

AronLin commented Jun 26, 2021

The tests for single image inference, batch inference and ONNX inference have passed. The PR can be merged now.

@AronLin AronLin requested a review from ZwwWayne June 29, 2021 03:53
@ZwwWayne ZwwWayne merged commit 806263e into open-mmlab:master Jun 29, 2021
@AronLin AronLin deleted the onnx_point_rend branch July 6, 2021 06:06
@fschvart
Copy link

fschvart commented Apr 5, 2022

Hi, Thanks for all the hard work!
I've been going insane since I can't make the 3x schedule of PointRend convert to ONNX. Either I'm having issues with the grid_sample, or get other weird errors if I use TensorRT. Is it supposed to work? Am I missing anything?

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

Successfully merging this pull request may close these issues.

5 participants