mmdetection3d icon indicating copy to clipboard operation
mmdetection3d copied to clipboard

[Feature] GT Augmentation Fade Strategy

Open AndyYuan96 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

gtaug fade training strategy is very useful, which can get large improvement in many paper, but the strategy haven't implemented in mmdetection3d, for example , training total epoch is 20, last 5 epoch don't use gtaug, we need first training for 15 epochs, and then ctrl-c the training process, and the use resume_from to training for other 5epoch without gtaug, the process is not convenient. So I change the code, so that we don't need ctrl-c and resume training.

Modification

I add a hook (EpochHook) to get current training epoch number, and use the number to update ObjectSample's cur_epoch , and I add a key (last_epoch) for ObjectSample, and I judge whether cur_epoch is larger than last_epoch in call function of ObjectionSample.

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)

first add custom_hooks = [dict(type='EpochHook')] to config file, and then set dict(type='ObjectSample', db_sampler=db_sampler, last_epoch=15) in config file, last_epoch=15 means we use gtaug util epoch 15, and epoch 16 will not use gtaug.

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.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

AndyYuan96 avatar Sep 20 '22 09:09 AndyYuan96

Codecov Report

Attention: Patch coverage is 31.81818% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 50.16%. Comparing base (9556958) to head (94f82a3). Report is 26 commits behind head on 1.0.

Files Patch % Lines
mmdet3d/core/utils/epoch_hook.py 27.02% 27 Missing :warning:
mmdet3d/datasets/pipelines/transforms_3d.py 50.00% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##              1.0    #1854      +/-   ##
==========================================
- Coverage   50.21%   50.16%   -0.05%     
==========================================
  Files         227      228       +1     
  Lines       19647    19690      +43     
  Branches     3198     3205       +7     
==========================================
+ Hits         9865     9878      +13     
- Misses       9192     9221      +29     
- Partials      590      591       +1     
Flag Coverage Δ
unittests 50.16% <31.81%> (-0.05%) :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 Sep 20 '22 13:09 codecov[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 21 '22 02:09 CLAassistant

Hi @AndyYuan96 , thanks for your contribution! Please fix the lint failure (by using pre-commit hook following this guide) and rebase your branch onto the dev instead of master. We typically merge new features into dev and dev-1.x for the stable and refactored version and then merge them into master and 1.x for the official release.

Tai-Wang avatar Sep 28 '22 01:09 Tai-Wang

Hi @AndyYuan96 !We are grateful for your efforts in helping improve this open-source project during your personal time. Welcome to join OpenMMLab Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA If you have a WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:) Thank you again for your contribution❤

OpenMMLab-Assistant005 avatar Apr 11 '23 14:04 OpenMMLab-Assistant005