/selforacle

Primary LanguagePythonMIT LicenseMIT

Misbehaviour Prediction for Autonomous Driving Systems

This repository contains the code modified from Misbehaviour Prediction for Autonomous Driving Systems.

Setup

Install packages as specified in environment.yml.

Using new data (carla 0.9.9)

###Preprocessing collected data In 2020_CARLA_challenge repo, run

python process_collected_data.py

setting training data path in code-predictors/detectors/single_image_based_detectors/abs_single_image_autoencoder.py.

setting testing data path in code-predictors/evaluation_runner.py.

Training an anomaly detector

In the selforacle repo, run

python code-predictors/training_runner.py -d '/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/collected_data_customized' -sim carla_099 -trs=-1

Testing an anomaly detector

In the selforacle repo, run

python code-predictors/evaluation_runner.py
python code-predictors/eval_scripts/a_set_true_labels.py
python code-predictors/eval_scripts/b_precision_recall_auroc.py

Pre-processing data for our detection method

In the 2020_CARLA_challenge repo, customize route_folder of the file process_collected_data.py to the folder consists of data and run:

python process_collected_data.py

In the selforacle repo, customize return value in the function get_args_serialization_path in code-predictor/utils_args.py (make sure the folders specified in the path all exist).

In code-predictors/evaluation_runner.py, set data path for the variable eval_dir. The value of the variable db_name might also need to be changed when necessary (make sure the folders specified in the path all exist).

In code-predictors/eval_scripts/a_set_true_labels.py, set data path for the variable driving_log.

In the repo selforacle

python code-predictors/evaluation_runner.py -m labeling
python code-predictors/eval_scripts/a_set_true_labels.py

Train and Test Supervised Detector

In simple_detector.py, set path for total_data_dir, train_data_dir, and test_data_dir

python code-predictors/customized_detectors/simple_detector.py

Reference

The current repo is forked from the repo for the following paper:

@inproceedings{2020-icse-misbehaviour-prediction,
	title= {Misbehaviour Prediction for Autonomous Driving Systems},
	author= {Andrea Stocco and Michael Weiss and Marco Calzana and Paolo Tonella},
	booktitle= {Proceedings of 42nd International Conference on Software Engineering},
	series= {ICSE '20},
	publisher= {ACM},
	pages= {12 pages},
	year= {2020}
}