Skip to content

Commit d34764b

Browse files
authored
Merge pull request #20 from mh0797/main
version2.1
2 parents 4de93c5 + aa8ef49 commit d34764b

37 files changed

+1793
-869
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
<p align="center">
44
<img src="assets/navsim_transparent.png" width="600">
55
<h2 align="center">Data-Driven Non-Reactive Autonomous Vehicle Simulation and Benchmarking</h1>
6-
<h3 align="center"><a href="https://arxiv.org/abs/2406.15349">Paper</a> | <a href="https://danieldauner.github.io/assets/pdf/Dauner2024NIPS_supplementary.pdf">Supplementary</a> | <a href="https://www.youtube.com/watch?v=Qe76HRmPDe0">Talk</a> | <a href="https://opendrivelab.com/challenge2024/#end_to_end_driving_at_scale">2024 Challenge</a> | <a href="https://huggingface.co/spaces/AGC2024-P/e2e-driving-navsim">Leaderboard v1.1</a> | <a href="https://huggingface.co/spaces/AGC2025/e2e-driving-warmup">Warmup Leaderboard v2.0</a> </h3>
6+
<h3 align="center"><a href="https://arxiv.org/abs/2406.15349">Paper</a> | <a href="https://danieldauner.github.io/assets/pdf/Dauner2024NIPS_supplementary.pdf">Supplementary</a> | <a href="https://www.youtube.com/watch?v=Qe76HRmPDe0">Talk</a> | <a href="https://opendrivelab.com/challenge2024/#end_to_end_driving_at_scale">2024 Challenge</a> | <a href="https://huggingface.co/spaces/AGC2024-P/e2e-driving-navsim">Leaderboard v1.1</a> | <a href="https://huggingface.co/spaces/AGC2025/e2e-driving-warmup">Warmup Leaderboard v2.1</a> </h3>
77
</p>
88

99
</div>
1010

1111
<br/>
1212

