alldbi / SmoothFool

SmoothFool: An Efficient Framework for Computing Smooth Adversarial Perturbations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SmoothFool

Pytorch implementation of SmoothFool: An Efficient Framework for Computing Smooth Adversarial Perturbations.

Setup

Prerequisites

  • Pytorch > 0.4
  • Python 3.5
  • PIL
  • Matplotlib
  • Numpy

Getting Started

# clone this repo
git clone https://github.com/alldbi/SmoothFool.git
cd SmoothFool

# Generating smooth adversarial examples:
python smoothfool.py \
  --net resnet101 \
  --img "path to the input image" \
  --type "type of smoothing which can be gaussian, linear, or uniform." \
  --sigma "parameter of the smoothing function, for gaussian is the standard deviation, for linear and uniform is the size of kernel" \
  --smoothclip "whether using smoothclip or conventional clip" \

Sample results

Gaussian

Linear

Uniform

Citation

If you use the code or methodology for your research, please cite the paper: SmoothFool: An Efficient Framework for Computing Smooth Adversarial Perturbations

References

About

SmoothFool: An Efficient Framework for Computing Smooth Adversarial Perturbations


Languages

Language:Python 100.0%