Update README.md
This repo is a PyTorch implementation of applying VAN (Visual Attention Network) to semantic segmentation. The code is based on mmsegmentaion.
More details can be found in Visual Attention Network.
@article{guo2022visual, title={Visual Attention Network}, author={Guo, Meng-Hao and Lu, Cheng-Ze and Liu, Zheng-Ning and Cheng, Ming-Ming and Hu, Shi-Min}, journal={arXiv preprint arXiv:2202.09741}, year={2022} }
Notes: Pre-trained models can be found in TsingHua Cloud.
Notes: In this scheme, we use multi-scale validation following Swin-Transformer. FLOPs are tested under the input size of 2048 $\times$ 512 using torchprofile (recommended, highly accurate and automatic MACs/FLOPs statistics).
Install MMSegmentation and download ADE20K according to the guidelines in MMSegmentation.
pip install mmsegmentation==0.26.0 (https://github.com/open-mmlab/mmsegmentation/tree/v0.26.0)
We use 8 GPUs for training by default. Run:
./dist_train.sh /path/to/config 8
To evaluate the model, run:
./dist_test.sh /path/to/config /path/to/checkpoint_file 8 --eval mIoU
Install torchprofile using
pip install torchprofile
To calculate FLOPs for a model, run:
bash tools/flops.sh /path/to/config --shape 512 512
Our implementation is mainly based on mmsegmentaion, Swin-Transformer, PoolFormer, and Enjoy-Hamburger. Thanks for their authors.
This repo is under the Apache-2.0 license. For commercial use, please contact the authors.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Visual Attention Network (VAN) for Segmentaion
This repo is a PyTorch implementation of applying VAN (Visual Attention Network) to semantic segmentation. The code is based on mmsegmentaion.
More details can be found in Visual Attention Network.
Citation
Results
Notes: Pre-trained models can be found in TsingHua Cloud.
VAN + UperNet
Notes: In this scheme, we use multi-scale validation following Swin-Transformer. FLOPs are tested under the input size of 2048 $\times$ 512 using torchprofile (recommended, highly accurate and automatic MACs/FLOPs statistics).
VAN + Semantic FPN
Preparation
Install MMSegmentation and download ADE20K according to the guidelines in MMSegmentation.
Requirement
Training
We use 8 GPUs for training by default. Run:
Evaluation
To evaluate the model, run:
FLOPs
Install torchprofile using
To calculate FLOPs for a model, run:
Acknowledgment
Our implementation is mainly based on mmsegmentaion, Swin-Transformer, PoolFormer, and Enjoy-Hamburger. Thanks for their authors.
LICENSE
This repo is under the Apache-2.0 license. For commercial use, please contact the authors.