Giter Site home page Giter Site logo

adversarialmask's Introduction

Adversarial Mask: Real-World Universal Adversarial Attack on Face Recognition Models

This is a PyTorch implementation of Adversarial Mask: Real-World Universal Adversarial Attack on Face Recognition Models by Alon Zolfi, Shai Avidan, Yuval Elovici, Asaf Shabtai. Mask projection code is partially inspired from FaceXZoo.

projection pipeline

Face Recognition Models

Please put the downloaded weights in a local directory called "weights" under each model directory (or change location in the config file).

ArcFace and CosFace

Code is taken from here. Download weights from here.

MagFace

Code is taken from here. Download weights from here.

Landmark Detection Models

MobileFaceNet

Code is taken from here. Download weights from here. (Weights file is already included in this repository under landmark_detection/pytorch_face_landmark/weights).

Face Alignment

Code is taken from here. Weights are downloaded automatically on the first run.

Note: this model is more accurate, however, it is a lot larger than MobileFaceNet and requires a large memory GPU to be able to backpropagate when training the adversarial mask.

3D Face Reconstruction Model

Code is taken from here. Download weights from here. (Weights file is already included in this repository under prnet).

Datasets

CASIA-WebFace

The cleaned up version of the dataset can be found here, suggested by this github issue.

Installation

Install the required packages in req.txt.

Usage

Configuration

Configurations can be changed in the config file.

Train

Run the patch/train.py file.

Test

Run the patch/test.py file. Specify the location of the adversarial mask image in main function.

Citation

@article{zolfi2021adversarial,
  title={Adversarial Mask: Real-World Adversarial Attack Against Face Recognition Models},
  author={Zolfi, Alon and Avidan, Shai and Elovici, Yuval and Shabtai, Asaf},
  journal={arXiv preprint arXiv:2111.10759},
  year={2021}
}

adversarialmask's People

Contributors

alonzolfi avatar michakh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.