Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add MoCo v3 #194

Merged
merged 33 commits into from
Jan 31, 2022
Merged

Conversation

Jiahao000
Copy link
Collaborator

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

Add MoCo v3 algorithm to MMSelfSup

Modification

  • configs
  • metafile
  • readme
  • algorithms
  • backbone
  • neck
  • head
  • hook
  • utils
  • benchmark
  • unittest

BC-breaking (Optional)

Does the modification introduce changes that break the backward compatibility of the downstream repositories?
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

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.

@Jiahao000 Jiahao000 closed this Jan 30, 2022
@fangyixiao18 fangyixiao18 reopened this Jan 31, 2022
@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #194 (666ac0e) into dev_v0.6.0 (6a89f45) will increase coverage by 0.81%.
The diff coverage is 82.05%.

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_v0.6.0     #194      +/-   ##
==============================================
+ Coverage       63.78%   64.60%   +0.81%     
==============================================
  Files              95       99       +4     
  Lines            3413     3565     +152     
  Branches          547      572      +25     
==============================================
+ Hits             2177     2303     +126     
- Misses           1142     1163      +21     
- Partials           94       99       +5     
Flag Coverage Δ
unittests 64.60% <82.05%> (+0.81%) ⬆️

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

Impacted Files Coverage Δ
mmselfsup/models/heads/mocov3_head.py 57.14% <57.14%> (ø)
mmselfsup/models/algorithms/mocov3.py 74.35% <74.35%> (ø)
mmselfsup/models/utils/position_embedding.py 84.21% <84.21%> (ø)
mmselfsup/models/backbones/vision_transformer.py 90.47% <90.47%> (ø)
mmselfsup/core/hooks/__init__.py 100.00% <100.00%> (ø)
mmselfsup/core/hooks/momentum_update_hook.py 81.81% <100.00%> (ø)
mmselfsup/models/algorithms/__init__.py 100.00% <100.00%> (ø)
mmselfsup/models/backbones/__init__.py 100.00% <100.00%> (ø)
mmselfsup/models/heads/__init__.py 100.00% <100.00%> (ø)
mmselfsup/models/heads/cls_head.py 100.00% <100.00%> (ø)
... and 3 more

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 6a89f45...666ac0e. Read the comment docs.

@Jiahao000 Jiahao000 merged commit 51e98ec into open-mmlab:dev_v0.6.0 Jan 31, 2022
Jiahao000 added a commit that referenced this pull request Feb 2, 2022
* [Feature] Add MoCo v3 (#194)

* [Feature] add position embedding function

* [Fature] modify nonlinear neck for vit backbone

* [Feature] add mocov3 head

* [Feature] modify cls_head for vit backbone

* [Feature] add ViT backbone

* [Feature] add mocov3 algorithm

* [Docs] revise BYOL hook docstring

* [Feature] add mocov3 vit small config files

* [Feature] add mocov3 vit small linear eval config files

* [Fix] solve conflict

* [Fix] add mmcls

* [Fix] fix docstring format

* [Fix] fix isort

* [Fix] add mmcls to runtime requirements

* [Feature] remove duplicated codes

* [Feature] add mocov3 related unit test

* [Feature] revise position embedding function

* [Feature] add UT codes

* [Docs] add README.md

* [Docs] add model links and results to model zoo

* [Docs] fix model links

* [Docs] add metafile

* [Docs] modify install.md and add mmcls requirements

* [Docs] modify description

* [Fix] using specific arch name `mocov3-small`  rather than general arch name `small`

* [Fix] add mmcls

* [Fix] fix arch name

* [Feature] change name to `MoCoV3`

* [Fix] fix unit test bug

* [Feature] change `BYOLHook` name to `MomentumUpdateHook`

* [Feature] change name to MoCoV3

* [Docs] modify description

Co-authored-by: fangyixiao18 <fangyx18@hotmail.com>
Co-authored-by: Yixiao Fang <36138628+fangyixiao18@users.noreply.github.com>

* [Docs] update model zoo results (#195)

* Bump version to v0.6.0 (#198)

* [Docs] update model zoo results

* Bump version to v0.6.0

Co-authored-by: fangyixiao18 <fangyx18@hotmail.com>
Co-authored-by: Yixiao Fang <36138628+fangyixiao18@users.noreply.github.com>
@fangyixiao18 fangyixiao18 deleted the add-mocov3 branch February 10, 2022 09:37
@fangyixiao18 fangyixiao18 restored the add-mocov3 branch February 10, 2022 09:37
@fangyixiao18 fangyixiao18 deleted the add-mocov3 branch February 10, 2022 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants