mmrotate icon indicating copy to clipboard operation
mmrotate copied to clipboard

[Algorithm] Support Rotated YOLOX (CVPR'21)

Open liuyanyi opened this issue 3 years ago • 4 comments

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.

  • [x] Data Augs: Mosaic (#344), RandomAffine, Mixup
  • [x] Assigner: RSimOTAAssigner
  • [x] Implment Rotated YOLOX
  • [x] Add Configs
  • [x] 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.

liuyanyi avatar Jul 20 '22 04:07 liuyanyi

Codecov Report

Attention: Patch coverage is 16.60517% with 452 lines in your changes are 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 :warning:
mmrotate/models/dense_heads/rotated_yolox_head.py 15.16% 151 Missing :warning:
mmrotate/core/bbox/assigners/r_sim_ota_assinger.py 14.28% 72 Missing :warning:
mmrotate/models/detectors/rotated_yolox.py 29.41% 36 Missing :warning:
mmrotate/datasets/pipelines/loading.py 20.83% 19 Missing :warning:
mmrotate/core/bbox/coder/angle_coder.py 50.00% 5 Missing :warning:
mmrotate/core/bbox/transforms.py 16.66% 5 Missing :warning:
mmrotate/models/losses/rotated_iou_loss.py 0.00% 5 Missing :warning:
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%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 20 '22 04:07 codecov[bot]

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

RangeKing avatar Aug 16 '22 15:08 RangeKing

@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

liuyanyi avatar Aug 17 '22 00:08 liuyanyi

@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.

RangeKing avatar Aug 17 '22 01:08 RangeKing