README.md

May 21, 2026 ยท View on GitHub

BeyondDrive

Beyond Imitation: Learning Safe End-to-End Autonomous Driving from Hard Negatives

Paper License

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

MethodBackboneBenchmarkPDMSWeight Download
FlowPolicyResNet-34NAVSIM87.0Google Drive
LTF*ResNet-34NAVSIM88.7Google Drive
LTFv7ResNet-34NAVSIM89.8Google Drive
MeanFuser + BeyondDriveResNet-34NAVSIM90.3Google Drive
DiffusionDrive + BeyondDriveResNet-34NAVSIM89.2Google Drive
WoTE + BeyondDriveResNet-34NAVSIM89.2Google 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: