This repository contains the Tensorflow implementation of "Defense against Universal Adversarial Perturbations"(CVPR2018)
- Python 2.7
- Tensorflow 1.4.0
-
Download Inception PRN models from google drive.
-
Edit TESTING script, set
--data_dirto the direcotry of clean images, set--perturb_dirto the base pertubation directory, and set--pert_test_dirto the TESTING perturbation folder.
Directory structure of -data_dir:
ILSVRC2012_img
├── 1
│ ├── ILSVRC2012_val_00000756.png
│ ├── ILSVRC2012_val_00001260.png
│ ├── ILSVRC2012_val_00006145.png
│ └── ...
├── 2
├── 3
├── ...
└── 1000
Directory structure of --pert_test_dir:
inception_L2_Pert
├── perturbation_map_1.npy
├── perturbation_map_2.npy
└── ...
- Run TESTING script.
-
Edit TRAINING configuration. Set
--data_dirto clean images, note thatdata_dir_1~data_dir_4are the corner-cropped images used as data augmentation.perturb_dirandpert_train_dirhave similar reference as in TESTING. -
Run TRAINING script.
