mmpretrain icon indicating copy to clipboard operation
mmpretrain copied to clipboard

[Feature] Add MobileOne Backbone

Open Ezra-Yu opened this issue 3 years ago • 2 comments

Motivation

Add MobileOne backbone, Paper Github

Note

Because the official repo. does not give a strategy for training and testing, the test data pipline of RepVGG is used here, and the result is about 0.1 lower than the official one. Refer to this issue.

Use cases (Optional)

    Example:
        >>> from mmcls.models import MobileOne
        >>> import torch
        >>> model = MobileOne("s0", out_indices=(0, 1, 2, 3))
        >>> model.eval()
        >>> x = torch.rand(1, 3, 224, 224)
        >>> outputs = model(x)
        >>> for out in outputs:
        ...     print(tuple(out.shape))
        (1, 48, 56, 56)
        (1, 128, 28, 28)
        (1, 256, 14, 14)
        (1, 1024, 7, 7)

Checklist

Before PR:

  • [ ] Pre-commit or other linting tools are used to fix the potential lint issues.
  • [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • [ ] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • [ ] 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.

Ezra-Yu avatar Aug 12 '22 03:08 Ezra-Yu

Codecov Report

Base: 86.09% // Head: 86.31% // Increases project coverage by +0.21% :tada:

Coverage data is based on head (37678d7) compared to base (517bd3d). Patch coverage: 94.50% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #966      +/-   ##
==========================================
+ Coverage   86.09%   86.31%   +0.21%     
==========================================
  Files         140      141       +1     
  Lines        9676     9876     +200     
  Branches     1677     1717      +40     
==========================================
+ Hits         8331     8524     +193     
- Misses       1092     1095       +3     
- Partials      253      257       +4     
Flag Coverage Δ
unittests 86.23% <94.50%> (+0.19%) :arrow_up:

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

Impacted Files Coverage Δ
mmcls/models/backbones/mobileone.py 94.47% <94.47%> (ø)
mmcls/models/backbones/__init__.py 100.00% <100.00%> (ø)
mmcls/datasets/builder.py 87.83% <0.00%> (+4.05%) :arrow_up:
mmcls/utils/setup_env.py 100.00% <0.00%> (+4.54%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Aug 12 '22 03:08 codecov[bot]

Please add it to the model-zoo.md and models.rst.

mzr1996 avatar Sep 05 '22 01:09 mzr1996

close it due to the branch dev-a.x have supported it.

Ezra-Yu avatar Dec 15 '22 04:12 Ezra-Yu