Skip to content

sky4689524/DefenseGAN-Pytorch

Repository files navigation

Defense-GAN_Pytorch

This repository containts the Pytorch implementation for Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Models, by Samangouei, P., Kabkab, M., & Chellappa, R., at ICLR 2018.

We use CIFAR10 dataset to test models. Also, we use Foolbox to generate three different type of adversarial examples.

Adversarial Attacks

Code Descriptions

cifar10_train.ipynb : train CNN model to classify CIFAR10 dataset

cifar10_test.ipynb : test trained CNN model into clean images and adversarial examples

generate_adversarial_examples.ipynb : generate adversarial examples - FGSM, DF, and SM

train_wgan_cifar10.py : train WGAN model

cifar10_Defense-GAN.ipynb : test defense-GAN algorithm against adversarial examples

Usage for train_wgan_cifar10.py

Examples

python train_wgan_cifar10.py
python defense.py --data_path data/ --iterations 20000 --deviceD 0 --deviceG 1

You can see more detailed arguments.

python train_wgan_cifar10.py -h

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published