Skip to content

Tensorflow implementation of "Defense against Universal Adversarial Perturbations"

Notifications You must be signed in to change notification settings

liujianee/Pertrubation_Rectifying_Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Defense against Universal Adversarial Perturbations

This repository contains the Tensorflow implementation of "Defense against Universal Adversarial Perturbations"(CVPR2018)

Environment

  • Python 2.7
  • Tensorflow 1.4.0

Usage

TESTING

  1. Download Inception PRN models from google drive.

  2. Edit TESTING script, set --data_dir to the direcotry of clean images, set --perturb_dir to the base pertubation directory, and set --pert_test_dir to 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 
└── ...
  1. Run TESTING script.

TRAINING

  1. Edit TRAINING configuration. Set --data_dir to clean images, note that data_dir_1~data_dir_4 are the corner-cropped images used as data augmentation. perturb_dir and pert_train_dir have similar reference as in TESTING.

  2. Run TRAINING script.

References

About

Tensorflow implementation of "Defense against Universal Adversarial Perturbations"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published