mmsegmentation/configs/vit
sennnnn 2aa632ebe7
[Enhancement] Change readme style and Update metafiles. (#895)
* [Enhancement] Change readme style and prepare for metafiles update.

* Update apcnet github repo url.

* add code snippet.

* split code snippet & official repo.

* update md2yml hook.

* Update metafiles.

* Add converted from attribute.

* process conflict.

* Put defualt variable value.

* update bisenet v2 metafile.

* checkout to ubuntu environment.

* pop empty attribute & make task attribute list.

* update readme style

* update readme style

* update metafiles

Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>
2021-09-28 16:25:37 +08:00
..
README.md [Enhancement] Change readme style and Update metafiles. (#895) 2021-09-28 16:25:37 +08:00
upernet_deit-b16_512x512_80k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-b16_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-b16_ln_mln_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-b16_mln_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-s16_512x512_80k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-s16_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-s16_ln_mln_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_deit-s16_mln_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_vit-b16_ln_mln_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_vit-b16_mln_512x512_80k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
upernet_vit-b16_mln_512x512_160k_ade20k.py [Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791) 2021-08-25 15:00:41 -07:00
vit.yml [Enhancement] Change readme style and Update metafiles. (#895) 2021-09-28 16:25:37 +08:00

README.md

Vision Transformer

Introduction

Official Repo

Code Snippet

Vision Transformer (ICLR'2021)
@article{dosoViTskiy2020,
  title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale},
  author={DosoViTskiy, Alexey and Beyer, Lucas and Kolesnikov, Alexander and Weissenborn, Dirk and Zhai, Xiaohua and Unterthiner, Thomas and  Dehghani, Mostafa and Minderer, Matthias and Heigold, Georg and Gelly, Sylvain and Uszkoreit, Jakob and Houlsby, Neil},
  journal={arXiv preprint arXiv:2010.11929},
  year={2020}
}

Usage

To use other repositories' pre-trained models, it is necessary to convert keys.

We provide a script vit2mmseg.py in the tools directory to convert the key of models from timm to MMSegmentation style.

python tools/model_converters/vit2mmseg.py ${PRETRAIN_PATH} ${STORE_PATH}

E.g.

python tools/model_converters/vit2mmseg.py https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-vitjx/jx_vit_base_p16_224-80ecf9dd.pth pretrain/jx_vit_base_p16_224-80ecf9dd.pth

This script convert model from PRETRAIN_PATH and store the converted model in STORE_PATH.

Results and models

ADE20K

Method Backbone Crop Size Lr schd Mem (GB) Inf time (fps) mIoU mIoU(ms+flip) config download
UPerNet ViT-B + MLN 512x512 80000 9.20 6.94 47.71 49.51 config model | log
UPerNet ViT-B + MLN 512x512 160000 9.20 7.58 46.75 48.46 config model | log
UPerNet ViT-B + LN + MLN 512x512 160000 9.21 6.82 47.73 49.95 config model | log
UPerNet DeiT-S 512x512 80000 4.68 29.85 42.96 43.79 config model | log
UPerNet DeiT-S 512x512 160000 4.68 29.19 42.87 43.79 config model | log
UPerNet DeiT-S + MLN 512x512 160000 5.69 11.18 43.82 45.07 config model | log
UPerNet DeiT-S + LN + MLN 512x512 160000 5.69 12.39 43.52 45.01 config model | log
UPerNet DeiT-B 512x512 80000 7.75 9.69 45.24 46.73 config model | log
UPerNet DeiT-B 512x512 160000 7.75 10.39 45.36 47.16 config model | log
UPerNet DeiT-B + MLN 512x512 160000 9.21 7.78 45.46 47.16 config model | log
UPerNet DeiT-B + LN + MLN 512x512 160000 9.21 7.75 45.37 47.23 config model | log