conda create -n snake python=3.7
conda activate snake
# make sure that the pytorch cuda is consistent with the system cuda
# e.g., if your system cuda is 9.0, install torch 1.1 built from cuda 9.0
pip install torch==1.1.0 -f https://download.pytorch.org/whl/cu90/stable
pip install Cython==0.28.2
pip install -r requirements.txt
# install apex
cd
git clone https://github.com/NVIDIA/apex.git
cd apex
git checkout 39e153a3159724432257a8fc118807b359f4d1c8
export CUDA_HOME="/usr/local/cuda-9.0"
python setup.py install --cuda_ext --cpp_ext
ROOT=/path/to/snake
cd $ROOT/lib/csrc
export CUDA_HOME="/usr/local/cuda-9.0"
cd dcn_v2
python setup.py build_ext --inplace
cd ../extreme_utils
python setup.py build_ext --inplace
cd ../roi_align_layer
python setup.py build_ext --inplace
- Download the Cityscapes dataset (leftImg8bit_trainvaltest.zip) from the official website.
- Download the processed annotation file cityscapes_anno.tar.gz.
- Organize the dataset as the following structure:
├── /path/to/cityscapes │ ├── annotations │ ├── coco_ann │ ├── leftImg8bit │ ├── gtFine
- Generate
coco_img
.mkdir -p coco_img/train cp leftImg8bit/train/*/* coco_img/train cp leftImg8bit/val/*/* coco_img/val cp leftImg8bit/test/*/* coco_img/test
- Create a soft link:
ROOT=/path/to/snake cd $ROOT/data ln -s /path/to/cityscapes cityscapes
- Download the Kitti dataset from the official website.
- Download the annotation file
instances_train.json
andinstances_val.json
from Kins. - Organize the dataset as the following structure:
├── /path/to/kitti │ ├── testing │ │ ├── image_2 │ │ ├── instances_val.json │ ├── training │ │ ├── image_2 │ │ ├── instances_train.json
- Create a soft link:
ROOT=/path/to/snake cd $ROOT/data ln -s /path/to/kitti kitti
- Download the Sbd dataset at here.
- Create a soft link:
ROOT=/path/to/snake cd $ROOT/data ln -s /path/to/sbd sbd