Commit Graph

71 Commits (dbf3df21a31ee5404184b3f1ba0588b6b6aaa8f4)

Author SHA1 Message Date
Ma Zerun dbf3df21a3
[Refactor] Use `out_type` to specify ViT-like backbone output. (#1408)
* [Refactor] Use  to specify ViT-like backbone output.

* Fix ClsBatchNormNeck

* Update mmpretrain/models/necks/mae_neck.py

---------

Co-authored-by: Yixiao Fang <36138628+fangyixiao18@users.noreply.github.com>
2023-03-09 11:02:58 +08:00
Yixiao Fang 08dc8c75d3
[Refactor] Add selfsup algorithms. (#1389)
* remove basehead

* add moco series

* add byol simclr simsiam

* add ut

* update configs

* add simsiam hook

* add and refactor beit

* update ut

* add cae

* update extract_feat

* refactor cae

* add mae

* refactor data preprocessor

* update heads

* add maskfeat

* add milan

* add simmim

* add mixmim

* fix lint

* fix ut

* fix lint

* add eva

* add densecl

* add barlowtwins

* add swav

* fix lint

* update readtherdocs rst

* update docs

* update

* Decrease UT memory usage

* Fix docstring

* update DALLEEncoder

* Update model docs

* refactor dalle encoder

* update docstring

* fix ut

* fix config error

* add val_cfg and test_cfg

* refactor clip generator

* fix lint

* pass check

* fix ut

* add lars

* update type of BEiT in configs

* Use MMEngine style momentum in EMA.

* apply mmpretrain solarize

---------

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-03-06 16:53:15 +08:00
Yixiao Fang 63d9f27fde
[Refactor] Add necks, heads and losses for the self-supervised task. (#1376)
* add necks

* refactor linear neck

* rename simmim neck

* add heads

* add losses

* fix

* add unittest

* update

* update cae

* remove mim head

* update config
2023-02-28 10:05:00 +08:00
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
mzr1996 0979e78573 Rename the package name to `mmpretrain`. 2023-02-17 15:20:55 +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
szwlh-c c98dc4555c
[Feature] Support VIG Backbone. (#1304)
* 添加vig源文件

* 某些模块修改到mmcls风格

* 修改到mmcls风格

* 修改

* 添加VIG模型及源文件

* update model file

* update model file and config

* change class name and some variable name

* change class name and some variable name

* update

* update

* change nn.BatchNorm to mmcv.cnn.build_norm_layer

* update

* change nn.Seq to mmcls

* change backbone to stage_blocks

* add vig_head

* update

* update config file

* update

* add readme and metafile

* update model-index.yml

* update model file

* rename config file and add docstring

* variable rename

* update readme and metafile

* update readme

* update

* Update VIG backbone implementation and docs.

* Fix configs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-01-17 16:55:56 +08:00
Ma Zerun 060b0ed3b5
[Feature] Support ConvNeXt-V2 backbone. (#1294)
* [Feature] Support ConvNeXt-V2.

* Use registry of mmcls instead of mmengine.

* Add README.

* Add unit tests and docs.
2023-01-06 16:13:41 +08:00
QINGTIAN e880451a54
[Improve] Remove useless EfficientnetV2 config files. (#1300)
* update model file

* Delete xcit.py

* Delete efficientnet_v2_b0.py

* Delete efficientnet_v2_b1.py

* Delete efficientnet_v2_b2.py

* Delete efficientnet_v2_b3.py

* Delete efficientnet_v2_l.py

* Delete efficientnet_v2_m.py

* Delete efficientnet_v2_s.py

* Delete efficientnet_v2_xl.py

* Delete efficientnet_v2-b0_8xb32_in1k.py

* Delete efficientnet_v2-b1_8xb32_in1k.py

* Delete efficientnet_v2-b2_8xb32_in1k.py

* Delete efficientnet_v2-b3_8xb32_in1k.py

* Delete efficientnet_v2-l_8xb32_in1k.py

* Delete efficientnet_v2-l_8xb32_in21ft1k.py

* Delete efficientnet_v2-m_8xb32_in1k.py

* Delete efficientnet_v2-m_8xb32_in21ft1k.py

* Delete efficientnet_v2-s_8xb32_in1k.py

* Delete efficientnet_v2-s_8xb32_in21ft1k.py

* Delete efficientnet_v2-xl_8xb32_in21ft1k.py

Co-authored-by: qingtian <459291290@qq.com>
2023-01-06 16:10:59 +08:00
QINGTIAN 74743ef588
[Feature] [CodeCamp #68] Add EfficientnetV2 Backbone. (#1253)
* add efficientnet_v2.py

* add efficientnet_v2 in __init__.py

* add efficientnet_v2_s base config file

* add efficientnet_v2 config file

* add efficientnet_v2 config file

* update tuple output

* update config file

* update model file

* update model file

* update model file

* update config file

* update model file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model file

* update config file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model config file

* Update efficientnet_v2.py

* add config file and modify arch

* add config file and modify arch

* add the file about convert_pth from timm to mmcls

* update efficientnetv2 model file with mmcls style

* add the file about convert_pth from timm to mmcls

* add the file about convert_pth from timm to mmcls

* update convert file

* update model file

* update convert file

* update model file

* update model file

* update model file

* add metefile and README

* Update tools/model_converters/efficientnetv2-timm_to_mmcls.py

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file

* update model file

* update model file

* update config file and README file

* update metafile

* Update efficientnetv2_to_mmcls.py

* update model-index.yml

* update metafile.yml

* update b0 and s train pipeline

* update b0 and s train pipeline

* update b0 and s train pipeline

* add test_efficientnet_v2

* update test_efficientnet_v2

* update model file docs

* update test_efficientnet_v2

* update test_efficientnet_v2

* add efficientnet_v2.py

* add efficientnet_v2 in __init__.py

* add efficientnet_v2_s base config file

* add efficientnet_v2 config file

* add efficientnet_v2 config file

* update tuple output

* update config file

* update model file

* update model file

* update model file

* update model file

* update config file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model file

* update config file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model config file

* Update efficientnet_v2.py

* add config file and modify arch

* add config file and modify arch

* add the file about convert_pth from timm to mmcls

* update efficientnetv2 model file with mmcls style

* add the file about convert_pth from timm to mmcls

* add the file about convert_pth from timm to mmcls

* update convert file

* update model file

* update convert file

* update model file

* update model file

* update model file

* add metefile and README

* Update tools/model_converters/efficientnetv2-timm_to_mmcls.py

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file

* update model file

* update model file

* update config file and README file

* update metafile

* Update efficientnetv2_to_mmcls.py

* update model-index.yml

* update metafile.yml

* update b0 and s train pipeline

* update b0 and s train pipeline

* update b0 and s train pipeline

* add test_efficientnet_v2

* update test_efficientnet_v2

* update model file docs

* update test_efficientnet_v2

* update test_efficientnet_v2

* pass pre-commit hook

* refactor efficientnetv2

* refactor efficientnetv2

* update readme, metafile and weight links

* update model-index.yml

* fix lint

* fix typo

* Update efficientnetv2-b1_8xb32_in1k.py

* Update efficientnetv2-b2_8xb32_in1k.py

* Update efficientnetv2-b3_8xb32_in1k.py

* update two moduals and model file

* update modual file

* update accuracys

* update accuracys

* update metafile

* fix build docs

* update links

* update README.md

Co-authored-by: qingtian <459291290@qq.com>
Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2022-12-30 15:18:39 +08:00
Wangbo Zhao(黑色枷锁) 14dcb69092
[Feature] Add mixmim backbone with checkpoints. (#1224)
* add mixmim backbone

* add mixmim inference

* add docstring, metafile, test and modify readme

* Update README and metafile

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-12-20 16:52:54 +08:00
Songyang Zhang 5547f4cac4
[Feature] Add TinyViT for dev-1.x. (#1042)
* [Feature] add TinyViT for dev-1.x

* [Feature] update readme

* fix lint error

* refactor the code

* [Update] update the args

* [Update] add unit test and fix bugs

* Rename the configuration file

* delete invalid files

* [Feature] update tinyvit readme

* [Feature] update tinyvit readme

* [Feature] update metafile

* Update tinyvit metafile
2022-12-20 13:04:00 +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
takuoko 2535c1ecd7
[Feature] Support EVA. (#1239)
* add eva

* add eva

* add eva

* sklearn -> scikit-learn

* add large

* Update model names and links.

* Fix resize pos embed error when loading fp16 weight.

* Remove verbose configs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-12-14 13:21:33 +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
takuoko 4fb44f8770
[Feature] EfficientNets NoisyStudent & L2. (#1122)
* add mvit 21k

* add mvit 21k

* add effnet noisy student

* Revert "add mvit 21k"

This reverts commit f51067c559.

* revert mvit pr

* update link and readme

* update readme

* update l2 link

* update link

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2022-11-21 16:57:13 +08:00
Jiahao Wang 72c6bc4864
[Feature] Support RepLKnet backbone. (#1129)
* update replknet configs

* update replknet test

* update replknet model

* update replknet model

* update replknet model

* update replknet model

* Fix docs and config names

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-21 10:18:58 +08:00
takuoko c4f3883a22
[Feature] Support DaViT. (#1105)
* add davit

* fix mixup config

* convert scripts

* lint

* test

* test

* Add checkpoint links.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-16 17:23:55 +08:00
Hubert 1b98fc13d9
[Enhance] Add more mobilenetv3 pretrains. (#1154)
* add small-050/075 and move files

* add previous results

* Update checkpoint link

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-14 17:06:39 +08:00
Yang Gao 11cd88f39a
[Fix] Fix configs due to api refactor of `num_classes`. (#1184) 2022-11-14 14:43:56 +08:00
takuoko d05cbbcf9b
[Feature] Support HorNet Backbone for dev1.x. (#1094)
* add hornet

* add hornet

* fix mixup config

* add optim cfgs

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2022-11-04 15:33:46 +08:00
Ezra-Yu 63b124e2d7
[Docs] Improve Swin Doc and Add Tabs enxtation. (#1145)
* improve_swin_doc

* fix requirments

* improve swin2 docs

* improve swin2 docs

* update

* update CN doc

* update CN doc

* update comments

* fix error

* update register_all_modules

* Update README.md

* Update stat.py

* Update readme

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-04 11:58:39 +08:00
Hubert bcca619066
[Feature] Support MobileViT backbone. (#1068)
* init

* fix

* add config

* add meta

* add unittest

* fix for comments

* Imporvee docstring and support custom arch.

* Update README

* Update windows CI

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-10-18 17:05:59 +08:00
Ma Zerun 29f066f7fb
[Improve] Speed up data preprocessor. (#1064)
* [Improve] Speed up data preprocessor.

* Add ClsDataSample serialization override functions.

* Add unit tests

* Modify configs to fit new mixup args.

* Fix `num_classes` of the ImageNet-21k config.

* Update docs.
2022-10-17 17:08:18 +08:00
takuoko a49c3076e1
[Feature] Support DeiT3. (#1065)
* deit3

deit3

lint

* add tools and test

* deit3

* deit3

* fix preprocess

* lint

* Update config names and checkpoint paths

* Update convert tools to use mmengine, and fix docstring.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-10-10 14:54:20 +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
Songyang Zhang 81f10ccbb7
[Feature] Support EdgeNeXt for dev-1.x. (#1037)
* [Feature] add EdgeNeXt for dev-1.x

* [Feature] add update

* Imporve EdgeNeXt

* Fix div error in low pytorch version

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-09-21 13:27:04 +08:00
Hubert e4e8047563
[Feature] Support Swin Transformer V2 for MMCLS 1.x. (#1029)
* [Feature] support swin v2 in mmcls 1.x

* fix configs

* fix clamp max

* Fix meshgrid

* Imporve swin v2

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-09-20 15:45:27 +08:00
Ezra-Yu aaf127c5e1
[Feature] Add efficientformer Backbone for MMCls 1.x. (#1031)
* rebase

* update filename

* update URL

* update UT

* fix lint

* update head

* add efficientformer

* update filename

* update UT

* fix lint

* update configs

* rebase

* fix unit tests

* Fix comments and docs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-09-20 14:56:45 +08:00
Ezra-Yu f1d2f50c21
[Feature] Add MobileOne Backbone For MMCls 1.x. (#1030)
* add mobileOne

* add train cfg

* update cfgs

* update URL

* update configs

* update inceptionv3 metafile

* add configs

* fix lint

* update checkpoint urls

* Update configs

* Update README

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-09-16 11:55:10 +08:00
mzr1996 24bcf069f8 [Refactor] Refactor dev scripts 2022-07-18 11:11:13 +08:00
mzr1996 f3299b4ca2 [Refactor] Refactor batch augmentations 2022-07-18 11:11:13 +08:00
Hubert 59292b315a
[Feature] Support DenseNet. (#750)
* init add densenet implementation

* Add config and converted models

* update meta

* add test for memory efficient

* Add docs

* add doc for jit

* Update checkpoint path

* Update readthedocs

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-04-28 13:06:03 +08:00
takuoko df6edd7f5a
[Feature] Support VAN. (#739)
* add van

* fix config

* add metafile

* add test

* model convert script

* fix review

* fix lint

* fix the configs and improve docs

* rm debug lines

* add VAN into api

Co-authored-by: Yu Zhaohui <1105212286@qq.com>
2022-04-28 09:35:17 +08:00
Weihao Yu 2eb27d0d4e
[Feature] Add PoolFormer backbone and checkpoints. (#746)
* add PoolFormer

* fix some typos in PoolFormer

* fix lint error

* modify out_indices and gap

* fix typo

* fix lint

* fix typo

* fix typo in poolforemr README

* fix lint

* Update some paths

* Refactor freeze_stages method

* Add unit tests

* Fix lint

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-04-15 11:35:15 +08:00
Ezra-Yu 922a31a68e
[Feature] ADD RepMLP Backbone and checkpoints. (#709)
* add repmlp

* refactor backbone code

* add checkpoint, readme, unit tests

* unchange demo

* improve docstring.

* update pic

* refactor patch embed

* refactor unit tests

* fix lint

* update tools

* update tools

* Update checkpoint path

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-03-30 20:40:25 +08:00
Hubert 04cb42a768
[Feature] Support ConvMixer. (#716)
* basic support for ConvMixer

* simplify

* add data pipeine config for timm

* Add model readme and metafile

* add unittest for convmixer

* add copyright

* modify

* add tests

* update model

* add conv2dAdaptivePadding replacement

* update model index

* fix comments

* Update checkpoint path

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-03-23 15:23:57 +08:00
kusakana 779a06257c
[Feature] Support Wide-ResNet. (#715)
* Add configs of Wide ResNet

* updated config

* add docs and metafile

* update configs

* remove extra import

* Update metafile and readme

Co-authored-by: Ezra-Yu <1105212286@qq.com>
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-03-04 14:06:34 +08:00
Ezra-Yu 7fcaedcbfb
[Feature] Add ResNetV1c. (#692)
* add ResNetV1c

* add unit tests

* fix lint

* update docstring

* fix lint
2022-02-23 11:36:33 +08:00
takuoko 43024cda73
[Feature] Support gem pooling (#677)
* add gem pooling

* add example config

* fix params

* add assert

* add param clamp

* add test assert

* add clamp

* fix conflict
2022-02-17 02:17:36 +08:00
Ma Zerun 5de480ea9e
[Feature] Support HRNet and add pre-trained models (#660)
* Support HRNet

* Add HRNet configs

* Fix a bug in backward

* Add configs and update docs.

* Not use bias in conv before batch norm

* Defaults to use `norm_eval=False`

* Add unit tests and support out_channels in HRFuseScales

* Update checkpoint path

* Update docstring.

* Remove incorrect files

* Improve according to comments
2022-01-28 10:54:14 +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
Ezra-Yu 94eb3ff83e
[Feature] Add Twins backbone and convert checkpoints. (#642)
* add twins backbone

* add position_encoding

* refactor twins

* Supplemental unit tests

* update docstring and readme

* update docstring and readme

* update docstring and readme

* update docstring

* update docstring

* update docstring

* update docstring

* remove note

* update doc and docstring

* update docstring

* update docstring

* use abstract pdf link and rename yamlfile

* Update model link

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-01-27 10:25:05 +08:00
Zhicheng Chen d56170a734
[Feature] Support EfficientNet (#649)
* add config for resnest test

* fix config

* add label smoothing

* add memcached

* minor fix

* fix bug

* fix config

* add config

* minor fix

* fix configs

* use EResize

* change interpolation

* add more configs

* add docsting

* add unittest

* remove unnecessary changes

* minor fix

* add more docstring

* fix linting

* add efficient backbone

* add config

* add Edge Residual

* fix bug

* remove unnecessary files

* refactor

* add resize in crop to ensure crop size is output size

* fix bug and add comments

* test

* fix

* add more configs

* add more configs

* add more configs

* fix bug

* add model zoo

* fix

* reorganize code

* add edge tpu

* add edge tpu converter

* rename

* update readme

* reorganize code and config

* Rename configs of EfficientNet, and add metafile & model_zoo

* Remove `backend='pillow'`

* Add comments about EfficientNet-EdgeTPU

* Rename the convert tool of EfficientNet.

* Refactor EfficientNet and update docstring.

* Update EfficientNet-EdgeTPU config

* Fix unit tests

Co-authored-by: lixinran <lixr423@outlook.com>
Co-authored-by: lixinran <lixinran@sensetime.com>
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-01-25 12:14:17 +08:00
Ma Zerun 643fb192cd
[Enhance] Enhance feature extraction function. (#593)
* Fix MobileNet V3 configs

* Refactor to support more powerful feature extraction.

* Add unit tests

* Fix unit test

* Imporve according to comments

* Update checkpoints path

* Fix unit tests

* Add docstring of `simple_test`

* Add docstring of `extract_feat`

* Update model zoo
2021-12-17 15:55:02 +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
Zhicheng Chen fc8adbc149
[Enhance] Add metafile, readme and converted models for MLP-Mixer (#539)
* add pth converter

* minor update on config files, add metafile and readme

* add missing readme and minor fixes

* minor fixes

* Update config names and checkpoint download link

* Update model_zoo.md

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-11-24 19:04:19 +08:00
xcnick 3eafc5cbe1
[Feature] Add MLP Mixer Backbone. (#528)
* Add Mlp Mixer

* Fix token_mix FNN add_identity and add out_indices

* Fix mlp_mixer unit test
2021-11-15 18:25:22 +08:00
Ma Zerun fffa30dd48
[Feature] Add Tokens-to-Token ViT backbone and converted checkpoints. (#467)
* add t2t backbone

* register t2t_vit

* add t2t_vit config

* [Temp] Align posterize transform with timm.

* Fix lint

* Refactor t2t-vit

* Add config for t2t-vit

* Add metafile and README for t2t-vit

* Add unit tests

* configs

* Update metafile and README

* Improve docstring

* Fix batch size which should be 8x64 instead of 8x128

* Fix typo

* Update model zoo

* Update training augments config.

* Move some arguments of T2TModule to T2TViT

* Update docs.

* Update unit test

Co-authored-by: HIT-cwh <2892770585@qq.com>
2021-10-29 10:37:16 +08:00
Ma Zerun 77a3834531
[Feature] Add Res2Net backbone and converted weights. (#465)
* Add Res2Net from mmdet, and change it to mmcls style.

* Align structure with official repo

* Support `deep_stem` and `avg_down` option

* Add Res2Net configs

* Add metafile&README and update model zoo

* Add unit tests

* Imporve docstring.

* Improve according to comments.
2021-10-20 16:34:22 +08:00