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

[Algorithm] Support Rotated YOLOX (CVPR'21) #409

Draft
wants to merge 19 commits into
base: dev
Choose a base branch
from

Conversation

liuyanyi
Copy link
Collaborator

@liuyanyi liuyanyi commented Jul 20, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Add Rotated YOLOX

Modification

Add PseudoAngleCoder for fake angle coder.
Modify CSLCoder to support batch decode.
Add check in RotatedIoULoss.

  • Data Augs: Mosaic ([Feature] Support RMosaic #344), RandomAffine, Mixup
  • Assigner: RSimOTAAssigner
  • Implment Rotated YOLOX
  • Add Configs
  • Benchmark
  • Clean codes
  • Docstrings

Results:

Backbone Bbox Loss Type Size mAP FPS
Rotated YOLOX-s Rotated IoU (1024,1024) 74.36 53.1
Rotated YOLOX-s Horizontal IoU + CSL (1024,1024) 74.71 46.8
Rotated YOLOX-s KLD (1024,1024) 75.23 53.0

The first version result shows below, there may be overfitting, ap50 of trainval got 89.63 in 300 epoch.

This is your evaluation result for task 1 (VOC metrics):

mAP: 0.7435532290783282
ap of each class: plane:0.8780958621454715, baseball-diamond:0.8523726486265552, bridge:0.48577796804881723, ground-track-field:0.7209489491932876, small-vehicle:0.7379213591379805, large-vehicle:0.7762069597232262, ship:0.8860766108799067, tennis-court:0.9088239220397812, basketball-court:0.8713563781418765, storage-tank:0.8559916693386551, soccer-ball-field:0.6115551403568021, roundabout:0.6332357310796909, harbor:0.7671668106827375, swimming-pool:0.7290208638641967, helicopter:0.4387475629159394
COCO style result:

AP50: 0.7435532290783282
AP75: 0.5002562938590849
mAP: 0.4714755215823696

BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. The documentation has been modified accordingly, like docstring or example tutorials.

@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Attention: Patch coverage is 16.60517% with 452 lines in your changes missing coverage. Please review.

Project coverage is 28.63%. Comparing base (36de5f6) to head (08905cf).
Report is 24 commits behind head on dev.

Files Patch % Lines
mmrotate/datasets/pipelines/transforms.py 10.16% 159 Missing ⚠️
mmrotate/models/dense_heads/rotated_yolox_head.py 15.16% 151 Missing ⚠️
mmrotate/core/bbox/assigners/r_sim_ota_assinger.py 14.28% 72 Missing ⚠️
mmrotate/models/detectors/rotated_yolox.py 29.41% 36 Missing ⚠️
mmrotate/datasets/pipelines/loading.py 20.83% 19 Missing ⚠️
mmrotate/core/bbox/coder/angle_coder.py 50.00% 5 Missing ⚠️
mmrotate/core/bbox/transforms.py 16.66% 5 Missing ⚠️
mmrotate/models/losses/rotated_iou_loss.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #409      +/-   ##
==========================================
- Coverage   29.46%   28.63%   -0.84%     
==========================================
  Files         121      124       +3     
  Lines        8495     9032     +537     
  Branches     1289     1356      +67     
==========================================
+ Hits         2503     2586      +83     
- Misses       5891     6345     +454     
  Partials      101      101              
Flag Coverage Δ
unittests 28.60% <16.60%> (-0.84%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RangeKing
Copy link
Contributor

@liuyanyi Thanks for your contribution. May I ask where are the codes of custom_hooks?

@liuyanyi
Copy link
Collaborator Author

@liuyanyi Thanks for your contribution. May I ask where are the codes of custom_hooks?

The code for the hooks are in mmdet.
https://github.com/open-mmlab/mmdetection/tree/master/mmdet/core/hook

@RangeKing
Copy link
Contributor

@liuyanyi Thanks for your contribution. May I ask where are the codes of custom_hooks?

The code for the hooks are in mmdet.
https://github.com/open-mmlab/mmdetection/tree/master/mmdet/core/hook

Thanks a lot.

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