[Feature] Add TIMM and HuggingFace wrappers to build classifiers from them directly.#1102
Merged
mzr1996 merged 6 commits intoopen-mmlab:dev-1.xfrom Nov 10, 2022
Merged
[Feature] Add TIMM and HuggingFace wrappers to build classifiers from them directly.#1102mzr1996 merged 6 commits intoopen-mmlab:dev-1.xfrom
mzr1996 merged 6 commits intoopen-mmlab:dev-1.xfrom
Conversation
Codecov ReportBase: 0.02% // Head: 90.19% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1102 +/- ##
============================================
+ Coverage 0.02% 90.19% +90.17%
============================================
Files 121 140 +19
Lines 8217 10383 +2166
Branches 1368 1645 +277
============================================
+ Hits 2 9365 +9363
+ Misses 8215 798 -7417
- Partials 0 220 +220
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
okotaku
reviewed
Oct 19, 2022
mzr1996
added a commit
to mzr1996/mmpretrain
that referenced
this pull request
Nov 24, 2022
… them directly. (open-mmlab#1102) * [Feature] Add TIMM and HuggingFace wrappers to build classifiers from them directly. * Support `with_cp` and add docstring. * Add unit tests. * Update CI. * Update docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Pytorch-image-models and HuggingFace are famous model hubs, this PR can integrate their models in mmcls and use mmcls to train and inference models come from timm and huggingface directly.
Use cases
To train a model from TIMM
For example, to train a ResNet-50 model from timm with our vit-mae schedule.
Use config file as below
To fine-tune a model from hugging-face
For example, to fine-tune a ResNet-50 model from hugging face on CIFAR dataset.
Use config file as below
To inference a TIMM model
To inference a HuggingFace model
Checklist
Before PR:
After PR: