README.md
May 21, 2026 ยท View on GitHub
BeyondDrive
Beyond Imitation: Learning Safe End-to-End Autonomous Driving from Hard Negatives
Junli Wang, Zhihua Hua, Xueyi Liu, Zebing Xing, Haochen Tian, Kun Ma, Guang Chen, Hangjun Ye, Long Chen, Qichao Zhang๐ง
๐ง indicates corresponding authors.
CASIA ย | ย Xiaomi Embodied Intelligence Team ย | ย Fudan University
๐ข News
[2026/5/20]We released code and checkpoints.[2026/5/20]We released our paper on arXiv.
๐ Table of Contents
- ๐๏ธ Model Zoo
- ๐ฏ Getting Started
- ๐ฆ Data Preparation
- โ๏ธ Training and Evaluation
- โค๏ธ Acknowledgements
๐๏ธ Model Zoo
| Method | Backbone | Benchmark | PDMS | Weight Download |
|---|---|---|---|---|
| FlowPolicy | ResNet-34 | NAVSIM | 87.0 | Google Drive |
| LTF* | ResNet-34 | NAVSIM | 88.7 | Google Drive |
| LTFv7 | ResNet-34 | NAVSIM | 89.8 | Google Drive |
| MeanFuser + BeyondDrive | ResNet-34 | NAVSIM | 90.3 | Google Drive |
| DiffusionDrive + BeyondDrive | ResNet-34 | NAVSIM | 89.2 | Google Drive |
| WoTE + BeyondDrive | ResNet-34 | NAVSIM | 89.2 | Google Drive |
๐ฏ Getting Started
1. Clone BeyondDrive Repo
git clone https://github.com/wjl2244/BeyondDrive.git
cd BeyondDrive
2. Create Environment
conda create -n beyonddrive python=3.9 -y
conda activate beyonddrive
pip install -e .
๐ฆ Data Preparation
NOTE: Please review and agree to the LICENSE file file before downloading the data.
1. Download Dataset
a. Download via NAVSIM offical installation.
Follow the instructions in the NAVSIM installation guide to download the dataset.
b. Download via Hugging Face
Alternatively, you can download the dataset using Hugging Face with the following commands:
export HF_ENDPOINT="https://huggingface.co"
# export HF_ENDPOINT="http://hf-mirror.com" # Uncomment this line if you are in China
# Install the huggingface_hub tool
pip install -U "huggingface_hub"
# Download the OpenScene dataset
hf download --repo-type dataset OpenDriveLab/OpenScene --local-dir ./navsim_dataset/ --include "openscene-v1.1/*"
# Download the map data
cd download && ./download_maps.sh
2. Set Up Configuration
Move the download data to create the following structure.
navsim_workspace/
โโโ BeyondDrive/
โโโ dataset/
โ โโโ maps/
โ โโโ navsim_logs/
โ โ โโโ test/
โ โ โโโ trainval/
โ โโโ sensor_blobs/
โ โ โโโ test/
โ โ โโโ trainval/
โโโ cache/
โโโ navtest_v1_metric_cache/
โโโ traintest_v1_cache/
3. Cache the Dataset
We provide a script to cache the dataset and metrics.
cd BeyondDrive
# Cache the dataset. (navtrain and navtest)
bash scripts/evaluation/run_dataset_cache.sh
# Cache the metric.
bash scripts/evaluation/run_metric_cache.sh
โ๏ธ Training and Evaluation
1. Evaluation
(1) Please download the pre-trained checkpoints from here and place them in the navsim_workspace/BeyondDrive/exp/ directory.
(2) Please download the ResNet-34 pretrained weights from here. After downloading, update the corresponding path in the configuration file:
navsim/agents/transfuser/transfuser_config.py,
navsim/agents/flowpolicy/flowpolicy_config.py,
navsim/agents/meanfuser/meanfuser_config.py,
navsim/agents/diffusiondrive/diffusiondrive_config.py
cd BeyondDrive
# FlowPolicy Evaluation
bash scripts/evaluation/run_evaluation_flowpolicy.sh
# LTF* & LTFv7
bash scripts/evaluation/run_evaluation_transfuser.sh
# MeanFuser+BeyondDrive
bash scripts/evaluation/run_evaluation_meanfuser.sh
# DiffusionDrive+BeyondDrive
bash scripts/evaluation/run_evaluation_diffusiondrive.sh
Negative Samples Generate
Before training(LTFv7, DiffusionDrive+BeyondDrive and Meanfuser+BeyondDrive), negative dataset should be downloaded from Google Drive, or generated locally.
bash scripts/evaluation/run_generate_negative_samples_pool.sh
2. Training
cd BeyondDrive
# FlowPolicy Training
bash scripts/training/run_training_flowpolicy.sh
# LTF* & LTFv7
bash scripts/training/run_training_transfuser.sh
# MeanFuser+BeyondDrive
bash scripts/training/run_training_meanfuser.sh
# DiffusionDrive+BeyondDrive
bash scripts/training/run_training_diffusiondrive.sh
โค๏ธ Acknowledgements
We acknowledge all the open-source contributors for the following projects to make this work possible:
- MeanFlow | NAVSIM | HUGSIM | DiffusionDrive | GTRS