Skip to content

Latest commit

 

History

History
96 lines (59 loc) · 3.38 KB

README.md

File metadata and controls

96 lines (59 loc) · 3.38 KB

Collaborated with: Rishabh Jain

Adversarial Training for self driving car

Adversarial training for autonomous vehicle

Based on adversarial attack mentioned in [ Paper ]

The behaviour of end-to-end autonomous driving model can mititgate adversarial attack by adding few safety mechanisms.

note: model-new.h5 is the newest trained model on adversarial images and is resilient to adversarial attacks. model-old.h5 is the old model that is not resilient to adversarial attack.

Training the model

You can use the dataset from Udacity to train your own autonomous driving model. Extract the dataset to model/data, and the folder structure should be like this. Due to its sheer size, all the in-house dataset was not uploaded (only partial is uploaded for the purpose of demonstration).

├───model
│   ├───data
│   │   ├───IMG
|   |   └───driving_log.csv
│   └───model.py

And then start training:

python model.py

This will generate a file model-<epoch>.h5 whenever the performance in the epoch is better than the previous best. More details are illustrated here.

Quick Start

You may use anaconda or miniconda.

$ git clone https://github.com/MJavaadAkhtar/Adversarial-training
$ cd adversarial-driving/model

$ # CPU
$ conda env create -f environment.yml
$ conda activate adversarial-driving

$ # GPU
$ conda env create -f environment_gpu.yml
$ conda activate adversarial-gpu-driving

$ python drive.py model-new.h5 

This simulator was built for Udacity's Self-Driving Car Nanodegree, and it's available here (Download the zip file, extract it and run the executable file).

$ cd adversarial-driving/simulator/
$ ./Default\ Linux\ desktop\ Universal.x86_64

Version 1, 12/09/16

Linux Mac Windows 32 Windows 64

Your can use any web server, just serve all the content under client/web.

If you use windows, click on client/client.exe. It's a single executable that packages everything.

For Linux and Mac, or other Unix, the server can be built with:

$ cd adversarial-driving/client
$ go install github.com/gobuffalo/packr/v2@v2.8.3
$ go build
$ ./client

The web page is available at: http://localhost:3333/

Resources