README.md
April 28, 2025 ยท View on GitHub
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
- PyTorch 1.3.0.
- Matlab (for tools/prob2lines), version R2014a or later.
- Opencv (for tools/lane_evaluation), version 2.4.8 (later 2.4.x should also work).
Before Start
- Please follow ERFNet-CULane-PyTorch to prepare the CULane dataset.
- 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.
-
Download the well-trained model semi_erfnet_model_best_1_99.pth.tar to
./trainedcd $ERFNet_ROOT/trainedThe trained model has already been there.
-
Run test script
cd $ERFNet_ROOT sh ./test_erfnet.shTesting results (probability map of lane markings) are saved in
experiments/predicts/by default. -
Get curve line from probability map
cd tools/prob2lines matlab -nodisplay -r "main;exit" # or you may simply run main.m from matlab interfaceThe generated line coordinates would be saved in
tools/prob2lines/output/by default. -
Calculate precision, recall, and F-measure
cd $ERFNet_ROOT/tools/lane_evaluation make sh Run.sh # it may take over 30min to evaluateNote:
Run.shevaluate each scenario separately whilerun.shevaluate the whole. You may usecalTotal.mto 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.
- 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 - 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.
The training process should start and trained models would be saved incd $ERFNet_ROOT sh ./train_erfnet.shtrainedby 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}
}