This repository contains the data tools code for the model introduced in the paper below:
Amelia: A Large Dataset and Model for Airport Surface Movement Forecasting [paper]
Ingrid Navarro *, Pablo Ortega-Kral *, Jay Patrikar *, Haichuan Wang, Zelin Ye, Jong Hoon Park, Jean Oh and Sebastian Scherer
AmeliaDataTools: Set of tools to process and visualize the Amelia dataset. It includes tools to compute agent counts, limits, motion profiles, and sequence lengths. It also includes tools to visualize agent statistics, trajectories, average distance, crowdedness, moving or static interpolated agents, motion profiles, and moving agents versus stationary agents. It includes tools to get crowdedness and movement statistics.
To run this repository, you first need to download the amelia dataset. Follow the instructions here to download the dataset.
Once downloaded, create a symbolic link into datasets:
cd datasets
ln -s /path/to/amelia .Make sure that you have conda installed.
Recommended: Use the install.sh to download and install the Amelia Framework:
chmod +x install.sh
./install.sh ameliaThis will create a conda environment named amelia and install all dependencies.
Alternatively, refer to INSTALL.md for manual installation.
Note: AmeliaDataTools requires the Amelia dataset and AmeliaScenes dependencies to run, only refer to AmeliaDataTools' and AmeliaScenes' installation.
Activate your amelia environment (Please follow the installation instructions above):
conda activate ameliacompute_agent_counts.py computes the number of agents per timestep. Run the following command:
python amelia_datatools/trajectory_tools/compute_agent_counts.pyThe output will be saved in the ./output/stats/compute_agent_counts directory.
compute_limits.py computes the limits of the airports and updates them. Run the following command:
python amelia_datatools/trajectory_tools/compute_limits.pyThe output will be saved in the ./output/cache/compute_limits directory.
compute_motion_profiles.py computes the motion profiles of the agents. Run the following command:
python amelia_datatools/trajectory_tools/compute_motion_profiles.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--to_process <to_process> \
--drop_interp \
--agent_type <agent_type>Where:
KBOS_26_1672610400_critical_egoandKBOS_26_1672621200_critical_egoare the directories with the specifications configured in theexample_kbos_critical.yamlfile.kbos_scene_*.pngfiles are the images with the predictions generated by the model for each scene.<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<to_process>is the percentage of files to process. By default it is set to1.0.--drop_interpis a flag to drop the interpolated points. By default it is set toFalse.
compute_sequence_lengths.py computes the sequence lengths of the agents by airport. Run the following command:
python amelia_datatools/trajectory_tools/compute_sequence_lengths.pyThe output will be saved in the ./output/stats/compute_sequence_lengths directory.
plot_agent_stats.py plots agents' statistics, it counts the number of agents per timesteps as well as the number of agents by type. Run the following command:
python amelia_datatools/visualization_tools/plot_agent_statistics.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--dpi <dpi> \
--num_files <num_files>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<dpi>is the resolution of the image. By default it is600.<num_files>is the number of files to plot. By default it is set to-1. Which plots all the files in the directory.
The output will be saved in the ./output/visualization/plot_agent_stats directory.
plot_all_trajectories.py plots the trajectories of the agents from the dataset onto the map. Run the following command:
python amelia_datatools/visualization_tools/plot_all_trajectories.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--to_process <to_process> \
--drop_interp \
--dpi <dpi>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<to_process>is the percentage of files to plot. By default it is set to1.0.--drop_interpis a flag to drop the interpolated points. By default it is set toFalse.<dpi>is the resolution of the image. By default it is600.
The output will be saved in the ./output/visualization/plot_all_trajectories directory.
plot_average_distance.py plots the average distance between agents by timestamp. Run the following command:
python amelia_datatools/visualization_tools/plot_average_distance.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--dpi <dpi> \
--num_files <num_files>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<dpi>is the resolution of the image. By default it is600.<num_files>is the number of files to plot. By default it is set to-1. Which plots all the files in the directory.
The output will be saved in the ./output/visualization/plot_average_distance directory.
plot_crowdedness.py plots the histogram of the airports crowdedness. Run the following command:
python amelia_datatools/visualization_tools/plot_crowdedness.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--dpi <dpi> \
--num_files <num_files> \
--processwhere:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<dpi>is the resolution of the image. By default it is600.<num_files>is the number of files to plot. By default it is set to-1. Which plots all the files in the directory.--processis a flag to process the data. By default it is set toFalse.
The output will be saved in the ./output/visualization/plot_crowdedness directory.
plot_interp_stats.py plots the agents' statistics with the interpolated points. Run the following command:
python amelia_datatools/visualization_tools/plot_interp_stats.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--moving \
--dpi <dpi> \
--num_files <num_files>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.--movingis a flag to plot taking into account only the moving agents. By default it is set toFalse.<dpi>is the resolution of the image. By default it is600.<num_files>is the number of files to plot. By default it is set to-1. Which plots all the files in the directory.
The output will be saved in the ./output/visualization/plot_interp_stats directory.
plot_motion_profiles.py plots the motion profiles of the agents, they might be acceleration, speed or heading. Run the following command:
python amelia_datatools/visualization_tools/plot_motion_profiles.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--to_process \
--input_path <input_path> \
--motion_profile <motion_profile> \
--drop_interp \
--agent_type <agent_type> \
--dpi <dpi> \
--num_files <num_files>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<to_process>is the percentage of files to plot. By default it is set to1.0.<input_path>is the path to the input file. By default it is set to./output/cache/compute_motion_profiles.<motion_profile>is the motion profile to plot. By default it is set toacceleration. The available options areacceleration,speedandheading.--drop_interpis a flag to drop the interpolated points. By default it is set toFalse.<agent_type>is the type of agent to plot. By default it is set toaircraft. Other options areaircraft,vehicle,unknownandall.<dpi>is the resolution of the image. By default it is600.
The output will be saved in the ./output/visualization/plot_motion_profiles directory.
plot_moving_agent_stats.py plots the moving agents versus the stationary agents. Run the following command:
python amelia_datatools/visualization_tools/plot_moving_agent_stats.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--dpi <dpi> \
--num_files <num_files>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<dpi>is the resolution of the image. By default it is600.<num_files>is the number of files to plot. By default it is set to-1. Which plots all the files in the directory.
The output will be saved in the ./output/visualization/plot_moving_agent_stats directory.
plot_sequence_lengths.py plots the sequence lengths of the agents. Run the following command:
python amelia_datatools/visualization_tools/plot_sequence_lengths.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--dpi <dpi> \
--num_files <num_files>where:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<dpi>is the resolution of the image. By default it is600.<num_files>is the number of files to plot. By default it is set to-1. Which plots all the files in the directory.
get_peak_hour.py gets the peak crowdedness of the airports by hour. Run the following command:
python amelia_datatools/todo/get_peak_hour.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--output_dir <output_dir> \
--airport <airport> \
--parallelwhere:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<output_dir>is the path to the output directory. By default it is./output/crowdedness.<airport>is the airport to process. By default it is set toall.--parallelis a flag to process the data in parallel. By default it is set toTrue.
The output will be saved in the ./output/crowdedness directory.
get_movement_stats.py gets the movement statistics of the agents. Run the following command:
python amelia_datatools/todo/get_movement_stats.py \
--base_dir <base_dir> \
--traj_version <traj_version> \
--output_dir <output_dir> \
--airport <airport> \
--parallelwhere:
<base_dir>is the path to the directory where the data is stored. By default it is./datasets/amelia.<traj_version>is the version of the trajectory file. By default it isa10v08.<output_dir>is the path to the output directory. By default it is./output/movement.<airport>is the airport to process. By default it is set toall.--parallelis a flag to process the data in parallel. By default it is set toTrue.
The output will be saved in the ./output/movement directory.
If you find our work useful in your research, please cite us!
@inbook{navarro2024amelia,
author = {Ingrid Navarro and Pablo Ortega and Jay Patrikar and Haichuan Wang and Zelin Ye and Jong Hoon Park and Jean Oh and Sebastian Scherer},
title = {AmeliaTF: A Large Model and Dataset for Airport Surface Movement Forecasting},
booktitle = {AIAA AVIATION FORUM AND ASCEND 2024},
chapter = {},
pages = {},
doi = {10.2514/6.2024-4251},
URL = {https://arc.aiaa.org/doi/abs/10.2514/6.2024-4251},
eprint = {https://arc.aiaa.org/doi/pdf/10.2514/6.2024-4251},
}