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

[Fix] Discard bboxes with sizes equals to min_bbox_size #5011

Merged
merged 1 commit into from
May 10, 2021
Merged

[Fix] Discard bboxes with sizes equals to min_bbox_size #5011

merged 1 commit into from
May 10, 2021

Conversation

yeliudev
Copy link
Contributor

As described in #5005, sometimes anchor heads may produce proposals with area == 0, which brings errors during mask prediction (masks can not be predicted when the areas of bboxes are 0). A possible solution is setting min_bbox_size to a value larger than 0, but I suggest simply discarding all the proposals with area == min_bbox_size in anchor heads directly.

@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #5011 (c6e1f5e) into master (911eb11) will increase coverage by 0.19%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5011      +/-   ##
==========================================
+ Coverage   65.48%   65.68%   +0.19%     
==========================================
  Files         257      257              
  Lines       19987    20080      +93     
  Branches     3419     3419              
==========================================
+ Hits        13088    13189     +101     
+ Misses       6186     6178       -8     
  Partials      713      713              
Flag Coverage Δ
unittests 65.64% <0.00%> (+0.19%) ⬆️

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

Impacted Files Coverage Δ
mmdet/models/dense_heads/cascade_rpn_head.py 24.34% <0.00%> (ø)
mmdet/models/dense_heads/ga_rpn_head.py 27.27% <0.00%> (ø)
mmdet/models/dense_heads/rpn_head.py 76.47% <0.00%> (+5.88%) ⬆️
mmdet/models/losses/ae_loss.py 100.00% <0.00%> (ø)
mmdet/models/losses/mse_loss.py 100.00% <0.00%> (ø)
mmdet/models/losses/smooth_l1_loss.py 100.00% <0.00%> (ø)
mmdet/core/bbox/coder/base_bbox_coder.py 100.00% <0.00%> (ø)
mmdet/models/roi_heads/mask_heads/maskiou_head.py 100.00% <0.00%> (ø)
.../models/roi_heads/mask_heads/feature_relay_head.py 100.00% <0.00%> (ø)
...models/roi_heads/mask_heads/fused_semantic_head.py 100.00% <0.00%> (ø)
... and 36 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 911eb11...c6e1f5e. Read the comment docs.

@yeliudev yeliudev mentioned this pull request May 6, 2021
13 tasks
@ZwwWayne
Copy link
Collaborator

ZwwWayne commented May 8, 2021

Hi @yeliudev ,
Thanks for the PR. Could you verify the testing performance of related models on the COCO dataset?
Also, since it modifies RPN head and may affect ONNX exportation, could you also check whether it could export Faster RCNN ONNX models correctly in this PR? You can follow this doc.

@yeliudev
Copy link
Contributor Author

yeliudev commented May 9, 2021

I've tested the following models and all the results remain unchanged. The ONNX export also works correctly because this PR does not change its behaviors.

Model Original mAP New mAP
Faster R-CNN 37.4 37.4
Libra R-CNN 38.3 38.3
Cascade R-CNN 40.3 40.3
Mask R-CNN 38.2 / 34.7 38.2 / 34.7
Cascade Mask R-CNN 41.2 / 35.9 41.2 / 35.9
PointRend 38.4 / 36.3 38.4 / 36.3

@ZwwWayne ZwwWayne merged commit 6f6c228 into open-mmlab:master May 10, 2021
@ZwwWayne
Copy link
Collaborator

ZwwWayne commented May 10, 2021

This PR is related to post-processing. FYI @jshilong

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

Successfully merging this pull request may close these issues.

None yet

2 participants