减低了模型参数; 相对收敛加快; 推理速度更快、精度更高。直接使用官方的train.py就可以训练。更多内容看doc里面的东西。ufld-v3在路上,在等一个长假完成。这是个临时版本,后面我对代码做了i修改。春节时间上传。 Ultra-Fast-Lane-Detection-V3代码已开源,在这个基础上,对车道线做分类。 Tips:发现模型特别大怎么办?把用于保存模型的字典中'optimizer'去掉。
我在做一个"Fantastic-yolov5"的项目,用它做了很多事,比如分割,检测车道线,分类,ocr识别车牌,多任务。目前做了50%,我在等一个长的假期去把它完成。期待吧。
PyTorch implementation of the paper "Ultra Fast Deep Lane Detection with Hybrid Anchor Driven Ordinal Classification".
<a href="https://youtu.be/VkvpoHlaMe0 " target="_blank"><img src="http://img.youtube.com/vi/VkvpoHlaMe0/0.jpg" alt="Demo" width="240" height="180" border="10" />``</a>
Please see INSTALL.md
Please modify the data_root
in any configs you would like to run. We will use configs/culane_res18.py
as an example.
To train the model, you can run:
python train.py configs/culane_res18.py --log_path /path/to/your/work/dir
python train.py configs/culane_res18.py --log_path ./work
or
python -m torch.distributed.launch --nproc_per_node=8 train.py configs/culane_res18.py --log_path /path/to/your/work/dir
It should be noted that if you use different number of GPUs, the learning rate should be adjusted accordingly. The configs' learning rates correspond to 8-GPU training on CULane and CurveLanes datasets. If you want to train on CULane or CurveLanes with single GPU, please decrease the learning rate by a factor of 1/8. On the Tusimple, the learning rate corresponds to single GPU training.
We provide trained models on CULane, Tusimple, and CurveLanes.
Dataset | Backbone | F1 | Link |
---|---|---|---|
CULane | ResNet18 | 75.0 | Google/Baidu |
CULane | ResNet34 | 76.0 | Google/Baidu |
Tusimple | ResNet18 | 96.11 | Google/Baidu |
Tusimple | ResNet34 | 96.24 | Google/Baidu |
CurveLanes | ResNet18 | 80.42 | Google/Baidu |
CurveLanes | ResNet34 | 81.34 | Google/Baidu |
For evaluation, run
mkdir tmp
python test.py configs/culane_res18.py --test_model /path/to/your/model.pth --test_work_dir ./tmp
Same as training, multi-gpu evaluation is also supported.
mkdir tmp
python -m torch.distributed.launch --nproc_per_node=8 test.py configs/culane_res18.py --test_model /path/to/your/model.pth --test_work_dir ./tmp
We provide a script to visualize the detection results. Run the following commands to visualize on the testing set of CULane.
python demo.py configs/culane_res18.py --test_model /path/to/your/culane_res18.pth
@InProceedings{qin2020ultra,
author = {Qin, Zequn and Wang, Huanyu and Li, Xi},
title = {Ultra Fast Structure-aware Deep Lane Detection},
booktitle = {The European Conference on Computer Vision (ECCV)},
year = {2020}
}
@ARTICLE{qin2022ultrav2,
author={Qin, Zequn and Zhang, Pengyi and Li, Xi},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={Ultra Fast Deep Lane Detection With Hybrid Anchor Driven Ordinal Classification},
year={2022},
volume={},
number={},
pages={1-14},
doi={10.1109/TPAMI.2022.3182097}
}