- Install tensorflow
- Clone this repo:
git clone https://github.com/gnsrla12/CrashToNotCrash_code
cd gtacrash_for_distrib
- Download YouTubeCrash (Real accident dataset collected from YouTube):
bash ./datasets/download_dataset.sh ae_photos
- Download GTACrash (Synthetic accident dataset collected from Grand Theft Auto V):
bash ./datasets/download_dataset.sh horse2zebra
- Download the pre-trained model trained on GTACrash:
bash ./pretrained_models/download_model.sh style_cezanne
- Now, let's measure performance of our model on the YouTube test dataset:
python ./scripts/test_script.py
The test results will be printed. ROC-AUC should output 0.915411. (Note that the measured accuracy is when threshold of the predictor is fixed at 0.5, and that is not an appropriate metric for the binary classification task)
- Train a model on the GTACrash dataset:
python ./scripts/train_gta_script.py
- Train a model on the YouTubeCrash dataset:
python ./scripts/train_yt_script.py
The trained model will be saved to: ./checkpoints/
- Finally, visualize the prediction results of the model:
python ./scripts/visualize_script.py
The visualized results will be saved to : ./visualization/