Official implementation for "Eigenlanes: Data-Driven Lane Descriptors for Structurally Diverse Lanes" [paper] [arxiv] [video].
A new dataset called "SDLane" is available at here.
We also presented another paper, "Eigencontours: Novel Contour Descriptors Based on Low-Rank Approximation", accepted to CVPR 2022 (oral) [github] [video].
- PyTorch >= 1.6
- CUDA >= 10.0
- CuDNN >= 7.6.5
- python >= 3.6
- Download repository. We call this directory as
ROOT
:
$ git clone https://github.com/dongkwonjin/Eigenlanes.git
- Download pre-trained model parameters and preprocessed data in
ROOT
:
$ cd ROOT
$ unzip pretrained.zip
$ unzip preprocessed.zip
- Create conda environment:
$ conda create -n eigenlanes python=3.7 anaconda
$ conda activate eigenlanes
- Install dependencies:
$ conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
$ pip install -r requirements.txt
. # ROOT
├── Preprocessing # directory for data preprocessing
│ ├── culane # dataset name (culane, tusimple)
| | ├── P00 # preprocessing step 1
| | | ├── code
| | ├── P01 # preprocessing step 2
| | | ├── code
| │ └── ...
│ └── ... # etc.
├── Modeling # directory for modeling
│ ├── culane # dataset name (culane, tusimple)
| | ├── code
│ ├── tusimple
| | ├── code
│ └── ... # etc.
├── pretrained # pretrained model parameters
│ ├── culane
│ ├── tusimple
│ └── ... # etc.
├── preprocessed # preprocessed data
│ ├── culane # dataset name (culane, tusimple)
| | ├── P03
| | | ├── output
| | ├── P04
| | | ├── output
| │ └── ...
│ └── ...
.
To test on CULane, you need to install official CULane evaluation tools. The official metric implementation is available here. Please downloads the tools into ROOT/Modeling/culane/code/evaluation/culane/
. The tools require OpenCV C++. Please follow here to install OpenCV C++. Then, you compile the evaluation tools. We recommend to see an installation guideline
$ cd ROOT/Modeling/culane/code/evaluation/culane/
$ make
- Set the dataset you want to train (
DATASET_NAME
) - Parse your dataset path into the
-dataset_dir
argument. - Edit
config.py
if you want to control the training process in detail
$ cd ROOT/Modeling/DATASET_NAME/code/
$ python main.py --run_mode train --pre_dir ROOT/preprocessed/DATASET_NAME/ --dataset_dir /where/is/your/dataset/path/
- Set the dataset you want to test (
DATASET_NAME
) - Parse your dataset path into the
-dataset_dir
argument. - If you want to get the performances of our work,
$ cd ROOT/Modeling/DATASET_NAME/code/
$ python main.py --run_mode test_paper --pre_dir ROOT/preprocessed/DATASET_NAME/ --paper_weight_dir ROOT/pretrained/DATASET_NAME/ --dataset_dir /where/is/your/dataset/path/
- If you want to evaluate a model you trained,
$ cd ROOT/Modeling/DATASET_NAME/code/
$ python main.py --run_mode test --pre_dir ROOT/preprocessed/DATASET_NAME/ --dataset_dir /where/is/your/dataset/path/
Data preprocessing is divided into five steps, which are P00, P01, P02, P03, and P04. Below we describe each step in detail.
- In P00, the type of ground-truth lanes in a dataset is converted to pickle format.
- In P01, each lane in a training set is represented by 2D points sampled uniformly in the vertical direction.
- In P02, lane matrix is constructed and SVD is performed. Then, each lane is transformed to its coefficient vector.
- In P03, clustering is performed to obtain lane candidates.
- In P04, training labels are generated to train the SI module in the proposed SIIC-Net.
If you want to get the preproessed data, please run the preprocessing codes in order. Also, you can download the preprocessed data.
$ cd ROOT/Preprocessing/DATASET_NAME/PXX_each_preprocessing_step/code/
$ python main.py --dataset_dir /where/is/your/dataset/path/
@Inproceedings{
Jin2022eigenlanes,
title={Eigenlanes: Data-Driven Lane Descriptors for Structurally Diverse Lanes},
author={Jin, Dongkwon and Park, Wonhui and Jeong, Seong-Gyun and Kwon, Heeyeon and Kim, Chang-Su},
booktitle={CVPR},
year={2022}
}