Automated Scenario Characterization Toolkit.
Project description
ScenarioCharacterization
An open-source framework for automated, dataset-agnostic profiling of driving scenarios in trajectory datasets. Built upon the scenario characterization approach introduced in SafeShift, this project extends it into a modular, configuration-driven pipeline with three layers:
- Dataset adapter — ingests custom datasets and re-formats them into a common scenario representation, validated by Pydantic schemas.
- Characterizer — performs feature extraction, behavior probing, and criticality scoring at the scenario and agent levels.
- Analysis — supports scenario visualization, feature and score analyses, categorical profiling, and scenario mining.
New datasets plug in without rewriting the characterization and analysis stack. The framework is demonstrated on Waymo Open Motion, nuScenes, and Argoverse2. Developed as part of an internship project at StackAV.
Visualization Examples
| Categorical Scores | Animated Scenarios | Static Scenarios |
| Results from our categorical profiler. Agents are visualized from dark green (low crit.) to dark red (high crit.) based on their criticality with respect to the ego agent (blue). | Result from our animated visualizer, showing agents by type: vehicle (gray), pedestrian (magenta), cyclist (green), and ego (blue), along with the scenario's elapsed time throughout the episode. | Result from our static scenario visualizer. The episode's time is shown by increasing trajectory opacity over time. |
Repository: github.com/navarrs/ScenarioCharacterization
Installation
Install the package
uv pip install scenario-characterization
Install the package in editable mode
Clone the repository and install the package in editable mode:
git clone git@github.com:navarrs/ScenarioCharacterization.git
cd ScenarioCharacterization
uv run pip install -e .
To install with dataset-specific dependencies, use the appropriate optional extra:
# Waymo Open Motion Dataset (requires Python 3.10)
uv run pip install -e ".[waymo]"
# nuScenes dataset (requires Python 3.12)
uv run pip install -e ".[nuscenes]"
If installing with development dependencies, run:
uv run pip install -e ".[dev]"
uv run pre-commit install
Documentation
- Organization: Overview of the Hydra configuration structure.
- Schemas: Guidelines for creating dataset adapters and processors that comply with the required input/output schemas.
- Characterization: Details on supported scenario characterization and visualization tools, and how to use them.
- Analysis: Shows how to run feature and score analyses.
- Waymo Example: Step-by-step usage example using the Waymo Open Motion Dataset.
- nuScenes Example: Step-by-step usage example using the nuScenes dataset.
Citing
@INPROCEEDINGS{stoler2024safeshift,
author={Stoler, Benjamin and Navarro, Ingrid and Jana, Meghdeep and Hwang, Soonmin and Francis, Jonathan and Oh, Jean},
booktitle={2024 IEEE Intelligent Vehicles Symposium (IV)},
title={SafeShift: Safety-Informed Distribution Shifts for Robust Trajectory Prediction in Autonomous Driving},
year={2024},
volume={},
number={},
pages={1179-1186},
keywords={Meters;Collaboration;Predictive models;Robustness;Iron;Trajectory;Safety},
doi={10.1109/IV55156.2024.10588828}}
Development
Run uv sync --frozen --all-groups to set up the environment.
Run pre-commit run --all-files to run all hooks on all files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scenario_characterization-0.4.1.tar.gz.
File metadata
- Download URL: scenario_characterization-0.4.1.tar.gz
- Upload date:
- Size: 144.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5342bc09651037e971c00c31be77ba171610c5cda904bc46fc8a67f3fb91763f
|
|
| MD5 |
15dee1d77322fb9789fb405ddb6d5552
|
|
| BLAKE2b-256 |
ee859847c46309b658c6487587279e780f3f4e5bbce9acc4cd5a0d1055ae8b34
|
Provenance
The following attestation bundles were made for scenario_characterization-0.4.1.tar.gz:
Publisher:
package.yml on navarrs/ScenarioCharacterization
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scenario_characterization-0.4.1.tar.gz -
Subject digest:
5342bc09651037e971c00c31be77ba171610c5cda904bc46fc8a67f3fb91763f - Sigstore transparency entry: 2120665448
- Sigstore integration time:
-
Permalink:
navarrs/ScenarioCharacterization@0a2154be5db61b9257e838e0cd87b06661961b99 -
Branch / Tag:
refs/tags/v4.0.1 - Owner: https://github.com/navarrs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@0a2154be5db61b9257e838e0cd87b06661961b99 -
Trigger Event:
release
-
Statement type:
File details
Details for the file scenario_characterization-0.4.1-py3-none-any.whl.
File metadata
- Download URL: scenario_characterization-0.4.1-py3-none-any.whl
- Upload date:
- Size: 193.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20028c6fbfc91e525cea3a2632b4f593683205ad79e61fa4e8148e15b42d1afb
|
|
| MD5 |
6241f7517222923cfc97a10415814436
|
|
| BLAKE2b-256 |
f30d8cd727c4a1fe07f0a9dd3d819c2142bece97f909caf9a70b15a4dedf71b3
|
Provenance
The following attestation bundles were made for scenario_characterization-0.4.1-py3-none-any.whl:
Publisher:
package.yml on navarrs/ScenarioCharacterization
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scenario_characterization-0.4.1-py3-none-any.whl -
Subject digest:
20028c6fbfc91e525cea3a2632b4f593683205ad79e61fa4e8148e15b42d1afb - Sigstore transparency entry: 2120665484
- Sigstore integration time:
-
Permalink:
navarrs/ScenarioCharacterization@0a2154be5db61b9257e838e0cd87b06661961b99 -
Branch / Tag:
refs/tags/v4.0.1 - Owner: https://github.com/navarrs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@0a2154be5db61b9257e838e0cd87b06661961b99 -
Trigger Event:
release
-
Statement type: