Commit Graph

28 Commits (8b7d38b24329497180fca408083d2c7f16d8fca5)

Author SHA1 Message Date
Miras Amir 5cfaed6807
[Feature] timm backbones wrapper (#427)
* Add wrapper to use backbones from timm

* Add tests

* Remove timm from optional deps and modify GitHub workflow.

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-09-06 11:05:31 +08:00
Ma Zerun f9eb9b409b
[Docs] Add Copyright information. (#413) 2021-08-17 19:52:42 +08:00
whcao 359f56ad58
[Feature] Add transformer in transformer (#339)
* add tnt_small configs

* add tnt backbone

* test tnt

* add tnt to model_zoo

* rename the config file name

* add optimizor

* move tnt backbone unitest

* add metric

* fix keyname in arch

* encapsulate "inner transformer block" and "outer transformer block"

* fix TnT

* Use `inner_block_cfg` and `outer_block_cfg` instead of `args` and
`kwargs`.

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-07-30 09:16:27 +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
Ma Zerun 65410b05ad
Fix Mobilenetv3 structure and add pretrained model (#291)
* Refactor Mobilenetv3 structure and add ConvClsHead.

* Change model's name from 'MobileNetv3' to 'MobileNetV3'

* Modify configs for MobileNetV3 on CIFAR10.

And add MobileNetV3 configs for imagenet

* Fix activate setting bugs in MobileNetV3.

And remove bias in SELayer.

* Modify unittest

* Remove useless config and file.

* Fix mobilenetv3-large arch setting

* Add dropout option in ConvClsHead

* Fix MobilenetV3 structure according to torchvision version.

1. Remove with_expand_conv option in InvertedResidual, it should be decided by channels.

2. Revert activation function, should before SE layer.

* Format code.

* Rename MobilenetV3 arch "big" to "large".

* Add mobilenetv3_small torchvision training recipe

* Modify default `out_indices` of MobilenetV3, now it will change
according to `arch` if not specified.

* Add MobilenetV3 large config.

* Add mobilenetv3 README

* Modify InvertedResidual unit test.

* Refactor ConvClsHead to StackedLinearClsHead, and add unit tests.

* Add unit test for `simple_test` of `StackedLinearClsHead`.

* Fix typo

Co-authored-by: Yidi Shao <ydshao@smail.nju.edu.cn>
2021-06-27 23:19:36 +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
Lei Yang bc1b08ba41
Add VGG and pretained models (#27)
* add vgg

* add vgg model coversion tool

* fix out_indices and docstr

* add vgg models in configs

* add params, flops and accuracy in docs

* add pretrained models url

* use ConvModule and refine var names

* update vgg conversion tool

* modify bn config

* add docs for arch_setting

* add unit test for vgg

* rm debug code

* update vgg pretrained models
2020-09-29 17:49:42 +08:00
Jerry Jiarui XU 8d3acce307
Add ResNeSt (#25)
* Add ResNeSt

* fixed test

* refactor

* add ResNeSt base

* update modelzoo

* update modelzoo

* Add S-200,S269 _base_
2020-09-22 10:41:51 +08:00
yanglei 9a661ef981 Add ResNet_CIFAR 2020-07-12 00:06:56 +08:00
yanglei 8995e16834 Add AlexNet and LeNet5 2020-07-12 00:06:54 +08:00
chenkai 91a43c5bac Add RegNet 2020-07-01 14:21:45 +08:00
louzan 03b75789c6 Dev mobilenetv3 2020-06-30 15:50:36 +08:00
yangmingmin 29e17ab326 Dev se resnext 2020-06-19 11:45:42 +08:00
yangmingmin f729a60f87 Dev se resnet 2020-06-17 14:20:20 +08:00
louzan deee5d61d7 add mobilenetv2 2020-06-16 14:37:03 +08:00
lixiaojie fcb1ad80e4 merge master 2020-06-16 00:49:55 +08:00
lixiaojie 24ef3b2f61 fix linting 2020-06-15 02:34:22 +08:00
lixiaojie 58faa2381c fix norm_eval & merge master 2020-06-15 02:22:50 +08:00
lixiaojie 326df68bb3 fix norm_eval & merge master 2020-06-15 02:16:13 +08:00
yanglei 76f91510b3 Add ResNeXt 2020-06-14 12:08:37 +08:00
lixiaojie eebb7561bf merge mastewr 2020-06-12 16:49:28 +08:00
lixiaojie 75858a3d3e merge master 2020-06-12 16:16:28 +08:00
yanglei 3a65f4529e Add Base and ResNet backbone 2020-06-12 14:40:27 +08:00
lixiaojie 16b4efbe06 add unit test 2020-06-07 23:33:47 +08:00
lixiaojie 98f5b49ffe add unit test 2020-06-07 22:40:36 +08:00
lixiaojie 83cc9fc279 fix flake8 2020-06-03 15:54:37 +08:00
lixiaojie 2aaff0e4f2 fix & add test 2020-06-03 15:51:17 +08:00
chenkai a99e6eb10d init commit 2020-05-21 21:21:43 +08:00