You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
by Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun, details are in paper.
Introduction
This repository is build for the proposed self-attention network (SAN), which contains full training and testing code. The implementation of SA module with optimized CUDA kernels are also included.
Usage
Requirement:
Hardware: tested with 8 x Quadro RTX 6000 (24G).
Software: tested with PyTorch 1.4.0, Python3.7, CUDA 10.1, CuPy 10.1, tensorboardX.
Clone the repository:
git clone https://github.com/hszhao/SAN.git
Train:
Download and prepare the ImageNet dataset (ILSVRC2012) and symlink the path to it as follows (you can alternatively modify the relevant path specified in folder config):
cd SAN
mkdir -p dataset
ln -s /path_to_ILSVRC2012_dataset dataset/ILSVRC2012
Specify the gpus (usually 8 gpus are adopted) used in config and then do training:
sh tool/train.sh imagenet san10_pairwise
If you are using SLURM for nodes manager, uncomment lines in train.sh and then do training:
sbatch tool/train.sh imagenet san10_pairwise
Test:
Download trained SAN models and put them under folder specified in config or modify the specified paths, and then do testing:
sh tool/test.sh imagenet san10_pairwise
Visualization:
tensorboardX incorporated for better visualization regarding curves:
tensorboard --logdir=exp/imagenet
Other:
Resources: GoogleDrive LINK contains shared models.