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, Argoverse2, and nuPlan. 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]"
# nuPlan dataset (requires Python 3.12)
uv run pip install -e ".[nuplan]"
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.
- nuPlan Example: Step-by-step usage example using the nuPlan dataset.
Citing
@misc{navarro2026scenchar,
title={ScenarioCharacterization: A Modular Toolkit for Characterizing Safety across Trajectory Datasets},
author={Ingrid Navarro and Yutong Duan and Jonathan Francis and Jean Oh},
year={2026},
eprint={2608.16041},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2608.16041},
}
@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.
Metadata
Release files for scenario-characterization 0.4.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scenario_characterization-0.4.8.tar.gz | 170.3 kB | With provenance | Details for scenario_characterization-0.4.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scenario_characterization-0.4.8-py3-none-any.whl | Python 3 | none | any | Details for scenario_characterization-0.4.8-py3-none-any.whl |
Total release size: 394.5 kB
Release files / scenario_characterization-0.4.8.tar.gz
| Download URL | scenario_characterization-0.4.8.tar.gz |
|---|---|
| Size | 170.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccef246ac2e8b5118e49ec9e4f049dce3aaefe7eed8fe18fec8e076e4f0b10da
|
|
BLAKE2b-256 checksum How to use checksums |
cfb6e7c09b85823b488dd554822421a91059bd810f8848a2ff876981d7b415a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logRelease files / scenario_characterization-0.4.8-py3-none-any.whl
| Download URL | scenario_characterization-0.4.8-py3-none-any.whl |
|---|---|
| Size | 224.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40b95dacaaaf3e933b6e8767a194db34b61151fd1c4fb4e14557551513edd6c1
|
|
BLAKE2b-256 checksum How to use checksums |
6f9f090a469f9d16a6ecb9a84e873fc2ac6a5075292b49d967c07d5c04b82b76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logSecurity for scenario-characterization 0.4.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scenario_characterization-0.4.8.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.