Pytorch实施本文“超快速结构意识到的深车道检测”。
[2022年7月18日]更新:我们方法的新版本已被TPAMI 2022接受。代码可在此处找到。
[2021年6月28日]更新:我们将发布一个扩展版本,与ECCV版本相比,使用RESNET-18骨干链提高了Culane的6.3点F1。
更新:我们的论文已被ECCV2020接受。

评估代码是根据SCNN和Tusimple基准修改的。
Caffe模型和原始版本可以在此处找到。
请参阅install.md
首先,请根据您的环境修改configs/culane.py或configs/tusimple.py中的data_root和log_path 。
data_root是您的Culane数据集或Tusimple数据集的路径。log_path是存储张板日志,训练的模型和代码备份的地方。它应该放在该项目之外。对于单个GPU培训,请运行
python train.py configs/path_to_your_config进行多GPU培训,运行
sh launch_training.sh或者
python -m torch.distributed.launch --nproc_per_node= $NGPUS train.py configs/path_to_your_config如果没有验证的火炬模型,则多GPU培训可能会导致多次下载。您可以首先手动下载相应的型号,然后重新启动多GPU培训。
由于我们的代码具有自动备份功能,该功能将根据Gitignore将所有代码复制到log_path ,因此,如果Gitignore未过滤,也可能会复制其他临时文件,如果TEMP文件较大,则可能会阻止执行。因此,您应该保持工作目录清洁。
除了配置样式设置外,我们还支持命令行样式一号。您可以覆盖像
python train.py configs/path_to_your_config --batch_size 8在培训期间,将batch_size为8。
要使用张板可视化日志,请运行
tensorboard --logdir log_path --bind_all我们在Culane和Tusimple上提供了两种训练有素的RES-18型号。
| 数据集 | 公制纸 | 公制此存储库 | GTX上的AVG FPS 1080TI | 模型 |
|---|---|---|---|---|
| 塔西姆普 | 95.87 | 95.82 | 306 | Googlerive/baidudrive(代码:bghd) |
| Culane | 68.4 | 69.7 | 324 | Googlerive/baidudrive(代码:W9TW) |
进行评估,运行
mkdir tmp
# This a bad example, you should put the temp files outside the project.
python test.py configs/culane.py --test_model path_to_culane_18.pth --test_work_dir ./tmp
python test.py configs/tusimple.py --test_model path_to_tusimple_18.pth --test_work_dir ./tmp与培训一样,也支持多GPU评估。
我们提供一个脚本来可视化检测结果。运行以下命令以在Culane和Tusimple的测试集上可视化。
python demo.py configs/culane.py --test_model path_to_culane_18.pth
# or
python demo.py configs/tusimple.py --test_model path_to_tusimple_18.pth由于未订购Tusimple的测试集,因此可视化的视频可能看起来很糟糕,我们不建议这样做。
要测试运行时,请运行
python speed_simple.py
# this will test the speed with a simple protocol and requires no additional dependencies
python speed_real.py
# this will test the speed with real video or camera input它将循环100次,并计算环境中的平均运行时和FPS。
@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 }
}感谢Zchrissirhcz对Culane的编译工具的贡献,Kopisoftware为速度测试做出了贡献,以及在Windows平台上进行测试的USTCLBH。