mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

[WIP] Add swinv2 upernet

Open rznas opened this issue 3 years ago • 2 comments
trafficstars

Motivation

Add SWinV2 backbone for UPerNet implementation #1778

Because of the minor changes introduce by the paper, It's preferred to inherit SWinV2 from SWin implementation.

Swin Transformer V2: Scaling Up Capacity and Resolution image

Modification

  • Edit SWin backbone for compatibility and use as abstract class (diff is somehow irrelevant, please compare two version side-by-side 😅)
  • Add SWinV2 class based on SWin (The code added is based on Official Repo)

BC-breaking (Optional)

No

Checklist

  • [x] Pre-commit or other linting tools are used to fix the potential lint issues.
  • [ ] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • [ ] If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D.
  • [ ] The documentation has been modified accordingly, like docstring or example tutorials.

rznas avatar Jul 17 '22 14:07 rznas

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 17 '22 14:07 CLAassistant

Codecov Report

Base: 88.97% // Head: 88.05% // Decreases project coverage by -0.92% :warning:

Coverage data is based on head (4134e51) compared to base (77dbecd). Patch coverage: 13.15% of modified lines in pull request are covered.

:exclamation: Current head 4134e51 differs from pull request most recent head 67781d9. Consider uploading reports for the commit 67781d9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1789      +/-   ##
==========================================
- Coverage   88.97%   88.05%   -0.93%     
==========================================
  Files         146      145       -1     
  Lines        8747     8739       -8     
  Branches     1474     1473       -1     
==========================================
- Hits         7783     7695      -88     
- Misses        722      804      +82     
+ Partials      242      240       -2     
Flag Coverage Δ
unittests 88.05% <13.15%> (-0.93%) :arrow_down:

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

Impacted Files Coverage Δ
mmseg/models/backbones/swinv2.py 0.00% <0.00%> (ø)
mmseg/models/backbones/swin.py 83.90% <93.75%> (+0.28%) :arrow_up:
mmseg/apis/inference.py 61.66% <0.00%> (-2.40%) :arrow_down:
mmseg/models/decode_heads/decode_head.py 92.63% <0.00%> (-0.83%) :arrow_down:
mmseg/datasets/pipelines/transforms.py 98.06% <0.00%> (-0.78%) :arrow_down:
mmseg/models/segmentors/cascade_encoder_decoder.py 94.59% <0.00%> (-0.15%) :arrow_down:
mmseg/core/evaluation/metrics.py 93.61% <0.00%> (-0.07%) :arrow_down:
mmseg/models/decode_heads/knet_head.py 93.71% <0.00%> (-0.04%) :arrow_down:
mmseg/datasets/__init__.py 100.00% <0.00%> (ø)
mmseg/models/losses/__init__.py 100.00% <0.00%> (ø)
... and 5 more

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 Jul 18 '22 04:07 codecov[bot]