conda create -n e2ec python=3.7
conda activate e2ec
# install pytorch, the cuda version is 11.1
# You can also install other versions of cuda and pytorch, but please make sure # that the pytorch cuda is consistent with the system cuda
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
pip install Cython==0.28.2
pip install -r requirements.txt
ROOT=/path/to/e2ec
cd $ROOT/network/backbone/DCNv2-master
# please check your cuda version and modify the cuda version in the command
export CUDA_HOME="/usr/local/cuda-11.1"
bash ./make.sh
Maybe you will encounter some build errors. You can choose a plan :
- You can look for another implementation of DCN-V2 and compiled successfully.
- You can set
cfg.model.use_dcn
asFalse
. This may result in a slight drop in accuracy. - You can install mmcv, and replace 352 line of
network/backbone/dla.py
asfrom mmcv.ops import ModulatedDeformConv2dPack as DCN
, replace thedeformable_groups
in 353 line asdeform_groups
.
-
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
-
Create a soft link:
ROOT=/path/to/e2ec 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 │ │ ├── instance_val.json │ ├── training │ │ ├── image_2 │ │ ├── instance_train.json
-
Create a soft link:
ROOT=/path/to/e2ec cd $ROOT/data ln -s /path/to/kitti kitti
- Download the Sbd dataset at here.
- Create a soft link:
ROOT=/path/to/e2ec cd $ROOT/data ln -s /path/to/sbd sbd
-
Download the Sbd dataset at here.
-
Organize the dataset as the following structure:
├── /path/to/coco │ ├── annotations │ │ ├── instances_train2017.json │ │ ├── instances_val2017.json │ │ ├── image_info_test-dev2017.json │ ├── train2017 │ ├── val2017 │ ├── test2017
-
Create a soft link:
ROOT=/path/to/e2ec cd $ROOT/data ln -s /path/to/coco coco