Home

Awesome

<div align="center">

TopoNet: A New Baseline for Scene Topology Reasoning

Graph-based Topology Reasoning for Driving Scenes

arXiv OpenLane-V2 LICENSE

method

</div>

This repository contains the source code of TopoNet, Graph-based Topology Reasoning for Driving Scenes.

TopoNet is the first end-to-end framework capable of abstracting traffic knowledge beyond conventional perception tasks, i.e., reasoning connections between centerlines and traffic elements from sensor inputs. It unifies heterogeneous feature learning and enhances feature interactions via the graph neural network architecture and the knowledge graph design.

Instead of recognizing lanes, we adhere that modeling the lane topology is appropriate to construct road components within the perception framework, to facilitate the ultimate driving comfort. This is in accordance with the UniAD philosophy.

Table of Contents

News

Main Results

Results on OpenLane-V2 subset-A val

We provide results on Openlane-V2 subset-A val set.

MethodBackboneEpochDET<sub>l</sub>TOP<sub>ll</sub>DET<sub>t</sub>TOP<sub>lt</sub>OLS
STSUResNet-502412.70.543.015.125.4
VectorMapNetResNet-502411.10.441.76.220.8
MapTRResNet-50248.30.243.55.820.0
MapTR*ResNet-502417.71.143.510.426.0
TopoNetResNet-502428.64.148.620.335.6

:fire:: Based on the updated v1.1 OpenLane-V2 devkit and metrics, we have reassessed the performance of TopoNet and other SOTA models. For more details please see issue #76 of OpenLane-V2.

MethodBackboneEpochDET<sub>l</sub>TOP<sub>ll</sub>DET<sub>t</sub>TOP<sub>lt</sub>OLS
STSUResNet-502412.72.943.019.829.3
VectorMapNetResNet-502411.12.741.79.224.9
MapTRResNet-50248.32.343.58.924.2
MapTR*ResNet-502417.75.943.515.131.0
TopoNetResNet-502428.610.948.623.839.8

*: evaluation based on matching results on Chamfer distance.
The result of TopoNet is from this repo.

Results on OpenLane-V2 subset-B val

MethodBackboneEpochDET<sub>l</sub>TOP<sub>ll</sub>DET<sub>t</sub>TOP<sub>lt</sub>OLS
TopoNetResNet-502424.46.752.616.736.0

The result is based on the updated v1.1 OpenLane-V2 devkit and metrics.
The result of TopoNet is from this repo.

Model Zoo

ModelDatasetBackboneEpochOLSMemoryConfigDownload
TopoNet-R50subset-AResNet-502439.812.3Gconfigckpt / log
TopoNet-R50subset-BResNet-502436.08.2Gconfigckpt / log

Prerequisites

Installation

We recommend using conda to run the code.

conda create -n toponet python=3.8 -y
conda activate toponet

# (optional) If you have CUDA installed on your computer, skip this step.
conda install cudatoolkit=11.1.1 -c conda-forge

pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html

Install mm-series packages.

pip install mmcv-full==1.5.2 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html
pip install mmdet==2.26.0
pip install mmsegmentation==0.29.1
pip install mmdet3d==1.0.0rc6

Install other required packages.

pip install -r requirements.txt

Prepare Dataset

Following OpenLane-V2 repo to download the data and run the preprocessing code.

cd TopoNet
mkdir data && cd data

ln -s {PATH to OpenLane-V2 repo}/data/OpenLane-V2

After setup, the hierarchy of folder data is described below:

data/OpenLane-V2
├── train
|   └── ...
├── val
|   └── ...
├── test
|   └── ...
├── data_dict_subset_A_train.pkl
├── data_dict_subset_A_val.pkl
├── data_dict_subset_B_train.pkl
├── data_dict_subset_B_val.pkl
├── ...

Train and Evaluate

Train

We recommend using 8 GPUs for training. If a different number of GPUs is utilized, you can enhance performance by configuring the --autoscale-lr option. The training logs will be saved to work_dirs/toponet.

cd TopoNet
mkdir -p work_dirs/toponet

./tools/dist_train.sh 8 [--autoscale-lr]

Evaluate

You can set --show to visualize the results.

./tools/dist_test.sh 8 [--show]

License

All assets and code are under the Apache 2.0 license unless specified otherwise.

Citation

If this work is helpful for your research, please consider citing the following BibTeX entry.

@article{li2023toponet,
  title={Graph-based Topology Reasoning for Driving Scenes},
  author={Li, Tianyu and Chen, Li and Wang, Huijie and Li, Yang and Yang, Jiazhi and Geng, Xiangwei and Jiang, Shengyin and Wang, Yuting and Xu, Hang and Xu, Chunjing and Yan, Junchi and Luo, Ping and Li, Hongyang},
  journal={arXiv preprint arXiv:2304.05277},
  year={2023}
}

@inproceedings{wang2023openlanev2,
  title={OpenLane-V2: A Topology Reasoning Benchmark for Unified 3D HD Mapping}, 
  author={Wang, Huijie and Li, Tianyu and Li, Yang and Chen, Li and Sima, Chonghao and Liu, Zhenbo and Wang, Bangjun and Jia, Peijin and Wang, Yuting and Jiang, Shengyin and Wen, Feng and Xu, Hang and Luo, Ping and Yan, Junchi and Zhang, Wei and Li, Hongyang},
  booktitle={NeurIPS},
  year={2023}
}

Related resources

We acknowledge all the open-source contributors for the following projects to make this work possible: