Skip to content

Verifiable Goal Recognition for Autonomous Driving with Occlusions

License

Notifications You must be signed in to change notification settings

uoe-agents/OGRIT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OGRIT

  1. 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 .
    
  2. Install OGRIT with pip:

    cd OGRIT
    pip install -e .
    
  3. Set up the required folders by running:

    python ogrit/core/base.py
    
  4. Copy the data from the inD dataset into OGRIT/scenarios/data/ind, and from the rounD dataset into OGRIT/scenarios/data/round.

  5. Extract the occlusions. You can either:

    1. Download the folders bendplatz_pickle, frankenburg_pickle, heckstrasse_pickle and neuweiler_pickle from the from the [inDO and rounDO datasets](link_see also below). Then, unzip them and copy the files inside them in the OGRIT/occlusions folder.
    2. OR run the following command:
      python scripts/extract_occlusions.py
      
  6. 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.

  7. 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
    

Occlusion detection

a) Visualize the occlusions as they are generated by the occlusion detection algorithm

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:

  •  python visualise_json_occlusions.py --scenario scenario_name --episode_idx episode_idx --frame_id frame_id
    
    Note: you need to change the scenario_name and episode_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 frame 0.

Otherwise, run the following if the episode data is in pickle format:

  •  python visualise_pickle_occlusions.py --scenario scenario_name --episode_idx episode_idx --frame_id frame_id
    
    Note: you need to change the scenario_name and episode_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 frame 0.

We used IGP2 from commit f9a876a8333e4afa1d618e74fe4fdb7cbbdf3730 in the dev branch.

About

Verifiable Goal Recognition for Autonomous Driving with Occlusions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published