Targeted Adversarial Attack using FGSM Method in Facial Recognition Embedding Model
Usage Guide • Contributors • Quick Start
FaceGSM designed for performing targeted adversarial attacks using the FGSM (Fast Gradient Sign Method) in Facial Recognition Embedding Model. FaceGSM revolutionizes security testing with a suite of innovative features, including:
- Static - Takes static images as input for FaceGSM.
- Capture - Takes image captured by camera as input for FaceGSM
- Live - Takes real-time live video feed frames as input for FaceGSM.
Attacker's Face (Clario) |
Target's Face (Clints) |
Output : Generated Adversarial Image |
Attack Result : Attacker's Face Predicted as Victim |
✅ Fully compatible with multiple facial recognition embedding model including FaceNet, ArcFace, GhostFaceNet, DeepID, and VGGFace2
✅ Supports multiple input media, including static image, captured image and live video feed
✅ Saved generated adversarial image as checkpoints to increase efficiency for future attacks
✅ Works with your own Custom Face Datasets
✅ Provide easy installation and intuitive UI/UX
# Clone the FaceGSM repository
$ git clone https://github.com/facegsmproject/FaceGSM
Install Conda from here. After installing Conda, Run the following commands :
# Create the environment for FaceGSM using the provided facegsm.yml file
$ conda env create --name facegsm --file facegsm.yml
# Activate the FaceGSM environment
$ conda activate facegsm
For more detail about the installation, please refer to our Installation Guide
To test if FaceGSM is working properly you can use FaceGSM's default datasets and run the following command:
$ python3 facegsm.py static --original ./datasets/04.jpg --target ./datasets/74.jpg
$ python3 facegsm.py --help
Usage: python3 facegsm.py [ static | capture | live | database ] --help
Options:
static: Static input for FGSM attack in FaceGSM.
capture: Capture original and target photos in FaceGSM.
live: Live camera feature in FaceGSM includes real-time face recognition and attack capabilities.
database: Create a database based on datasets for FaceGSM.
--help: Show help for available options.
Generate your own custom face datasets by running the following command:
$ python3 facegsm.py database --dataset ./your_custom_dataset_folder
Run FaceGSM with your custom face datasets:
$ python3 facegsm.py static --original ./your_custom_dataset_folder/a.jpg --target ./your_custom_dataset_folder/b.jpg
FaceGSM is developed by :