Home

Awesome

ADNet: Lane Shape Prediction via Anchor Decomposition

Pytorch implementation of the paper "ADNet: Lane Shape Prediction via Anchor Decomposition " (ICCV2023 Acceptance)

[paper]

Abstract

In this paper, we revisit the limitations of anchor-based lane detection methods, which have predominantly focused on fixed anchors that stem from the edges of the image, disregarding their versatility and quality. To overcome the inflexibility of anchors, we decompose them into learning the heat map of starting points and their associated directions. This decomposition removes the limitations on the starting point of anchors, making our algorithm adaptable to different lane types in various datasets. To enhance the quality of anchors, we introduce the Large Kernel Attention (LKA) for Feature Pyramid Network (FPN). This significantly increases the receptive field, which is crucial in capturing the sufficient context as lane lines typically run throughout the entire image. We have named our proposed system the Anchor Decomposition Network (ADNet). Additionally, we propose the General Lane IoU (GLIoU) loss, which significantly improves the performance of ADNet in complex scenarios. Experimental results on three widely used lane detection benchmarks, VIL-100, CULane, and TuSimple, demonstrate that our approach outperforms the state-of-the-art methods on VIL-100 and exhibits competitive accuracy on CULane and TuSimple. image

Environment setup

  1. Clone this repository
git clone https://github.com/Sephirex-X/ADNet.git
  1. create conda environment if you using conda
conda create -n ADNet && conda activate ADNet
  1. install pytorch and Shapely
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
conda install Shapely==1.7.0
  1. building independencies
pip install -r requirements.txt

adding -i https://pypi.tuna.tsinghua.edu.cn/simple if you locate in China mainland.

  1. setup everything
python setup.py build develop

Benchmarks setup

  1. create folder under root path using
mkdir data
  1. organize structure like these:
data/
├── CULane -> /mnt/data/xly/CULane/
├── tusimple -> /mnt/data/xly/tusimple/
└── VIL100 -> /mnt/data/xly/VIL100/

under each folder, you may see structure like this:

CULane

Download CULane.

/mnt/data/xly/CULane/
├── driver_100_30frame
├── driver_161_90frame
├── driver_182_30frame
├── driver_193_90frame
├── driver_23_30frame
├── driver_37_30frame
├── laneseg_label_w16
└── list

Tusimple

Download Tusimple.

/mnt/data/xly/tusimple/
├── clips
├── label_data_0313.json
├── label_data_0531.json
├── label_data_0601.json
├── test_label.json
└── test_tasks_0627.json

VIL-100

Download VIL-100.

You may find anno_txt here anno_txt.zip

/mnt/data/xly/VIL100/
├── Annotations
├── anno_txt
├── data
├── JPEGImages
└── Json

Inferencing

  1. You can inferencing model using:
python main.py {configs you want to use} --work_dirs {your folder} --load_from {your checkpoint path} --validate --gpus {device id}

for example:

python main.py configs/adnet/tusimple/resnet18_tusimple.py --work_dirs test --load_from best_ckpt/tusimple/res18/best.pth --validate --gpus 3

If you don't assign --work_dirs, it will create folder named work_dirs under root path by default.

  1. By adding --view you can see visualization results under folder vis_results, under root path. image2
  2. You can test fps using:
python tools/fps_test.py

Training (only support single gpu)

  1. Simply using:
python main.py {configs you want to use} --work_dirs {your folder} --gpus {device id}
  1. You can resume from your last checkpoint by:
python main.py {configs you want to use} --work_dirs {your folder} --load_from {your checkpoint path} --gpus {device id}
  1. Other hyperparameters can be changed within config files.

  2. Your can check training procedure using tensorboard module:

    tensorboard --logdir {your folder} --host=0.0.0.0 --port=1234
    

Results

image_3

VIL-100

BackboneF1@50AccFPFNDownload
ResNet-1889.9794.235.05.1Link
ResNet-3490.3994.384.44.9Link
ResNet-10190.9094.274.75.0Link

CULane

BackboneF1@50Download
ResNet-1877.56Link
ResNet-3478.94Link

Tusimple

BackboneF1@50AccFPFNDownload
ResNet-1896.9096.232.913.29Link
ResNet-3497.3196.602.832.53Link

Citation

If you find our work is useful, please consider citing:

@article{xiao2023adnet,
  title={ADNet: Lane Shape Prediction via Anchor Decomposition},
  author={Xiao, Lingyu and Li, Xiang and Yang, Sen and Yang, Wankou},
  journal={arXiv preprint arXiv:2308.10481},
  year={2023}
}
@InProceedings{Xiao_2023_ICCV,
    author    = {Xiao, Lingyu and Li, Xiang and Yang, Sen and Yang, Wankou},
    title     = {ADNet: Lane Shape Prediction via Anchor Decomposition},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2023},
    pages     = {6404-6413}
}

Acknowledgement

<!--ts--> <!--te-->