This is an on-going PyTorch re-implementation of the Axial-DeepLab paper. The re-implementation is mainly done by an amazing junior student, Huaijin Pi.
@inproceedings{wang2020axial,
title={Axial-DeepLab: Stand-Alone Axial-Attention for Panoptic Segmentation},
author={Wang, Huiyu and Zhu, Yukun and Green, Bradley and Adam, Hartwig and Yuille, Alan and Chen, Liang-Chieh},
booktitle={European Conference on Computer Vision (ECCV)},
year={2020}
}
Currently, only ImageNet classification with the "Conv-Stem + Axial-Attention" backbone is supported. If you are interested in contributing to this repo, please open an issue and we can further discuss.
pip install tensorboardX
mkdir data
cd data
ln -s path/to/dataset imagenet
- Non-distributed training
python train.py --model axial50s --gpu_id 0,1,2,3 --batch_size 128 --val_batch_size 128 --name axial50s --lr 0.05 --nesterov
- Distributed training
CUDA_VISIBLE_DEVICES=0,1,2,3 python dist_train.py --model axial50s --batch_size 128 --val_batch_size 128 --name axial50s --lr 0.05 --nesterov --dist-url 'tcp://127.0.0.1:4128' --dist-backend 'nccl' --multiprocessing-distributed --world-size 1 --rank 0
You can change the model name to train different models.
python train.py --model axial50s --gpu_id 0,1,2,3 --batch_size 128 --val_batch_size 128 --name axial50s --lr 0.05 --nesterov --test
You can test with distributed settings in the same way.
-
ImageNet training script is modified from https://github.com/mit-han-lab/proxylessnas
-
ImageNet distributed training script is modified from https://github.com/pytorch/examples/tree/master/imagenet
-
ResNet is modified from https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py