Skip to content

marlon31415/unitraj2hptr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unitraj2hptr

Converts the h5 data from Unitraj (based on ScenarioNet) to the HPTR data format.

Installing

This tool can be installed by running the following commands:

conda create -n unitraj2hptr python=3.9.21
git clone https://github.com/marlon31415/unitraj2hptr.git
cd unitraj2hptr
pip install -e .

Preparing data

The conversion script expects .h5 Unitraj cache files as input. The original Unitraj repo converts the agent and map data to local coordinates. As HPTR expects global coordinates, we implemented a set of modifications necessary for the conversion pipeline which can be found in the modified Unitraj repo.

To preprocess the data follow this steps:

  1. Install our modified ScenarioNet and convert data:

  2. Install our modified Unitraj and generate cache files

  3. Run the conversion script:

python convert.py --dataset split_to_convert --hptr_root_dir /path/to/hptr/output --unitraj_data_dir /path/to/input/data

Plotting

The conversion tool allows plotting scenarios while converting data, to activate this feature run:

python convert.py --dataset split_to_convert --hptr_root_dir /path/to/hptr/output --unitraj_data_dir /path/to/input/data --save_plots

example_1 example_2 example_3

NuScenes examples of default mode scenario HPTR outputs.

About

Converts the h5 data from UniTraj (based on ScenarioNet) to the HPTR data format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages