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 .
- 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 .
python train_test_vgg16.py
This generates the universal perturbation on a pretrained VGG16 model and evaluates misclassifcation rate on multiple different models.
python show_v.py
[1] S. Moosavi-Dezfooli*, A. Fawzi*, O. Fawzi, P. Frossard: Universal adversarial perturbations, CVPR 2017