the attacker will use adversarial examples (up to epsilon=8 in the L_infinity norm) to attack your model, which is under white-box setting. In this project, I train a robust model for CIFAR-10 that can defend the adversarial examples.
My defense pipeline include image preprocessing, and adversarial training, etc. The detail can be found in the report hw2_r09942066.pdf, please let me know if you need the model weight(email me), then I will send you the download link.
- resnet50
- PGD
- FGSM
- PGD adversarial training
- data pre-processing
- SLQ
- proposed method
- pytorch 1.5.0
- python 3
- built-in modules and numpy
- opencv hw2.py has been tested under this env
run python hw2.py [image folder]
cd src/example
python adversarial_testing.py
cd src/example
python ablation_study.py
cd src/example
python test_PGD.py
67.2% accuracy for PGD attack(max epsilon=0.3) under white-box setting
If there are any problem that make you cannot execute the program, please contact
[email protected] (I have already test under the specify env).