Skip to content

A Simple Pytorch Implementation of Universal Adversarial Perturbation to fool neural networks.

License

Notifications You must be signed in to change notification settings

Exely/UAP-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Simple Pytorch Implementation of Universal Adversarial Perturbation to fool neural networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages