Detecting Adversarial Examples from Sensitivity Inconsistency of Spatial-Transform Domain (Paper ID: 2700)
- Pytorch
- pywt (pip install PyWavelets)
TrainDualModel.py
Pretrained primal and dual models for testing have been placed in the folder ''pre_trained''.
python TrainDualModel.py --dataset=cifar10 --net_type=resnet --lr=1e-6 --wd=0.005
1. Prepare correctly classified imags, the correspodning adversarial examples and natural noise examples:
ADV_Samples.py
The produced examples for testing have been placed in the Google drive https://drive.google.com/file/d/1AbYkSKaOb7RozZ2TJlD4bvkxrSus12JJ/view?usp=sharing.
python ADV_Samples.py --dataset=cifar10 --net_type=resnet --adv_type=BIM --adv_parameter=0.006
KnownAttack.py
Four pretrained SID's have been placed in `./ExperimentRecord/KnownAttack/`.
python KnownAttack.py
TransferAttack.py