Skip to content

Latest commit

 

History

History

MaskFormer

VW-MaskFormer

Installation

See installation instructions.

Datasets

See Preparing Datasets for MaskFormer.

Train

More Utilization: See Getting Started with MaskFormer.

Swin-Tiny

python ./train_net.py \
--resume --num-gpus 2 --dist-url auto \
--config-file configs/ade20k-150/swin/vw/vw_maskformer_swin_tiny_bs16_160k.yaml \
OUTPUT_DIR path/to/tiny TEST.EVAL_PERIOD 10000 MODEL.MASK_FORMER.SIZE_DIVISIBILITY 64

Swin-Small

python ./train_net.py \
--resume --num-gpus 4 --dist-url auto \
--config-file configs/ade20k-150/swin/vw/vw_maskformer_swin_small_bs16_160k.yaml \
OUTPUT_DIR path/to/small TEST.EVAL_PERIOD 10000 MODEL.MASK_FORMER.SIZE_DIVISIBILITY 64

Swin-Base

python ./train_net.py \
--resume --num-gpus 8 --dist-url auto \
--config-file configs/ade20k-150/swin/vw/vw_maskformer_swin_base_IN21k_384_bs16_160k_res640.yaml \
OUTPUT_DIR path/to/base TEST.EVAL_PERIOD 10000 MODEL.MASK_FORMER.SIZE_DIVISIBILITY 64

Swin-Large

python ./train_net.py \
--resume --num-gpus 16 --dist-url auto \
--config-file configs/ade20k-150/swin/vw/vw_maskformer_swin_large_IN21k_384_bs16_160k_res640.yaml \
OUTPUT_DIR path/to/large TEST.EVAL_PERIOD 10000 MODEL.MASK_FORMER.SIZE_DIVISIBILITY 64

Evaluation

cd MaskFormer
python ./train_net.py \
--eval-only --num-gpus NGPUS --dist-url auto \
--config-file path/to/config \
MODEL.WEIGHTS path/to/weight TEST.AUG.ENABLED True MODEL.MASK_FORMER.SIZE_DIVISIBILITY 64

Model

Name Backbone crop
size
lr
sched
mIoU mIoU
(ms+flip)
download
VW-MaskFormer Swin-T 512x512 160k 47.4 49.0 model
VW-MaskFormer Swin-S 512x512 160k 50.5 52.7 model
VW-MaskFormer Swin-B 640x640 160k 53.8 54.6 model
VW-MaskFormer Swin-L 640x640 160k 55.3 56.5 model

Citing VW-MaskFormer

@inproceedings{yan2023multi,
  title={Multi-Scale Representations by Varing Window Attention for Semantic Segmentation},
  author={Yan, Haotian and Wu, Ming and Zhang, Chuang},
  booktitle={The Twelfth International Conference on Learning Representations},
  year={2023}
}