mmrotate icon indicating copy to clipboard operation
mmrotate copied to clipboard

[Draft] Support DAL model

Open heiyuxiaokai opened this issue 2 years ago • 4 comments

Reproduce codes in mmrotate of DAL——《Dynamic Anchor Learning for Arbitrary-Oriented Object Detection》 paper: https://arxiv.org/abs/2012.04150 origin codes: https://github.com/ming71/DAL

Motivation

There are still some performance gaps with origin codes:

  1. Performance on the train-val set is lower than in other methods.
  2. Performance on the test set is lower than given in the paper.

Results on train-val:

method schedule bs data aug mAP
DAL 1x 2 - 68.77
DAL 2x 2 - 75.5
DAL 3x 2 - 77.7
DAL 3x 2 rr 76.5
DAL 3x 2 ms+rr -

Results on test:

method schedule bs data aug mAP
DAL 3x 2 - 69.21
DAL 3x 2 rr 69.99

It would be great if someone could give me some advice.

Modification

  • [x] support DAL
  • [ ] Benchmark the performance
  • [ ] Prepare and release the models
  • [ ] Prepare a docstrings

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.

heiyuxiaokai avatar Jul 12 '22 13:07 heiyuxiaokai

Codecov Report

Merging #407 (2c4c119) into dev (36de5f6) will decrease coverage by 0.19%. The diff coverage is 20.91%.

@@            Coverage Diff             @@
##              dev     #407      +/-   ##
==========================================
- Coverage   29.46%   29.27%   -0.20%     
==========================================
  Files         121      126       +5     
  Lines        8495     8691     +196     
  Branches     1289     1326      +37     
==========================================
+ Hits         2503     2544      +41     
- Misses       5891     6046     +155     
  Partials      101      101              
Flag Coverage Δ
unittests 29.24% <20.91%> (-0.20%) :arrow_down:

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

Impacted Files Coverage Δ
mmrotate/core/bbox/assigners/dal_assigner.py 14.08% <14.08%> (ø)
...tate/models/dense_heads/rotated_dal_retina_head.py 14.14% <14.14%> (ø)
mmrotate/core/hook/set_epoch_info_hook.py 45.45% <45.45%> (ø)
mmrotate/models/detectors/rotated_dal_retinanet.py 66.66% <66.66%> (ø)
mmrotate/core/__init__.py 100.00% <100.00%> (ø)
mmrotate/core/bbox/assigners/__init__.py 100.00% <100.00%> (ø)
mmrotate/core/hook/__init__.py 100.00% <100.00%> (ø)
mmrotate/models/dense_heads/__init__.py 100.00% <100.00%> (ø)
mmrotate/models/detectors/__init__.py 100.00% <100.00%> (ø)

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 36de5f6...2c4c119. Read the comment docs.

codecov[bot] avatar Jul 12 '22 13:07 codecov[bot]

Thank you for your PR, it's awesome!

zytx121 avatar Jul 13 '22 07:07 zytx121

Thank you very much for your great contributions. As described in the original paper, 30k iterations have been applied for training DAL on DOTA dataset. random flip, rotation, and HSV color space transformation for data augmentation. What's more, the image splitting strategy is also different from the default setting in mmrotate, which is 800 x 800 with 200 overlaps. You can first align the training set with the DAL code.

jbwang1997 avatar Jul 18 '22 14:07 jbwang1997

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Mar 02 '24 09:03 CLAassistant