Skip to content

DerekKirschbaum/CS190AProject-s25

Repository files navigation

CS190AProject-s25

This repo contains all of the code and figures that we used in all of the experiments, as well as our final paper, "Exploring the Impact of Model Architecture on Adversarial Transferability in Facial Recognition".

Running the Code

To run the code:

  1. Clone the repository:

    git clone https://github.com/DerekKirschbaum/CS190AProject-s25.git
    cd CS190AProject-s25
    
  2. Activate virtual environment:

    Create an env311 folder first if you don't have one already:

    python3.11 -m venv env311

    Then run:

    source env311/bin/activate
  3. Install necessary packages:

    pip install numpy torch torchvision facenet-pytorch matplotlib pillow insightface transforms 
    
  4. Run the program: To test specific types of attacks, modify epsilon values, or modify the models being tested, edit perturbation_testing.py and then run:

    python perturbation_testing.py

    To view visuals of specific gradients or to save perturbed images, edit visual.py and then run:

    python visual.py

    If you would like to vary the dataset and establish a new random seed for train/validation/test split, edit preprocess_data.py and then run:

    python preprocess_data.py
    python build.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages