Commit Graph

33 Commits (1ee9bbe0508ce2ec83058559e24c3bfa95d1f32e)

Author SHA1 Message Date
Yixiao Fang 89000c10eb
[Refactor] Refactor configs and metafile (#1369)
* update base datasets

* update base

* update barlowtwins

* update with new convention

* update

* update

* update

* add schedule

* add densecl

* add eva

* add mae

* add maskfeat

* add milan and mixmim

* add moco

* add swav simclr

* add simmim and simsiam

* refine

* update

* add to model index

* update config inheritance

* fix error in metafile

* Update pre-commit and metafile check script

* update metafile

* fix name error

* Fix classification model name and config name

---------

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-02-23 11:17:16 +08:00
aso538 6b9e2b55dd
[Feature] Support LeViT backbone. (#1238)
* 网络搭建完成、能正常推理

* 网络搭建完成、能正常推理

* 网络搭建完成、能正常推理

* 添加了模型转换未验证,配置文件 但有无法运行

* 模型转换、结构验证完成,可以推理出正确答案

* 推理精度与原论文一致 已完成转化

* 三个方法改为class 暂存

* 完成推理精度对齐 误差0.04

* 暂时使用的levit2mmcls

* 训练跑通,训练相关参数未对齐

* '训练相关参数对齐'参数'

* '修复训练时验证导致模型结构改变无法复原问题'

* '修复训练时验证导致模型结构改变无法复原问题'

* '添加mixup和labelsmooth'

* '配置文件补齐'

* 添加模型转换

* 添加meta文件

* 添加meta文件

* 删除demo.py测试文件

* 添加模型README文件

* docs文件回滚

* model-index删除末行空格

* 更新模型metafile

* 更新metafile

* 更新metafile

* 更新README和metafile

* 更新模型README

* 更新模型metafile

* Delete the model class and get_LeViT_model methods in the mmcls.models.backone.levit file

* Change the class name to Google Code Style

* use arch to provide default architectures

* use nn.Conv2d

* mmcv.cnn.fuse_conv_bn

* modify some details

* remove down_ops from the architectures.

* remove init_weight function

* Modify ambiguous variable names

* Change the drop_path in config to drop_path_rate

* Add unit test

* remove train function

* add unit test

* modify nn.norm1d to build_norm_layer

* update metafile and readme

* Update configs and LeViT implementations.

* Update README.

* Add docstring and update unit tests.

* Revert irrelative modification.

* Fix unit tests

* minor fix

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-01-17 17:43:42 +08:00
Ma Zerun b63515111b
[Reproduce] Update ConvNeXt config files. (#1256)
* Update ConvNeXt training configs.

* Update ConvNeXt network.

* Update metafile and README.

* Update README
2022-12-19 13:54:24 +08:00
Songyang Zhang 210373c093
[Feature] Implementation of RevViT. (#1127)
* [Feature] implement rev-vit network

* can reproduce the RevViT-Small accuracy 79.9

* update

* [Feature] update revvit

* [Feature] update revvit readme

* Update links

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-12-14 11:46:39 +08:00
Ezra-Yu 4969830c8a
[Enhance] Reproduce mobileone training accuracy. (#1191)
* add switch hook and UTs

* update doc

* update doc

* fix lint

* fix ci

* fix ci

* fix typo

* fix ci

* update configs names

* update configs

* update configs

* update links

* update readme

* update vis_scheduler

* update metafile

* update configs

* rebase

* fix ci

* rebase
2022-11-21 10:43:34 +08:00
Ma Zerun 034683cfcd
[Feature] Support MViT for MMCLS 1.x (#1023)
* [Feature] Support MViT for MMCLS 1.x

* Add unit tests

* Update documentation
2022-09-22 09:23:49 +08:00
Ma Zerun e9e2d48cb2
[Improve] Update benchmark scripts (#1028)
* Update train benchmark scripts

* Add `--cfg-options` for dev scripts and enhance `--range`.

* Fix bug of regex expression.

* Fix minor bugs

* Update ShuffleNet configs

* Update rsb-a1 configs and label smooth loss mode.

* Update inference dev scripts

* From `mmengine` instead of `mmcv` import fileio.

* Fix lint

* Update pre-commit hook

* Use `use_sigmoid` option instead of "bce" mode in label smooth loss.
2022-09-20 15:50:21 +08:00
mzr1996 735a3ee11f Update auto_scale_lr fields 2022-07-18 11:11:13 +08:00
mzr1996 24bcf069f8 [Refactor] Refactor dev scripts 2022-07-18 11:11:13 +08:00
mzr1996 c0f3ba68a8 Add MAE version ViT-base training results and fix some errors in configs. 2022-07-18 11:11:13 +08:00
Ezra-Yu d8f556668e Refactor vis scheduler tool 2022-07-18 11:11:13 +08:00
Ezra-Yu 7bca2516f0 Add CUB dataset 2022-07-18 11:11:13 +08:00
mzr1996 548db6f4ac [Refactor] Update optimizer related registries and configs. 2022-07-18 10:53:56 +08:00
mzr1996 995b1d0d58 [Refactor] Add `ResizeEdge` and refactor all dataset configs. 2022-07-18 10:53:56 +08:00
Ezra-Yu 58d9f649ed Refactor scheduler configuration 2022-07-18 10:53:28 +08:00
Ezra-Yu 2f2aa3037c Refactor default hooks configs 2022-07-18 10:53:28 +08:00
takuoko aa522f4309
[Feature] Support CUB dataset. (#703)
* support cub dataset

* support cub dataset

* fix train lint error

* add docs

* fix class label

Co-authored-by: Ezra-Yu <1105212286@qq.com>

* del debug code

* skip docformatter problem

* add unit tests

* add CUB baseline configs and chpts

* fix some typos

* fix name style

* update flops

Co-authored-by: Ezra-Yu <1105212286@qq.com>
2022-03-16 16:22:28 +08:00
Ma Zerun 9fd35dd7b5
[Reproduction] Reproduce training results of DeiT. (#711)
* Update deit training settings

* Update decay config

* Add mixup&cutmix and drop path rate

* Update training configs

* Update model-zoo

* Add comments
2022-03-02 14:23:10 +08:00
Ma Zerun dc456a0c2c
[Feature] Support ConvNeXt (#670)
* Support ConvNeXt

* Add configs of ConvNeXt

* Update dev scripts

* Update docs.

* Use new style README

* Add unit tests.

* Update README

* Imporve according to comments

* Modify refers to timm.

* Imporve according to comments
2022-01-28 10:36:45 +08:00
Zhicheng Chen 0bbbb04429
[Enhancement] Improve the accuracy of ResNet (#572)
* add itp timm

* minor update

* minor update

* minor update

* add rep aug, minor update on configs

* minor update

* add target threshold

* add decaymulti

* minor update

* minor update

* add lbl smooth

* update lr

* reorganize config files and code

* minor bugfixes

* remove unused parts and minor fixes on cfg

* critical bugfix, add test and cfg update

* refactor code

* update doc string

* remove duplicate code

* refactor drop path in resnet

* rename

* Modify configs and add README&metafile

* Update metafile

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-29 10:58:42 +08:00
Ma Zerun f9a2b04cee
[Feature] Add DeiT backbone and checkpoints. (#576)
* Support DeiT backbone.

* Use hook to automatically resize pos embed

* Update ViT training setting

* Add deit configs and update docs

* Fix vit arch assertion

* Remove useless init function

* Add unit tests.

* Fix resize_pos_embed for DeiT

* Improve according to comments.
2021-12-15 22:44:57 +08:00
Zhiliang Peng 18f6bb0b10
[Feature] Implement the conformer backbone. (#494)
* implement the conformer

* format code style

* format code style

* reuse the TransformerEncoderLayer in the vision_transformer.py

* Modify variable name

* delete unused params

* Remove warning info in Conformer head since it already exists in
Conformer.

* Rename some variables

* Add unit tests

* Use `getattr` instead of `get_submodule`.

* Remove some useless layers

* Refactor conformer and add configs

* Update configs and add metafile.

* Fix unit tests

* Update README

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-07 14:00:17 +08:00
Ezra-Yu 2ce5825ef1
[Feature] Support ImageNet21k dataset. (#461)
* add imagnet21k

* Update unit test

* update imaenet21k

* use slots

* use slots

* rename Data_item to ImageInfo

* add unit tests

* Update unit tests

* rm some print

* update unit tests

* fix lint

* remove default value of pipeline
2021-10-28 15:22:08 +08:00
zhangrui_wolf 90496b4687
[Feature] Add RepVGG backbone and checkpoints. (#414)
* Add RepVGG code.

* Add se_module as plugin.

* Add the repvggA0 primitive config

* Change repvggA0.py to fit mmcls

* Add RepVGG configs

* Add repvgg_to_mmcls

* Add tools/deployment/convert_repvggblock_param_to_deploy.py

* Change configs/repvgg/README.md

* Streamlining the number of configuration files.

* Fix lints

* Delete plugins

* Delete code about plugin.

* Modify the code for using se module.

* Modify config to fit repvgg with se.

* Change se_cfg to allow loading of pre-training parameters.

* Reduce the complexity of the configuration file.

* Finsh unitest for repvgg.

* Fix bug about se in repvgg_to_mmcls.

* Rename convert_repvggblock_param_to_deploy.py to reparameterize_repvgg.py, and delete setting about device.

* test commit

* test commit

* test commit command

* Modify repvgg.py to make the code more readable.

* Add value=0 in F.pad()

* Add se_cfg to arch_settings.

* Fix bug.

* modeify some attr name and Update unit tests

* rename stage_0 to stem and branch_identity to branch_norm

* update unit tests

* add m.eval in unit tests

* [Enhance] Enhence SE layer to support custom squeeze channels. (#417)

* add enhenced SE

* Update

* rm basechannel

* fix docstring

* Update se_layer.py

fix docstring

* [Docs] Add algorithm readme and update meta yml (#418)

* Add README.md for models without checkpoints.

* Update model-index.yml

* Update metafile.yml of seresnet

* [Enhance] Add `hparams` argument in `AutoAugment` and `RandAugment` and some other improvement. (#398)

* Add hparams argument in `AutoAugment` and `RandAugment`.

And `pad_val` supports sequence instead of tuple only.

* Add unit tests for `AutoAugment` and `hparams` in `RandAugment`.

* Use smaller test image to speed up uni tests.

* Use hparams to simplify RandAugment config in swin-transformer.

* Rename augment config name from `pipeline` to `pipelines`.

* Add some commnet ad docstring.

* [Feature] Support classwise weight in losses (#388)

* Add classwise weight in losses:CE,BCE,softBCE

* Update unit test

* rm some extra code

* rm some extra code

* fix broadcast

* fix broadcast

* update unit tests

* use new_tensor

* fix lint

* [Enhance] Better result visualization (#419)

* Imporve result visualization to support wait time and change the backend
to matplotlib.

* Add unit test for visualization

* Add adaptive dpi function

* Rename `imshow_cls_result` to `imshow_infos`.

* Support str in `imshow_infos`

* Improve docstring.

* Bump version to v0.15.0 (#426)

* [CI] Add PyTorch 1.9 and Python 3.9 build workflow, and remove some CI. (#422)

* Add PyTorch 1.9 build workflow, and remove some CI.

* Add Python 3.9 CI

* Show Python 3.9 support.

* [Enhance] Rename the option `--options` in some tools to `--cfg-options`. (#425)

* [Docs] Fix sphinx version (#429)

* [Docs] Add `CITATION.cff` (#428)

* Add CITATION.cff

* Fix typo in setup.py

* Change author in setup.py

* modeify some attr name and Update unit tests

* rename stage_0 to stem and branch_identity to branch_norm

* update unit tests

* add m.eval in unit tests

* Update unit tests

* refactor

* refactor

* Alignment inference accuracy

* Update configs, readme and metafile

* Update readme

* return tuple and fix metafile

* fix unit test

* rm regnet and classifiers changes

* update auto_aug

* update metafile & readme

* use delattr

* rename cfgs

* Update checkpoint url

* Update readme

* Rename config files.

* Update readme and metafile

* add comment

* Update mmcls/models/backbones/repvgg.py

Co-authored-by: Ma Zerun <mzr1996@163.com>

* Update docstring

* Improve docstring.

* Update unittest_testblock

Co-authored-by: Ezra-Yu <1105212286@qq.com>
Co-authored-by: Ma Zerun <mzr1996@163.com>
2021-09-29 11:06:23 +08:00
Ma Zerun 076ee10cac
[Feature] Add swin-transformer model. (#271)
* Add swin transformer archs S, B and L.

* Add SwinTransformer configs

* Add train config files of swin.

* Align init method with original code

* Use nn.Unfold to merge patch

* Change all ConfigDict to dict

* Add init_cfg for all subclasses of BaseModule.

* Use mmcv version init function

* Add Swin README

* Use safer cfg copy method

* Improve docstring and variable name.

* Fix some difference in randaug

Fix BGR bug, align scheduler config.

Fix label smoothing parameter difference.

* Fix missing droppath in attn

* Fix bug of relative posititon table if window width is not equal to
height.

* Make `PatchMerging` more general, support kernel, stride, padding and
dilation.

* Rename `residual` to `identity` in attention and FFN.

* Add `auto_pad` option to auto pad feature map

* Improve docstring.

* Fix bug in ShiftWMSA padding.

* Remove unused `key` and `value` in ShiftWMSA

* Move `PatchMerging` into utils and use common `PatchEmbed`.

* Use latest `LinearClsHead`, train augments and label smooth settings.
And remove original `SwinLinearClsHead`.

* Mark some configs as "Evalution Only".

* Remove useless comment in config

* 1. Move ShiftWindowMSA and WindowMSA to `utils/attention.py`
2. Add docstrings of each module.
3. Fix some variables' names.
4. Other small improvement.

* Add unit tests of swin-transformer and patchmerging.

* Fix some bugs in unit tests.

* Fix bug of rel_position_index if window is not square.

* Make WindowMSA implicit, and add unit tests.

* Add metafile.yml, update readme and model_zoo.
2021-07-01 09:30:42 +08:00
whcao 3be95b99c2
[Feature]Modify modelzoo readme (#230)
* add mytrain.py for test

* test before layers

* test attr in layers

* test classifier

* delete mytrain.py

* add imagenet_bs4096_AdamW.py

* delete 2 lines of comments

* change bs to 64

* fix bug

* add vit to model_zoo.md

* rename
2021-04-29 15:18:55 +08:00
whcao 16947f1239
[Bug]Fix weight decay (#227)
* add imagenet bs 4096

* add vit_base_patch16_224_finetune

* add vit_base_patch16_224_pretrain

* add vit_base_patch16_384_finetune

* add vit_base_patch16_384_finetune

* add vit_b_p16_224_finetune_imagenet

* add vit_b_p16_224_pretrain_imagenet

* add vit_b_p16_384_finetune_imagenet

* add vit

* add vit

* add vit head

* vit unitest

* keep up with ClsHead

* test vit

* add flag to determiine whether to calculate acc during training

* Changes related to mmcv1.3.0

* change checkpoint saving interval to 10

* add label smooth

* default_runtime.py recovery

* docformatter

* docformatter

* delete 2 lines of comments

* delete configs/_base_/schedules/imagenet_bs4096.py

* add configs/_base_/schedules/imagenet_bs2048_AdamW.py

* rename imagenet_bs4096.py to imagenet_bs2048_AdamW.py

* add AutoAugment

* fix weight decay in vit

* change eval interval to 10

* add mytrain.py for test

* test before layers

* test attr in layers

* test classifier

* delete mytrain.py

* delete @torch.jit.ignore

* change eval interval back to 1

* add some comments to imagenet_bs2048_AdamW

* add some comments
2021-04-28 17:16:43 +08:00
whcao affb39fe07
[Feature]Add Vit (#214)
* add imagenet bs 4096

* add vit_base_patch16_224_finetune

* add vit_base_patch16_224_pretrain

* add vit_base_patch16_384_finetune

* add vit_base_patch16_384_finetune

* add vit_b_p16_224_finetune_imagenet

* add vit_b_p16_224_pretrain_imagenet

* add vit_b_p16_384_finetune_imagenet

* add vit

* add vit

* add vit head

* vit unitest

* keep up with ClsHead

* test vit

* add flag to determiine whether to calculate acc during training

* Changes related to mmcv1.3.0

* change checkpoint saving interval to 10

* add label smooth

* default_runtime.py recovery

* docformatter

* docformatter

* delete 2 lines of comments

* delete configs/_base_/schedules/imagenet_bs4096.py

* add configs/_base_/schedules/imagenet_bs2048_AdamW.py

* rename imagenet_bs4096.py to imagenet_bs2048_AdamW.py

* add helpers.py

* test vit hybrid backbone

* fix HybridEmbed

* use to_2tuple instead
2021-04-16 19:22:41 +08:00
David de la Iglesia Castro 4f4f2957ef
Use build_runner (#54)
* Use build_runner in train api

* Support iter in eval_hook

* Add runner section

* Add test_eval_hook

* Pin mmcv version in install docs

* Replace max_iters with max_epochs

* Set by_epoch=True as default

* Remove trailing space

* Replace DeprecationWarning with UserWarning

* pre-commit

* Fix tests
2020-10-15 21:12:50 +08:00
Lei Yang 4b46fd6dc7
Add CIFAR10 configs and models (#38)
* rename cifar configs

* add cifar10 configs

* fix linting

* add params, flops and accuracy in docs

* add cifar10 pretrained models and logs

* use oss-accelerate url

* del unused cifar10 configs
2020-08-26 16:34:15 +08:00
Xiaojie Li 18ac0f0fa3
Update shufflenet config (#31)
* update shufflenet config

* remove old config

Co-authored-by: lixiaojie <lixiaojie@sensetime.com>
2020-08-13 10:46:39 +08:00
Xiaojie Li 414ede4ca4
fix coslr (#32)
Co-authored-by: lixiaojie <lixiaojie@sensetime.com>
2020-08-13 10:45:41 +08:00
yanglei 5c88675a71 Add configs for MNIST, CIFAR10 and ImageNet 2020-07-12 00:06:57 +08:00