Skip to content

GAT: Generative Adversarial Training for Adversarial Example Detection and Robust Classification

Notifications You must be signed in to change notification settings

xuwangyin/GAT-ImageNet

Repository files navigation

Generative Adversarial Training on Restricted ImageNet

Train and evaluation

  1. Create the dog-vs-others dataset: python create_dataset.py [your ImageNet dir].
  2. Use train.py to train the robust dog detector. The suggested training procedure is to linearly scale-up the perturbation limit.
  3. Use eval.py to evaluate trained model.
  4. Use synthesis.py to generate samples, and plot_adv.py to plot adversarial examples.
    $ python synthesis.py \
    checkpoints-norm_Linf-eps_0.3-step_size_0.001-steps_400/resnet_50_dog_epoch1_iter1000.pth
    

Reproduce the robustness test result

  1. Download the eps0.02 model.
  2. Run robustness test, change step-size and steps accordingly.
    $ python eval.py --eps 0.02 --norm Linf --steps 40 --step_size 0.001 \
    checkpoints-eps0.02-steps40-stepsize0.001/resnet_50_dog_epoch6.pth
    

Model checkpoints

About

GAT: Generative Adversarial Training for Adversarial Example Detection and Robust Classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages