MCPcopy Index your code
hub / github.com/OpenDriveLab/UniAD

github.com/OpenDriveLab/UniAD @v1.0.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.0.1 ↗
819 symbols 2,756 edges 115 files 435 documented · 53%
README

Planning-oriented Autonomous Driving

arXiv | Video | Slides

https://github.com/OpenDriveLab/UniAD/assets/48089846/bcf685e4-2471-450e-8b77-e028a46bd0f7

teaser

Table of Contents:

  1. Highlights
  2. News
  3. Getting Started
  4. Installation
  5. Prepare Dataset
  6. Evaluation Example
  7. GPU Requirements
  8. Train/Eval
  9. Results and Models
  10. TODO List
  11. License
  12. Citation

Highlights

  • :oncoming_automobile: Planning-oriented philosophy: UniAD is a Unified Autonomous Driving algorithm framework following a planning-oriented philosophy. Instead of standalone modular design and multi-task learning, we cast a series of tasks, including perception, prediction and planning tasks hierarchically.
  • :trophy: SOTA performance: All tasks within UniAD achieve SOTA performance, especially prediction and planning (motion: 0.71m minADE, occ: 63.4% IoU, planning: 0.31% avg.Col)

News

  • Paper Title Change: To avoid confusion with the "goal-point" navigation in Robotics, we change the title from "Goal-oriented" to "Planning-oriented" suggested by Reviewers. Thank you!

  • 2023/08/03 Bugfix [Commit]: Previously, the visualized planning results were in opposition on the x axis, compared to the ground truth. Now it's fixed.

  • 2023/06/12 Bugfix [Ref: https://github.com/OpenDriveLab/UniAD/issues/21]: Previously, the performance of the stage1 model (track_map) could not be replicated when trained from scratch, due to mistakenly adding loss_past_traj and freezing img_neck and BN. By removing loss_past_traj and unfreezing img_neck and BN in training, the reported results could be reproduced (AMOTA: 0.393, stage1_train_log).

  • 2023/04/18 New feature: You can replace BEVFormer with other BEV Encoding methods, e.g., LSS, as long as you provide the bev_embed and bev_pos in track_train and track_inference. Make sure your bevs and ours are of the same shape.

  • 2023/04/18 Base-model checkpoints are released.

  • 2023/03/29 Code & model initial release v1.0.

  • 2023/03/21 :rocket::rocket: UniAD is accepted by CVPR 2023, as an Award Candidate (12 out of 2360 accepted papers)!
  • 2022/12/21 UniAD paper is available on arXiv.

Getting Started

Results and Pre-trained Models

UniAD is trained in two stages. Pretrained checkpoints of both stages will be released and the results of each model are listed in the following tables.

Stage1: Perception training

We first train the perception modules (i.e., track and map) to obtain a stable weight initlization for the next stage. BEV features are aggregated with 5 frames (queue_length = 5).

| Method | Encoder | Tracking

AMOTA | Mapping

IoU-lane | config | Download | | :---: | :---: | :---: | :---: | :---:|:---:| | UniAD-B | R101 | 0.390 | 0.297 | base-stage1 | base-stage1 |

Stage2: End-to-end training

We optimize all task modules together, including track, map, motion, occupancy and planning. BEV features are aggregated with 3 frames (queue_length = 3).

| Method | Encoder | Tracking

AMOTA | Mapping

IoU-lane | Motion

minADE |Occupancy

IoU-n. | Planning

avg.Col. | config | Download | | :---: | :---: | :---: | :---: | :---:|:---:| :---: | :---: | :---: | | UniAD-B | R101 | 0.358 | 0.317 | 0.709 | 64.1 | 0.25 | base-stage2 | base-stage2 |

Checkpoint Usage

  • Download the checkpoints you need into UniAD/ckpts/ directory.
  • You can evaluate these checkpoints to reproduce the results, following the evaluation section in TRAIN_EVAL.md.
  • You can also initialize your own model with the provided weights. Change the load_from field to path/of/ckpt in the config and follow the train section in TRAIN_EVAL.md to start training.

Model Structure

The overall pipeline of UniAD is controlled by uniad_e2e.py which coordinates all the task modules in UniAD/projects/mmdet3d_plugin/uniad/dense_heads. If you are interested in the implementation of a specific task module, please refer to its corresponding file, e.g., motion_head.

TODO List

  • [ ] All configs & checkpoints
  • [ ] Upgrade the implementation of MapFormer from Panoptic SegFormer to TopoNet, which features the vectorized map representations and topology reasoning.
  • [ ] Support larger batch size
  • [ ] [Long-term] Improve flexibility for future extensions
  • [x] Fix bug: Unable to reproduce the results of stage1 track-map model when training from scratch. [Ref: https://github.com/OpenDriveLab/UniAD/issues/21]
  • [x] Visualization codes
  • [x] Separating BEV encoder and tracking module
  • [x] Base-model configs & checkpoints
  • [x] Code initialization

License

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

Citation

Please consider citing our paper if the project helps your research with the following BibTex:

@inproceedings{hu2023_uniad,
 title={Planning-oriented Autonomous Driving}, 
 author={Yihan Hu and Jiazhi Yang and Li Chen and Keyu Li and Chonghao Sima and Xizhou Zhu and Siqi Chai and Senyao Du and Tianwei Lin and Wenhai Wang and Lewei Lu and Xiaosong Jia and Qiang Liu and Jifeng Dai and Yu Qiao and Hongyang Li},
 booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
 year={2023},
}

Related resources

Awesome - BEVFormer (:rocket:Ours!) - ST-P3 (:rocket:Ours!) - FIERY - MOTR

Core symbols most depended-on inside this repo

get
called by 171
projects/mmdet3d_plugin/datasets/eval_utils/map_api.py
cat
called by 120
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/track_instance.py
to
called by 73
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/track_instance.py
numpy
called by 64
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/track_instance.py
update
called by 35
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/modules.py
get
called by 17
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/track_instance.py
_load_layer
called by 15
projects/mmdet3d_plugin/datasets/eval_utils/map_api.py
set
called by 12
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/track_instance.py

Shape

Method 586
Function 117
Class 115
Route 1

Languages

Python100%

Modules by API surface

projects/mmdet3d_plugin/datasets/eval_utils/map_api.py78 symbols
projects/mmdet3d_plugin/datasets/pipelines/transform_3d.py33 symbols
projects/mmdet3d_plugin/datasets/eval_utils/eval_utils.py29 symbols
projects/mmdet3d_plugin/uniad/dense_heads/seg_head_plugin/seg_mask_head.py27 symbols
projects/mmdet3d_plugin/uniad/dense_heads/occ_head_plugin/modules.py24 symbols
projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/modules.py21 symbols
projects/mmdet3d_plugin/losses/track_loss.py21 symbols
projects/mmdet3d_plugin/models/backbones/vovnet.py20 symbols
projects/mmdet3d_plugin/datasets/nuscenes_e2e_dataset.py20 symbols
tools/analysis_tools/visualize/render/bev_render.py18 symbols
projects/mmdet3d_plugin/uniad/dense_heads/seg_head_plugin/seg_assigner.py18 symbols
projects/mmdet3d_plugin/datasets/eval_utils/nuscenes_eval.py18 symbols

Dependencies from manifests, versioned

casadi3.5.5 · 1×
einops0.4.1 · 1×
motmetrics1.1.3 · 1×
numpy1.20.0 · 1×
pytorch-lightning1.2.5 · 1×

For agents

$ claude mcp add UniAD \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact