Home

Awesome

Source code for Semi-Supervised Lane Detection with Deep Hough Transform, ICIP2021.

This repository is built on top of ERFNet-CULane-PyTorch. Many thanks to the authors for sharing the code.

Requirements

Before Start

  1. Please follow ERFNet-CULane-PyTorch to prepare the CULane dataset.
  2. Please set the dataset path in the dataloader.

Testing

The model in repo is the ERFNet-HT+L_{HT}, which performs the best in the 1% labeled+99% unlabeled setting.

  1. Download the well-trained model semi_erfnet_model_best_1_99.pth.tar to ./trained

    cd $ERFNet_ROOT/trained
    

    The trained model has already been there.

  2. Run test script

    cd $ERFNet_ROOT
    sh ./test_erfnet.sh
    

    Testing results (probability map of lane markings) are saved in experiments/predicts/ by default.

  3. Get curve line from probability map

    cd tools/prob2lines
    matlab -nodisplay -r "main;exit"  # or you may simply run main.m from matlab interface
    

    The generated line coordinates would be saved in tools/prob2lines/output/ by default.

  4. Calculate precision, recall, and F-measure

    cd $ERFNet_ROOT/tools/lane_evaluation
    make
    sh Run.sh   # it may take over 30min to evaluate
    

    Note: Run.sh evaluate each scenario separately while run.sh evaluate the whole. You may use calTotal.m to calculate overall performance from all senarios.
    By now, you should be able to reproduce the result.

Training

The model in repo is the ERFNet-HT+L_{HT}, which performs the best in the 1% labeled+99% unlabeled setting.

  1. Train the ERFNet_HT on the 1% subset in a fully supervised manner, or you can simply download the checkpoint supervised_erfnet_model_best_1.pth.tar.
    cd $ERFNet_ROOT/pretrained
    
  2. Load the checkpoint from step 1, and train the ERFNet_HT model on the full dataset (1% labeled + 99% unlabeled), in a semi-supervised manner.
    cd $ERFNet_ROOT
    sh ./train_erfnet.sh
    
    The training process should start and trained models would be saved in trained by default.
    Then you can test the trained model following the Testing steps above. If your model position or name is changed, remember to set them to yours accordingly.

Cite Semi-Supervised Lane Detection with Deep Hough Transform

If you find our paper useful in your research, please consider citing:

@article{lin2021semi,
  title={Semi-supervised lane detection with Deep Hough Transform},
  author={Lin, Yancong and Pintea, Silvia L and van Gemert, Jan C},
  booktitle={International Conference on Image Processing},
  year={2021}
}