mmpretrain icon indicating copy to clipboard operation
mmpretrain copied to clipboard

Add ImgAug library.

Open ColdMe opened this issue 2 years ago • 2 comments

Motivation

Supports ImgAug library to enrich MMClassification augmentation methods.

Modification

A new class, Imgaug, is added in mmcls/datasets/pipelines/transforms.py. Similar to the function of 'Albu' class, Imgaug could empower developers to directly utilize the ImgAug library when working with MMClassification.

In fact, these codes are revised from MMAction2. Specifically, I changed the input from videos to images, and removed lines of dealing with bboxes.

Checklist

Before PR:

  • [x] Pre-commit or other linting tools are used to fix the potential lint issues.
  • [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • [x] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • [x] The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • [ ] If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • [ ] CLA has been signed and all committers have signed the CLA in this PR.

ColdMe avatar Apr 13 '22 13:04 ColdMe

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 13 '22 13:04 CLAassistant

Codecov Report

Merging #781 (c185ee0) into dev (02c8f82) will decrease coverage by 0.81%. The diff coverage is 19.51%.

@@            Coverage Diff             @@
##              dev     #781      +/-   ##
==========================================
- Coverage   86.95%   86.14%   -0.82%     
==========================================
  Files         127      127              
  Lines        8071     8161      +90     
  Branches     1390     1409      +19     
==========================================
+ Hits         7018     7030      +12     
- Misses        848      921      +73     
- Partials      205      210       +5     
Flag Coverage Δ
unittests 86.10% <19.51%> (-0.77%) :arrow_down:

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

Impacted Files Coverage Δ
mmcls/datasets/pipelines/transforms.py 82.92% <19.51%> (-5.35%) :arrow_down:
mmcls/models/utils/helpers.py 79.16% <0.00%> (-20.84%) :arrow_down:
mmcls/models/utils/embed.py 65.33% <0.00%> (-14.67%) :arrow_down:
mmcls/models/backbones/swin_transformer.py 87.92% <0.00%> (-4.06%) :arrow_down:
mmcls/datasets/builder.py 89.55% <0.00%> (-1.50%) :arrow_down:
mmcls/core/visualization/image.py 86.20% <0.00%> (-0.98%) :arrow_down:
mmcls/models/utils/__init__.py 100.00% <0.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 5a67bc8...c185ee0. Read the comment docs.

codecov[bot] avatar Apr 14 '22 08:04 codecov[bot]

I'm sorry to inform you that the previous master(dev) branch has been abandoned, and therefore, this pull request (PR) based on the master(dev) branch will be closed.

We have integrated the previous mmcls and mmselfsup into a new repo named mmpretrain, and you are welcome to use it.

Ezra-Yu avatar Apr 07 '23 03:04 Ezra-Yu

Hi @ColdMe!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❤ @ColdMe

OpenMMLab-Assistant003 avatar Apr 12 '23 08:04 OpenMMLab-Assistant003