Skip to content

Attacking deepfake models (StarGAN) using AI-FGSM, a novel transferable adversarial attack method.

Notifications You must be signed in to change notification settings

EleaZhong/disrupting-deepfakes

 
 

Repository files navigation

StarGAN Adversarial Attack

⚠️ This project is a forked version of this repo! Please go there for the original code.

examples stargen

In our paper, we propose AI-FGSM, a method for transferable adversarial attack for a wide range of models. We experiment of three deep neural networks consisting of image translation and image classification networks. This is our second experiment, which is done on face swapping networks. See our other expeirments at this repo (faceswap) and this repo (Inception models).

StarGAN Dataset

cd stargan
bash download.sh celeba

StarGAN Models

bash download.sh pretrained-celeba-128x128

Attacking StarGAN Model

cd stargan
python main.py --mode test --dataset CelebA --image_size 256 --c_dim 5 --selected_attrs Black_Hair Blond_Hair Brown_Hair Male Young --model_save_dir='stargan_celeba_128/models' --result_dir='stargan_celeba_128/results_test' --test_iters 200000 --batch_size 1

Check the CelebA attributes here

To modify the code, you can alter the LinfPGDAttack class in attacks.py or alter the test_attack method in the Solver class in solver.py

Alternatively, use the jupyter notebook in the files, or try the colab notebook here for testing.

About

Attacking deepfake models (StarGAN) using AI-FGSM, a novel transferable adversarial attack method.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.9%
  • Jupyter Notebook 5.3%
  • Shell 1.9%
  • Other 0.9%