2.5 KiB
Install
-
Clone the RESA repository
git clone https://github.com/zjulearning/resa.git
We call this directory as
$RESA_ROOT
-
Create a conda virtual environment and activate it (conda is optional)
conda create -n resa python=3.8 -y conda activate resa
-
Install dependencies
# Install pytorch firstly, the cudatoolkit version should be same in your system. (you can also use pip to install pytorch and torchvision) conda install pytorch torchvision cudatoolkit=10.1 -c pytorch # Or you can install via pip pip install torch torchvision # Install python packages pip install -r requirements.txt
-
Data preparation
Download CULane and Tusimple. Then extract them to
$CULANEROOT
and$TUSIMPLEROOT
. Create link todata
directory.cd $RESA_ROOT ln -s $CULANEROOT data/CULane ln -s $TUSIMPLEROOT data/tusimple
For Tusimple, the segmentation annotation is not provided, hence we need to generate segmentation from the json annotation.
python scripts/convert_tusimple.py --root $TUSIMPLEROOT # this will generate segmentations and two list files: train_gt.txt and test.txt
For CULane, you should have structure like this:
$RESA_ROOT/data/CULane/driver_xx_xxframe # data folders x6 $RESA_ROOT/data/CULane/laneseg_label_w16 # lane segmentation labels $RESA_ROOT/data/CULane/list # data lists
For Tusimple, you should have structure like this:
$RESA_ROOT/data/tusimple/clips # data folders $RESA_ROOT/data/tusimple/lable_data_xxxx.json # label json file x4 $RESA_ROOT/data/tusimple/test_tasks_0627.json # test tasks json file $RESA_ROOT/data/tusimple/test_label.json # test label json file
-
Install CULane evaluation tools.
This tools requires OpenCV C++. Please follow here to install OpenCV C++. Or just install opencv with command
sudo apt-get install libopencv-dev
Then compile the evaluation tool of CULane.
cd $RESA_ROOT/runner/evaluator/culane/lane_evaluation make cd -
Note that, the default
opencv
version is 3. If you use opencv2, please modify theOPENCV_VERSION := 3
toOPENCV_VERSION := 2
in theMakefile
.