Code to reproduce results in the paper Defending against Adversarial Images using Basis Functions Transformations
- Python 3.4 or higher
- TensorFlow 1.2.1
- Cleverhans 2.0
- sklearn
- matlab.engine
We use Cleverhans to perform Fast Gradient Attack.
Set self.setting = 'graybox' and run:
python run_all.py
You can modify which defense/attack methods to use by changing self.defense_list and self.attack_list in config.py.
Set self.setting = 'blackbox' and run:
python run_all.py
Set self.setting = 'whitebox'
python src/run_all_bpda.py
Set self.attack_list = ['FGA'] and run:
python src/run_all_fga.py