Home

Awesome

<br /> <p align="center"> <h3 align="center"><strong>LATR: 3D Lane Detection from Monocular Images with Transformer</strong></h3> <p align="center"> <a href="https://arxiv.org/abs/2308.04583" target='_blank'> <!-- <img src="https://img.shields.io/badge/arXiv-%F0%9F%93%83-yellow"> --> <img src="https://img.shields.io/badge/arXiv-2308.04583-b31b1b.svg"> </a> <a href="" target='_blank'> <img src="https://visitor-badge.laobi.icu/badge?page_id=JMoonr.LATR&left_color=gray&right_color=yellow"> </a> <a href="https://github.com/JMoonr/LATR" target='_blank'> <img src="https://img.shields.io/github/stars/JMoonr/LATR?style=social"> </a> </p>

This is the official PyTorch implementation of LATR: 3D Lane Detection from Monocular Images with Transformer.

fig2

News

Environments

To set up the required packages, please refer to the installation guide.

Data

Please follow data preparation to download dataset.

Pretrained Models

Note that the performance of pretrained model is higher than our paper due to code refactoration and optimization. All models are uploaded to google drive.

DatasetPretrainedMetricsmd5
OpenLane-1000Google DriveF1=0.6297d8ecb900c34fd23a9e7af840aff00843
OpenLane-1000 (Lite version)Google DriveF1=0.6212918de41d0d31dbfbecff3001c49dc296
ONCEGoogle DriveF1=0.812565a6958c162e3c7be0960bceb3f54650
Apollo-balanceGoogle DriveF1=0.9697551967e8654a8a522bdb0756d74dd1a2
Apollo-rareGoogle DriveF1=0.9641184cfff1d3097a9009011f79f4594138
Apollo-visualGoogle DriveF1=0.9611cec4aa567c264c84808f3c32f5aace82

Evaluation

You can download the pretrained models to ./pretrained_models directory and refer to the eval guide for evaluation.

Train

Please follow the steps in training to train the model.

Benchmark

OpenLane

ModelsF1AccuracyX error <br> near | farZ-error <br> near | far
3DLaneNet44.1-0.479 | 0.5720.367 | 0.443
GenLaneNet32.3-0.593 | 0.4940.140 | 0.195
Cond-IPM36.3-0.563 | 1.0800.421 | 0.892
PersFormer50.589.50.319 | 0.3250.112 | 0.141
CurveFormer50.5-0.340 | 0.7720.207 | 0.651
PersFormer-Res5053.089.20.321 | 0.3030.085 | 0.118
LATR-Lite61.591.90.225 | 0.2490.073 | 0.106
LATR61.992.00.219 | 0.2590.075 | 0.104

Apollo

Plaes kindly refer to our paper for the performance on other scenes.

<table> <tr> <td>Scene</td> <td>Models</td> <td>F1</td> <td>AP</td> <td>X error <br> near | far </td> <td>Z error <br> near | far </td> </tr> <tr> <td rowspan="8">Balanced Scene</td> <td>3DLaneNet</td> <td>86.4</td> <td>89.3</td> <td>0.068 | 0.477</td> <td>0.015 | 0.202</td> </tr> <tr> <td>GenLaneNet</td> <td>88.1</td> <td>90.1</td> <td>0.061 | 0.496</td> <td>0.012 | 0.214</td> </tr> <tr> <td>CLGo</td> <td>91.9</td> <td>94.2</td> <td>0.061 | 0.361</td> <td>0.029 | 0.250</td> </tr> <tr> <td>PersFormer</td> <td>92.9</td> <td>-</td> <td>0.054 | 0.356</td> <td>0.010 | 0.234</td> </tr> <tr> <td>GP</td> <td>91.9</td> <td>93.8</td> <td>0.049 | 0.387</td> <td>0.008 | 0.213</td> </tr> <tr> <td>CurveFormer</td> <td>95.8</td> <td>97.3</td> <td>0.078 | 0.326</td> <td>0.018 | 0.219</td> </tr> <tr> <td><b>LATR-Lite</b></td> <td>96.5</td> <td>97.8</td> <td>0.035 | 0.283</td> <td>0.012 | 0.209</td> </tr> <tr> <td><b>LATR</b?</td> <td>96.8</td> <td>97.9</td> <td>0.022 | 0.253</td> <td>0.007 | 0.202</td> </tr> </table>

ONCE

MethodF1Precision(%)Recall(%)CD error(m)
3DLaneNet44.7361.4635.160.127
GenLaneNet45.5963.9535.420.121
SALAD <ONCE-3DLane>64.0775.9055.420.098
PersFormer72.0777.8267.110.086
LATR80.5986.1275.730.052

Acknowledgment

This library is inspired by OpenLane, GenLaneNet, mmdetection3d, SparseInst, ONCE and many other related works, we thank them for sharing the code and datasets.

Citation

If you find LATR is useful for your research, please consider citing the paper:

@article{luo2023latr,
  title={LATR: 3D Lane Detection from Monocular Images with Transformer},
  author={Luo, Yueru and Zheng, Chaoda and Yan, Xu and Kun, Tang and Zheng, Chao and Cui, Shuguang and Li, Zhen},
  journal={arXiv preprint arXiv:2308.04583},
  year={2023}
}