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。