Coder Social home page Coder Social logo

adnet's Introduction

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

Backbone F1@50 Acc FP FN Download
ResNet-18 89.97 94.23 5.0 5.1 Link
ResNet-34 90.39 94.38 4.4 4.9 Link
ResNet-101 90.90 94.27 4.7 5.0 Link

CULane

Backbone F1@50 Download
ResNet-18 77.56 Link
ResNet-34 78.94 Link

Tusimple

Backbone F1@50 Acc FP FN Download
ResNet-18 96.90 96.23 2.91 3.29 Link
ResNet-34 97.31 96.60 2.83 2.53 Link

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

adnet's People

Contributors

sephirex-x avatar

Stargazers

 avatar Byronnar avatar Quanyi Li avatar Nw avatar ray avatar  avatar Hanchi Sun avatar weiWang avatar rayna avatar An-zhi WANG avatar senius avatar  avatar  avatar  avatar FlyEgle avatar Seasoning avatar  avatar  avatar Zichen Yu avatar Ziyu Li avatar  avatar

Watchers

 avatar

Forkers

liuqihan cv-det

adnet's Issues

Missing anno_txt in VIL-100

Hi, Nice Work!
It seems you have an extra annotation fold named anno_txt compare with original dataset.
image
Can you please provide the generation code? Thanks

drawn backwards ?????

Hello, are the starting positions of shape_hm_gt and hm_gt drawn backwards (the opposite case of symmetry in the middle of the picture)? Because when I look at the original picture, I guess it's upside down

Why do the lanes predicted by CLRNet all start from the edges in VIL-100?

Thank you for your excellent work. The visualization results of ADNet are really amazing, but I have a question to ask. I want to know why the anchors of CLRNet are ultimately distributed at the edges of the image. As far as I know, although the anchors of CLRNet, like LineCNN and LaneATT, are pre-defined, their positions and directions can also be learned. Therefore, theoretically, as long as the ground truth does not start from the edges of the image, the lane lines predicted by the trained CLRNet should not start from the edges, right?
1700907721778
1700907721778

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.