ztsrxh / RoadBEV

Codes for RoadBEV: road surface reconstruction in Bird's Eye View
MIT License
131 stars 12 forks source link

Update logs and News

Introduction

This is the implementation of the work: RoadBEV: Road Surface Reconstruction in Bird’s Eye View.

Road surface reconstruction, an essential task for autonomous driving comfort control, suffers from poor performance in perspective view. We propose RoadBEV-mono and RoadBeV-stereo, which reconstruct road surface with monocular and stereo images in Bird's Eye View, respectively.

image image

Data preparation

We use Road Surface Reconstruction Dataset (RSRD). The GT elevation maps should be generated off-line, as it costs much computation. The dataset used here is extracted from trainset of RSRD-dense. We split it into train (1210) and test (371) sets. You can split some from the train set for validation. The samples' info (including path, pose, location) are stored in pkl files in the filenames folder of this repo.

python preprocess_gt.py --save_dir '/data/preprocessed/' --dataset 'train'
python preprocess_gt.py --save_dir '/data/preprocessed/' --dataset 'test'

  The elevation maps along with masks are saved in .pkl format. For convenience, you can also directly download generated GT labels here.

[!NOTE]

  • Further, we provide the info for all samples in the RSRD-dense, which contains 2430 training and 296 testing samples download.
  • The sample info for RSRD-sparse is also available, containing 13K samples download. It has very sparse GT point cloud labels, which can be used for pretraining or unsupervised learning.
  • The provided small dataset in this work is just an example, as we focus more on the feasibility of the pipeline. Reserachers can also build larger train/test sets with the provided data.

The directories should be like:

RoadBEV
├── utils
│   └── dataset.py
├── filenames
│   ├── train
│   │    ├── 20230317074852.000.pkl
│   │    └── ...
│   ├── test
│   │    ├── 20230317075641.200.pkl
│   │    └── ...
├── train.py
├── test.py
└── preprocess_gt.py

RSRD-dense
├── train
│   ├── 2023-03-17-07-48-37
│   │    ├── left_half
│   │    ├── right_half
│   │    ├── pcd
│   │    └── ...
│   ├── 2023-03-21-07-36-59
│   └──...

preprocessed
├── train
│   ├── 20230409021332.400.pkl
│   └── ...
├── test
│   ├── 20230409015836.600.pkl
│   └── ...

Environment

Create a virtual environment and activate it.

conda create -n roadbev python=3.7
conda activate roadbev

Dependencies

conda install pytorch=1.10.0 torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
conda install -c open3d-admin open3d
pip install opencv-python
pip install pillow

Train

Use the following command to train RoadBEV-mono:

python train.py --lr 8e-4

Use the following command to train RoadBEV-stereo:

python train.py --stereo --lr 5e-4

Test

python test.py --loadckpt 'xxx.ckpt'  # test RoadBEV-mono
python test.py --stereo --loadckpt 'xxx.ckpt'  # test RoadBEV-stereo

Results

Pretrained Model

RoadBEV-mono, RoadBEV-stereo

Performance for road surface reconstruction with RoadBEV-mono

Method Abs. err. (cm) RMSE >0.5cm (%)
LapDepth 2.81 3.12 85.3
PixelFormer 2.65 2.86 82.0
iDisc 2.64 2.88 84.3
AdaBins 2.59 2.79 82.4
RoadBEV-mono(Ours) 1.83 2.07 78.6

Performance for road surface reconstruction with RoadBEV-stereo

Method Abs. err. (cm) RMSE >0.5cm (%)
IGEV-Stereo 0.651 0.797 49.5
PSMNet 0.654 0.785 50.1
CFNet 0.647 0.760 50.8
ACVNet 0.596 0.723 46.2
GwcNet 0.588 0.711 44.9
DVANet 0.546 0.685 40.9
RoadBEV-stereo(Ours) 0.503 0.609 37.0

Distance-wise absolute error

image

Visualization of reconstruction by RoadBEV-mono

Visualize the inference results saved as .pkl files in test.py:

python visualization.py

image

Visualization of reconstruction by RoadBEV-stereo

image

Future research

This is the very initial exploration of reconstructing road surface in BEV. Future research can be improved in many aspects like:

If you find this project helpful in your research, welcome to cite the paper.

@misc{zhao2024roadbev,
      title={RoadBEV: Road Surface Reconstruction in Bird's Eye View}, 
      author={Tong Zhao and Lei Yang and Yichen Xie and Mingyu Ding and Masayoshi Tomizuka and Yintao Wei},
      year={2024},
      eprint={2404.06605},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}