-
Install IGP2, as specified on https://github.com/uoe-agents/IGP2. Note: please install the
ogrit
branch of IGP2. Therefore the suggested sequence of steps is as follows:git clone https://github.com/uoe-agents/IGP2.git cd IGP2 git checkout ogrit pip install -e .
-
Install OGRIT with pip:
cd OGRIT pip install -e .
-
Set up the required folders by running:
python ogrit/core/base.py
-
Copy the data from the inD dataset into
OGRIT/scenarios/data/ind
, and from the rounD dataset intoOGRIT/scenarios/data/round
. -
Extract the occlusions. You can either:
- Download the folders
bendplatz_pickle
,frankenburg_pickle
,heckstrasse_pickle
andneuweiler_pickle
from the from the [inDO and rounDO datasets](link_see also below). Then, unzip them and copy the files inside them in theOGRIT/occlusions
folder. - OR run the following command:
python scripts/extract_occlusions.py
- Download the folders
-
Preprocess the data and extract the base and indicator features:
python scripts/preprocess_data.py
The task above may take hours to complete. If you have access to a SLURM sever, you could use the
SLURM_extract_occlusions_example.sh
SBATCH script as an example to extract the base and indicator features. You need to create a script for each of the scenarios. More instructions are given in the example file mentioned. -
Train OGRIT and the baseline (G-GRIT). Then calculate the evaluation metrics on the test set:
python scripts/train_occlusion_grit.py python scripts/train_generalised_decision_trees.py python scripts/evaluate_models_from_features.py --models occlusion_grit,generalised_grit,occlusion_baseline python scripts/plot_results.py
To visualize the occlusions generated by the occlusion detection algorithm, first complete steps 1-3 above and then,
from the OGRIT/
directory, run the following command:
python scripts/extract_occlusions_one_episode.py --debug
to visualise all the occlusions for each vehicle in the frame. Otherwise,
By default, the above will give the occlusions for the bendplatz
scenario, episode 0
.
You can change it by adding the --scenario
and --episode_idx
parameters.
For example, to get the occlusions in frankenburg
episode 3
, you can run the following command:
python scripts/extract_occlusions_one_episode.py --scenario frankenburg --episode_idx 3 --debug
b) Visualize the occlusions contained in the inDO, rounDO and OpenDDO datasets
To visualise the occlusions for one of the episodes contained in the inDO, rounDO and OpenDDO datasets,
follow steps 1-4 of the OGRIT
section above.
Then, if the episode data is in the JSON format run the following command:
-
Note: you need to change the
python visualise_json_occlusions.py --scenario scenario_name --episode_idx episode_idx --frame_id frame_id
scenario_name
andepisode_idx
above according to the episode you want to see the occlusions for. the--frame_id
argument can be left out if you want to start from frame0
.
Otherwise, run the following if the episode data is in pickle format:
-
Note: you need to change the
python visualise_pickle_occlusions.py --scenario scenario_name --episode_idx episode_idx --frame_id frame_id
scenario_name
andepisode_idx
above according to the episode you want to see the occlusions for. the--frame_id
argument can be left out if you want to start from frame0
.
We used IGP2 from commit f9a876a8333e4afa1d618e74fe4fdb7cbbdf3730
in the dev
branch.