- Install IGP2, as specified on https://github.com/uoe-agents/IGP2.
One of the requirements of IGP2 is carla. This, though, is not a requirement for OGRIT. To run on machines that cannot
install carla, do the following:
- Remove
carla==0.9.12fromIGP2/requirements.txt - Remove
from igp2 import(line 17) fromIGP2/igp2/__init__.py - Install IGP2 as per point 1 above
-
Install OGRIT with pip:
cd OGRIT pip install -e . -
Copy the data from the inD dataset into
OGRIT/scenarios/data/ind, and from the rounD dataset intoOGRIT/scenarios/data/round.
Please note: Run all the scripts below from the directory OGRIT/.
-
Extract the occlusions
python scripts/extract_occlusions.py -
Preprocess the data and Extract the base and indicator features:
python scripts/preprocess_data.py --extract_indicator_featuresThe task above may take hours to complete. If you have access to a SLURM sever, you could use the
SLURM_extract_occlusions_example.shSBATCH 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 visualise 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,
python scripts/extract_occlusions_one_episode.py --debug_steps
to visualise the occlusion due to each obstacle in turn for each vehicle.
By default, the two commands 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 frankenberg episode 3, you can run the following command:
python scripts/extract_occlusions_one_episode.py --scenario frankenberg --episode_idx 3 --debug