Skip to content

The official implementation of "CLRerNet: Improving Confidence of Lane Detection with LaneIoU"

License

Notifications You must be signed in to change notification settings

hirotomusiker/CLRerNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PWC

CLRerNet Official Implementation

The official implementation of our paper "CLRerNet: Improving Confidence of Lane Detection with LaneIoU", by Hiroto Honda and Yusuke Uchida.

What's New

  • Code for training is available ! (Dec. 1, 2023)
  • Our CLRerNet paper has been accepted to WACV2024 ! (Oct. 25, 2023)
  • LaneIoU loss and cost are published. (PR#17, Oct.22, 2023)

Method

CLRerNet features LaneIoU for the target assignment cost and loss functions aiming at the improved quality of confidence scores.
LaneIoU takes the local lane angles into consideration to better correlate with the segmentation-based IoU metric.

Performance

CLRerNet achieves the state-of-the-art performance on CULane benchmark significantly surpassing the baseline.

Model Backbone F1 score GFLOPs
CLRNet DLA34 80.47 18.4
CLRerNet DLA34 81.12±0.04 * 18.4
CLRerNet⋆ DLA34 81.43±0.14 * 18.4

* F1 score stats of five models reported in our paper. The release models' scores are 81.11 (CLRerNet) and 81.55 (CLRerNet⋆, EMA model) respectively.

Install

Docker environment is recommended for installation:

docker-compose build --build-arg UID="`id -u`" dev
docker-compose run --rm dev

See Installation Tips for more details.

Inference

Run the following command to detect the lanes from the image and visualize them:

python demo/image_demo.py demo/demo.jpg configs/clrernet/culane/clrernet_culane_dla34_ema.py clrernet_culane_dla34_ema.pth --out-file=result.png

Test

Run the following command to evaluate the model on CULane dataset:

python tools/test.py configs/clrernet/culane/clrernet_culane_dla34_ema.py clrernet_culane_dla34_ema.pth

For dataset preparation, please refer to Dataset Preparation.

Frame Difference Calculation

Filtering out redundant frames during training helps the model avoid overfitting to them. We provide a simple calculator that outputs an npz file containing frame difference values.

python tools/calculate_frame_diff.py [culane_root_path]

Also you can find the npz file [here].

Train

Make sure that the frame difference npz file is prepared as dataset/culane/list/train_diffs.npz.
Run the following command to train a model on CULane dataset:

python tools/train.py configs/clrernet/culane/clrernet_culane_dla34.py

Speed Test

Calculate fps by inference iteration.

python tools/speed_test.py configs/clrernet/culane/clrernet_culane_dla34.py clrernet_culane_dla34.pth --filename demo/demo.jpg --n_iter_warmup 1000 --n_iter_test 10000

Citation

@article{honda2023clrernet,
      title={CLRerNet: Improving Confidence of Lane Detection with LaneIoU},
      author={Hiroto Honda and Yusuke Uchida},
      journal={arXiv preprint arXiv:2305.08366},
      year={2023},
}

References