13-
1413
> [**NAVSIM: Data-Driven Non-Reactive Autonomous Vehicle Simulation and Benchmarking**](https://arxiv.org/abs/2406.15349)
1514
>
1615
> [Daniel Dauner](https://danieldauner.github.io/)<sup>1,2</sup>, [Marcel Hallgarten](https://mh0797.github.io/)<sup>1,5</sup>, [Tianyu Li](https://github.com/sephyli)<sup>3</sup>, [Xinshuo Weng](https://xinshuoweng.com/)<sup>4</sup>, [Zhiyu Huang](https://mczhi.github.io/)<sup>4,6</sup>, [Zetong Yang](https://scholar.google.com/citations?user=oPiZSVYAAAAJ)<sup>3</sup>\
@@ -33,13 +32,13 @@
3332
</p>
3433

3534
## Table of Contents
35+
3636
1. [Highlights](#highlight)
3737
2. [Getting started](#gettingstarted)
3838
3. [Changelog](#changelog)
3939
4. [License and citation](#licenseandcitation)
4040
5. [Other resources](#otherresources)
4141

42-
4342
## Getting started <a name="gettingstarted"></a>
4443

4544
- [Download and installation](docs/install.md)
@@ -52,9 +51,15 @@
5251

5352
<p align="right">(<a href="#top">back to top</a>)</p>
5453

55-
5654
## Changelog <a name="changelog"></a>
57-
- **`[2025/02/28]`** NAVSIM v2.0 release (official devkit version for 2025 warm-up phase)
55+
56+
- **`[2025/04/09]`** NAVSIM v2.1 release (official devkit version for 2025 warm-up phase)
57+
- Added new dataset for the [Hugging Face Warmup leaderboard](https://huggingface.co/spaces/AGC2025/e2e-driving-warmup) (see [submission](docs/submission.md))
58+
59+
- ⚠️ **IMPORTANT**: To submit to the updated leaderboard, you need to re-download the synthetic dataset (see [download](docs/install.md))
60+
- Introduced support for two-stage reactive traffic agents (see [traffic simulation](docs/metrics.md))
61+
- Code refactoring and bug fixes
62+
- **`[2025/02/28]`** NAVSIM v2.0 release
5863
- Extends the PDM Score with more metrics and penalties (see [metrics](docs/metrics.md))
5964
- Adds a new two-stage pseudo closed-loop simulation (see [metrics](docs/metrics.md))
6065
- Adds support for reactive traffic agent policies (see [traffic simulation](docs/metrics.md))
@@ -82,11 +87,10 @@
8287
- OpenScene-mini sensor blobs and annotation logs
8388
- Naive `ConstantVelocity` agent
8489

85-
8690
<p align="right">(<a href="#top">back to top</a>)</p>
8791

88-
8992
## License and citation <a name="licenseandcitation"></a>
93+
9094
All assets and code in this repository are under the [Apache 2.0 license](./LICENSE) unless specified otherwise. The datasets (including nuPlan and OpenScene) inherit their own distribution licenses. Please consider citing our paper and project if they help your research.
9195

9296
```BibTeX
@@ -109,7 +113,6 @@ All assets and code in this repository are under the [Apache 2.0 license](./LICE
109113

110114
<p align="right">(<a href="#top">back to top</a>)</p>
111115

112-
113116
## Other resources <a name="otherresources"></a>
114117

115118
- [SLEDGE](https://github.com/autonomousvision/sledge) | [tuPlan garage](https://github.com/autonomousvision/tuplan_garage) | [CARLA garage](https://github.com/autonomousvision/carla_garage) | [Survey on E2EAD](https://github.com/OpenDriveLab/End-to-end-Autonomous-Driving)

docs/install.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can download the mini, trainval, test, private_test_e2e and warmup_synthetic
3434
./download_trainval
3535
./download_test
3636
./download_private_test_e2e
37-
./download_warmup_synthetic_scenes
37+
./download_warmup_two_stage
3838
```
3939

4040
Also, the script `./download_navtrain` can be used to download a small portion of the `trainval` dataset split which is needed for the `navtrain` training split.
@@ -57,12 +57,16 @@ This will download the splits into the download directory. From there, move it t
5757
| ├── trainval
5858
| ├── private_test_e2e
5959
   | └── mini
60-
   └── synthetic_scenes
61-
├── scene_pickles
62-
   └── sythetic_sensor
60+
   └── warmup_two_stage
61+
├── openscene_meta_datas
62+
├── sensor_blobs
63+
├── synthetic_scene_pickles
64+
   └── synthetic_scenes_attributes.csv
6365
6466
```
6567

68+
⚠️ **IMPORTANT:** If you have already downloaded the data for Navsim V2.0.1 and tried the Hugging Face Leaderboard, please replace the old `"synthetic_scenes"` folder with the new `"warmup_two_stage"` folder. In Navsim V2.1, the traffic agents' policy has been updated, and the old data is no longer compatible.
69+
6670
Set the required environment variables, by adding the following to your `~/.bashrc` file
6771
Based on the structure above, the environment variables need to be defined as:
6872

docs/splits.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dataset splits vs. filtered training / test splits
22

33
The NAVSIM framework utilizes several dataset splits for standardized training and evaluating agents.
4-
All of them use the OpenScene dataset that is divided into the dataset splits `mini`,`trainval`,`test`,`private_test_e2e`, which can all be downloaded separately.
4+
All of them use the OpenScene dataset that is divided into the dataset splits `mini`, `trainval`,` test`, `warmup_two_stage`, `private_test_e2e`, which can all be downloaded separately.
55

66
It is possible to run trainings and evaluations directly on these sets (see `Standard` in table below).
77
Alternatively, you can run trainings and evaluations on training and validation splits that were filtered for challenging scenarios (see `NAVSIM` in table below), which is the recommended option for producing comparable and competitive results efficiently.
@@ -34,7 +34,7 @@ In Navsim-v1.1, the training/test split can bet set with a single config paramet
3434
<td>trainval</td>
3535
<td>Large split for training and validating agents with regular driving recordings. Corresponds to nuPlan and downsampled to 2HZ.</td>
3636
<td>14GB</td>
37-
<td>&gt;2000GB</td>
37+
<td>>2000GB</td>
3838
<td>
3939
train_test_split=trainval
4040
</td>
@@ -78,18 +78,18 @@ In Navsim-v1.1, the training/test split can bet set with a single config paramet
7878
</tr>
7979
<tr>
8080
<td rowspan="2">Competition</td>
81-
<td>warmup_test_e2e</td>
81+
<td>warmup_two_stage</td>
8282
<td>Warmup test split to validate submission on hugging face. Available as a filter for test split.</td>
8383
<td>-</td>
8484
<td>-</td>
8585
<td>
86-
train_test_split=warmup_test_e2e
86+
train_test_split=warmup_two_stage
8787
</td>
8888
</tr>
8989
<tr>
9090
<td>private_test_e2e</td>
9191
<td>Private test split for the challenge leaderboard on hugging face.</td>
92-
<td>&lt;1GB</td>
92+
<td><1GB</td>
9393
<td>25GB</td>
9494
<td>
9595
train_test_split=private_test_e2e
@@ -105,7 +105,7 @@ The standard splits `trainval`, `test`, and `mini` are from the OpenScene datase
105105

106106
NAVSIM provides a subset and filter of the `trainval` split, called `navtrain`. The `navtrain` split facilitates a standardized training scheme and requires significantly less sensor data storage than `travel` (445GB vs. 2100GB). If your agents don't need historical sensor inputs, you can download `navtrain` without history, which requires 300GB of storage. Note that `navtrain` can be downloaded separately via [download_navtrain.sh](https://github.com/autonomousvision/navsim/blob/main/download/download_navtrain.sh) but still requires access to the `trainval` logs. Similarly, the `navtest` split enables a standardized set for testing agents with a provided scene filter. Both `navtrain` and `navtest` are filtered to increase interesting samples in the sets.
107107

108-
For the challenge on Hugging Face, we provide the `warmup_test_e2e` and `private_test_e2e` for the warm-up and challenge track, respectively. Note that `private_test_e2e` requires you to download the data, while `warmup_test_e2e` is a scene filter for the `mini` split.
108+
For the challenge on Hugging Face, we provide the `warmup_two_stage` and `private_test_e2e` for the warm-up and challenge track, respectively. Note that `private_test_e2e` requires you to download the data, while `warmup_two_stage` is a scene filter for the `test` split.
109109

110110
## Troubleshooting
111111

docs/submission.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,27 @@ For the [NAVSIM challenge 2025 warmup](https://huggingface.co/spaces/AGC2025/e2e
77
### Rules
88

99
- **Open-source code and models**:
10+
1011
- We will periodically (~every 6 months) be removing all entries on the leaderboard which **do not provide associated open-source training and inference code with the corresponding pre-trained checkpoints**. Even if removed for not having this information, an entry can be resubmitted once the code needed for reproducibility is made publicly available.
1112
- Code must be provided by setting the `TEAM_NAME` variable of the submission file as `"<a href=Link/to/repository>Method name</a>"`. Note that this can also be edited on the leaderboard for an existing submission, if the repo is created (or updated) after the initial submission.
12-
- **Multi-seed submissions**:
13-
- Driving policies often differ significantly in performance when re-trained with different network initialization seeds.
14-
- Therefore, the leaderboard now supports (1) regular single-seed submissions and (2) multi-seed submission, which we **strongly encourage** (with a minimum of 3 training seeds).
15-
- The maximum, mean and standard deviations of our evaluation metrics will be displayed for multi-seed submissions.
13+
14+
### Run Score Locally
15+
16+
You can reproduce your test results locally in the [NAVSIM](https://github.com/autonomousvision/navsim/blob/main/docs/install.md) repository, and they should match the results you obtain on Hugging Face. Follow the steps below:
17+
18+
1. **Download the dataset** — refer to the [dataset](install.md) for instructions.
19+
2. **Cache the data** — follow the script `scripts/evaluation/run_metric_caching.sh`, and set `TRAIN_TEST_SPLIT=warmup_two_stage`
20+
3. **Run the evaluation** — follow the script `scripts/evaluation/run_cv_pdm_score_evaluation.sh` with your own model.
21+
* If you specified `metric_cache_path` during caching, make sure to use the same path during evaluation.
22+
* Set `TRAIN_TEST_SPLIT=warmup_two_stage` to ensure that the score matches the one returned by Hugging Face.
1623

1724
### Regular warmup submission
1825

1926
To submit to a leaderboard you need to create a pickle file that contains a trajectory for each test scenario. NAVSIM provides a script to create such a pickle file.
2027

2128
Have a look at `run_cv_create_submission_pickle.sh` in the [NAVSIM](https://github.com/autonomousvision/navsim/blob/main/docs/install.md) repository: this file creates the pickle file for the ConstantVelocity agent. You can run it for your own agent by replacing the `agent` override. **Note that you have to set the variables `TEAM_NAME`, `AUTHORS`, `EMAIL`, `INSTITUTION`, and `COUNTRY` in `run_create_submission_pickle.sh` to generate a valid submission file**
2229

23-
You should be able to obtain the same evaluation results as on the server by running the evaluation locally. To do so, use the override `train_test_split=warmup_navsafe_two_stage_extended` when executing the script to run the PDM scoring.
24-
25-
### Multi-seed warmup submission
26-
27-
For a multi-seed submission, you first have to create individual agents, i.e. trained on different seeds. Consequently, you can merge your entries to a single submission file with the `run_merge_submission_pickles.sh` bash script. Please set the override `train_test_split=warmup_navsafe_two_stage_extended ` to ensure all individual entries contain trajectories for the evaluation.
30+
You should be able to obtain the same evaluation results as on the server by running the evaluation locally.
2831

2932
## Submission Description
3033

docs/traffic_agents.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ NAVSIM v2 introduces support for **reactive traffic agents**, allowing surroundi
55
### Available Traffic Agent Policies
66

77
1. **Log-Replay** (Non-Reactive)
8-
- Identical to NAVSIM v1, traffic agents strictly follow recorded trajectories without reacting to the ego-vehicle.
98

9+
- Identical to NAVSIM v1, traffic agents strictly follow recorded trajectories without reacting to the ego-vehicle.
1010
2. **Constant-Velocity** (Debugging Only)
11+
1112
- Traffic agents move in a straight line at a fixed velocity, providing a simple baseline for debugging.
13+
3. **IDM (Intelligent Driver Model)** (Reactive)
1214

13-
3. **IDM (Intelligent Driver Model)**
1415
- Similar to nuPlan, this model simulates traffic agents with more realistic behavior, adjusting speed and spacing based on road conditions.
1516
- Pedestrians, static objects, and other non-vehicle agents still follow pre-recorded log data.
1617

1718
### Selecting a Traffic Agents Policy
18-
Traffic agent policies can be selected by specifying an override when running the evaluation. For example:
1919

20-
`traffic_agents_policy=navsim_IDM_traffic_agents`
20+
For single-stage simulation, you can specify the traffic agent policy by providing an override when running the evaluation script `navsim/planning/script/run_pdm_score_one_stage.py`.
21+
22+
An example can be found in the commented section of the script `run_cv_pdm_score_evaluation.sh`. For instance:
23+
24+
`traffic_agents=non_reactive` or `traffic_agents=reactive`
25+
26+
This makes it easy to switch between different traffic agent policies depending on your evaluation requirements.
2127

22-
This allows to easily switch between different policies depending on your evaluation needs.
28+
In two-stage simulations (e.g., for Hugging Face submissions), reactive traffic agents are used by default.
2329

2430
All available traffic agents policies can be found [here](navsim/planning/script/config/common/traffic_agents_policy.md)
2531

download/download_warmup_synthetic_scenes.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

download/download_warmup_two_stage.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/navsim-v2/navsim_v2.1_warmup_two_stage.tar.gz
2+
tar -xzvf navsim_v2.1_warmup_two_stage.tar.gz
3+
rm navsim_v2.1_warmup_two_stage.tar.gz

navsim/common/dataclasses.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,13 @@ class SceneFilter:
633633
log_names: Optional[List[str]] = None
634634
tokens: Optional[List[str]] = None
635635
include_synthetic_scenes: bool = False
636+
all_mapping: Optional[Dict[Tuple[str, str], List[Tuple[str, str]]]] = None
636637
synthetic_scene_tokens: Optional[List[str]] = None
638+
639+
# for reactive and non_reactive
640+
reactive_synthetic_initial_tokens: Optional[List[str]] = None
641+
non_reactive_synthetic_initial_tokens: Optional[List[str]] = None
642+
637643
# TODO: expand filter options
638644

639645
def __post_init__(self):

0 commit comments

Comments
 (0)