Skip to content

Latest commit

 

History

History
110 lines (70 loc) · 3.25 KB

README.md

File metadata and controls

110 lines (70 loc) · 3.25 KB

MPViT on ADE20K Semantic segmentation

This folder contains UperNet results on top of mmsegmentation.

Main results on ADE20K Semantic segmentation

All model are trained using ImageNet-1K pretrained weight.

Backbone Method Crop Size Lr Schd mIoU #params FLOPs weight
MPViT-S UperNet 512x512 160K 48.3 52M 943G weight
MPViT-B UperNet 512x512 160K 50.3 105M 1185G weight

Preparation

Required packages

We test all models using pytorch==1.7.0 mmcv-full==1.3.0 mmseg==0.11.0 cuda==10.1 on NVIDIA V100 GPUs.

Install the mmsegmentation library.

pip install mmcv-full==1.3.0 mmsegmentation==0.11.0

Data

Please refer to the datasets guide of mmseg to prepare the ADE20K dataset.

Evaluation

For more details, please refer to the guide of mmseg.

tools/dist_test.sh  <CONFIG_PATH> <CHECKPOINT_PATH or URL> <NUM_GPUS> --eval mIoU

For UperNet with MPViT-Small backbone:

tools/dist_test.sh configs/mpvit/upernet/upernet_mpvit_small_160k_ade20k.py https://dl.dropbox.com/s/5opqzboalok7lme/upernet_mpvit_small.pth 8 --eval mIoU
This should give the following result:
+--------+-------+-------+-------+
| Scope  | mIoU  | mAcc  | aAcc  |
+--------+-------+-------+-------+
| global | 48.25 | 60.56 | 82.43 |
+--------+-------+-------+-------+

For UperNet with MPViT-Base backbone:

 tools/dist_test.sh configs/mpvit/upernet/upernet_mpvit_base_160k_ade20k.py https://dl.dropbox.com/s/shr88fojdcqvhpr/upernet_mpvit_base.pth  8 --eval mIoU
This should give the following result:
+--------+-------+-------+-------+
| Scope  | mIoU  | mAcc  | aAcc  |
+--------+-------+-------+-------+
| global | 50.26 | 62.18 | 83.55 |
+--------+-------+-------+-------+

Training

For more details, please refer to the guide of mmseg.

./tools/dist_train.sh <CONFIG_PATH> <NUM_GPUS>

For UperNet with MPViT-Small backbone:

./tools/dist_train.sh configs/mpvit/upernet/upernet_mpvit_small_160k_ade20k.py 8

For UperNet with MPViT-Base backbone:

./tools/dist_train.sh configs/mpvit/upernet/upernet_mpvit_base_160k_ade20k.py 8

Acknowledgment

Thanks to mmsegmentation for the UperNet implementation. We follow the optimization hyperparameters from Swin Transformer and XCiT repositories.