Skip to main content

WIP 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:

  1. Dataset adapter — ingests custom datasets and re-formats them into a common scenario representation, validated by Pydantic schemas.
  2. Characterizer — performs feature extraction, behavior probing, and criticality scoring at the scenario and agent levels.
  3. 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.

Scenario Characterization workflow diagram

Visualization Examples

Categorical Scores Animated Scenarios Static Scenarios
5c1f8d26c481e36d_2 43 5c1f8d26c481e36d_2 43 6e593bf6b9dbbf73
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

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scenario_characterization-0.4.8.tar.gz (170.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scenario_characterization-0.4.8-py3-none-any.whl (224.2 kB view details)

Uploaded Python 3

File details

Details for the file scenario_characterization-0.4.8.tar.gz.

File metadata

File hashes

Hashes for scenario_characterization-0.4.8.tar.gz
Algorithm Hash digest
SHA256 ccef246ac2e8b5118e49ec9e4f049dce3aaefe7eed8fe18fec8e076e4f0b10da
MD5 53c37b08c88b710feca32d4b525c038a
BLAKE2b-256 cfb6e7c09b85823b488dd554822421a91059bd810f8848a2ff876981d7b415a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for scenario_characterization-0.4.8.tar.gz:

Publisher: package.yml on navarrs/ScenarioCharacterization

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scenario_characterization-0.4.8-py3-none-any.whl.

File metadata

File hashes

Hashes for scenario_characterization-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 40b95dacaaaf3e933b6e8767a194db34b61151fd1c4fb4e14557551513edd6c1
MD5 a265bbb931c659ca15d419ed00b5b417
BLAKE2b-256 6f9f090a469f9d16a6ecb9a84e873fc2ac6a5075292b49d967c07d5c04b82b76

See more details on using hashes here.

Provenance

The following attestation bundles were made for scenario_characterization-0.4.8-py3-none-any.whl:

Publisher: package.yml on navarrs/ScenarioCharacterization

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.8 This release

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.24

2 files

0.2.23

2 files

0.2.22

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

1 file

0.2.17

1 file

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page