An efficient and sparse adversarial test case generation method for CV(computer Vision) software
Code release and supplementary materials for:
"SparseAG-GS: Adversarial Test Case Generation via Sparse Perturbation Group"
The code was tested with:
- h5py 3.8.0
- ipykernel 6.19.2
- matplotlib 3.7.2
- numpy 1.25.2
- pandas 1.5.3
- scikit-image 0.21.0
- scipy 1.9.3
- torch 1.11.0
- torchvision 0.12.0
- tqdm 4.64.1
Training the improved AdvGAN for generating the importance matrix of perturbations.
python train_advGAN.py
- Non-target attacks on CIFAR-10
python SparseAG_GS_cifar.py - Target attacks on CIFAR-10
python SparseAG_GS_Tarcifar.py - Non-target attacks on ImageNet
python SparseAG_GS_imagenet.py - Target attacks on ImageNet
python SparseAG_GS_imagenetTar.py - Ablation study
python aeCifar.py