The code should be run using python 3.6.0, Tensorflow-gpu 2.4.0, Keras 2.4.3, Foolbox 2.3.0, PIL, h5py, and opencv-python
Here, we give VGG19 trained under CIFAR-10 as a example.
python cifar_model.py- Show Observations
python attack_observation.py- Calculate Local Gradient
python Gen_Features_Vgg19.py- Adversarial Detection
python check_peturbations.pySee the paper Adversarial Examples Detection via Local Gradient Checking for more details.