adversarial-nets
Code for a blog post exploring adversarial perturbations
Based on Universal adversarial perturbations (code).
Setup
First, set up your environment with your Google Cloud credentials according to the instructions here.
Then, install the required packages using Anaconda:
$ conda env create -f environment.yml
$ source activate adversarial
# No conda-installable version of this package currently available
$ pip install --upgrade google-cloud
Scripts
preprocess_images.py
: Crop and scale images from Arxiv tarball to the required sizeperturb.py
: Create perturbed versions of each imagelabel.py
: Label images via Google Cloud Vision APIanalysis.py
: Evaluate labels
Usage
$ python py/perturb.py
$ python py/label.py
$ python py/analysis.py