Exploring Frequencies via Feature Mixing and Meta-Learning for Improving Adversarial Transferability
- python 3.9
- torch 1.8
- pretrainedmodels 0.7
- numpy 1.19
- pandas 1.2
-
Prepare models
Download pre-trained PyTorch models here, which are converted from widely used Tensorflow models. Then put these models into
./models/
-
Generate adversarial examples under inception-v3 -
CUDA_VISIBLE_DEVICES=gpuid python main.py --model_type inceptionv3
-
Evaluations on normally trained and AT models
python verify.py
-
Evaluations on other defenses
To evaluate the attack success rates on six more advanced models (HGD, R&P, NIPS-r3, RS, JPEG, NRP).
-
Inc-v3ens3,Inc-v3ens4,IncRes-v2ens: You can directly run
verify.py
to test these models. -
HGD, R&P, NIPS-r3: We directly run the code from the corresponding official repo.
-
RS: noise=0.25, N=100, skip=100. Download it from the corresponding official repo.
-
JPEG: No extra parameters.
-
NRP: purifier=NRP, dynamic=True, base_model=Inc-v3ens3. Download it from the corresponding official repo.
More details about evaluations on six more advanced in third_party
-