This repo is the pytorch implementation for our paper:
A Keypoint-based Global Association Network for Lane Detection
- Create a conda virtual environment and activate it.
conda create -n ganet python=3.7 -y conda activate ganet conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch -y pip install -r requirements/build.txt
- Clone this repository and enter it:
git clone https://github.com/Wolfwjs/GANet.git cd GANet python setup.py develop
Download datasets and put it into datasets/
folder. And edit the data_root
in the config file to your dataset path.
The directory structure should be like follows:
[data-path]/culane
├── driver_23_30frame
├── driver_37_30frame
├── driver_100_30frame
├── driver_161_90frame
├── driver_182_30frame
├── driver_193_90frame
└── list
└── test_split
| ├── test0_normal.txt
| ├── test1_crowd.txt
| ├── test2_hlight.txt
| ├── test3_shadow.txt
| ├── test4_noline.txt
| ├── test5_arrow.txt
| ├── test6_curve.txt
| ├── test7_cross.txt
| └── test8_night.txt
└── train.txt
└── test.txt
└── val.txt
The directory structure should be like follows:
[data-path]/tusimple
├── clips
├── label_data_0313.json
├── label_data_0531.json
├── label_data_0601.json
├── label_data_0601.json
├── test_label.json
└── test_baseline.json
Here are our GANet models (released on April 24th, 2022):
Version | Backbone | FPS | F1 | Weights |
---|---|---|---|---|
Small | ResNet18 | 153 | 78.79 | ganet_culane_resnet18.pth |
Medium | ResNet-34 | 127 | 79.39 | ganet_culane_resnet34.pth |
Large | ResNet-101 | 63 | 79.63 | ganet_culane_resnet101.pth |
Version | Backbone | FPS | F1 | Weights |
---|---|---|---|---|
Small | ResNet18 | 153 | 97.71 | ganet_tusimple_resnet18.pth |
Medium | ResNet-34 | 127 | 97.68 | ganet_tusimple_resnet34.pth |
Large | ResNet-101 | 33 | 97.45 | ganet_tusimple_resnet101.pth |
To evalute the model, download the corresponding weights file into the [CHECKPOINT]
directory and run the following commands.
# For example, model = ganet-small
sh slurm_test [PARTITION] [JOB_NAME] tusimple final_exp_res18_s8 [CHECKPOINT]
We use the official evaluation tools of CULane and TuSimple to evaluate the results. And we include them in tools
directory which may be helpful for you.
# For example, model = ganet-small
sh slurm_train.sh [PARTITION] [JOB_NAME] tusimple final_exp_res18_s8 ./output
If you find this repo useful for your research, please cite
@inproceedings{ganet-cvpr2022,
author = {Jinsheng Wang, Yinchao Ma, Shaofei Huang, Tianrui Hui, Fei Wang, Chen Qian, Tianzhu Zhang},
title = {A Keypoint-based Global Association Network for Lane Detection},
booktitle = {CVPR},
year = {2022},
}
For questions about our paper or code, please contact Jinsheng Wang or Yinchao Ma