Skip to content

Latest commit

 

History

History
21 lines (20 loc) · 1.08 KB

README.md

File metadata and controls

21 lines (20 loc) · 1.08 KB

UAP-pytorch

A simple and UNOFFICIAL Pytorch implementation of Universal Adversarial Perturbation proposed in [1].
The code is adapted from LTS4 and ferjad. Test passed on python2.7 and Pytorch0.4 .

Usage

Dataset preparation.

  • Training set: Random 10,000 images in 1000 classes from ILSVRC 2012 training set.
  • Validation set: ILSVRC 2012 validation set (50,000 images).

Please modify the dataset path in train_test_vgg16.py .

Traing and evalutaion.

python train_test_vgg16.py

This generates the universal perturbation on a pretrained VGG16 model and evaluates misclassifcation rate on multiple different models.

Visualization of generated noise.

python show_v.py

Reference

[1] S. Moosavi-Dezfooli*, A. Fawzi*, O. Fawzi, P. Frossard: Universal adversarial perturbations, CVPR 2017