The code for CVPR2019 (ComDefend: An Efficient Image Compression Model to Defend Adversarial Examples) paper The pure tensorflow of code is released in the link
tensorflow>=1.1 python3 canton(pip install canton)
Torch: Train_comdefend_Torch.py TF: Train_comdefend_TF.py
clean_image: we select 7 clean images which are classified correctly by the classifier attack_image: we select 7 adversarial images which are attacked by the FGSM method defend_image: we use the Comdefend to deal with 7 adversarial images chackpoints: the model parameters com_imagenet_temp, temp_imagenet: the temporary files of the Comdefend dev.csv: correspondence between images and labels Resnet_imagenet.py: the classifier compression_imagenet.py: the Comdefend for Imagenet compression_mnist.py: the Comdefend for fashion_mnist
E-mail: jiaxiaojun@iie.ac.cn