This project provides three different ways to recover an adversarial image.
- Attack again to recover (attack_to_recover.py): Given an attacked image, apply an attack once more to send it to where it belonged to.
- Genetic Algorithm in raw image space (ga.py): Given an attacked image, apply a genetic algorithm guided by Surprise Adequacy.
- Local search in latent vector space (local_search.py): Given an attacked image, apply a local search guided by Surprise Adequacy in a latent vector space encoded by VAE encoder.
A simple experiment can be conducted by executing experiment.py. All the pretrained models are available in /model.