Pytorch implementation of "Geometrically Adaptive Dictionary Attack on Face Recognition" (WACV 2022)

Related tags

Deep LearningGADA
Overview

Geometrically Adaptive Dictionary Attack on Face Recognition

This is the Pytorch code of our paper "Geometrically Adaptive Dictionary Attack on Face Recognition" (WACV2022).

Getting started

Dependencies

The code of GADA uses various packages such as Python 3.7, Pytorch 1.6.0, cython=0.29.21, and it is easy to install them by copying the existing environment to the current system to install them easily.

We have saved the conda environment for both Windows and Ubuntu, and you can copy the conda environment to the current system. You can install the conda environment by entering the following command at the conda prompt.

conda env create -f GADA_ubuntu.yml

After setting the environment, you may need to compile the 3D renderer by entering the command.

At the '_3DDFA_V2\Sim3DR' path

python setup.py build_ext --inplace

Since 3D Renderer has already been compiled on Windows and Ubuntu, there may be no problem in running the experiment without executing the above command.

Pretrained face recognition models

You can download the pretrained face recogntion models from face.evoLVe and CurricularFace

After downloading the checkpoint files, place 'backbone_ir50_ms1m_epoch120.pth' into '/checkpoint/ms1m-ir50/' and 'CurricularFace_Backbone.pth' into '/checkpoint/'

Dataset

You can download test image sequences for the LFW and CPLFW datasets from the following links.

LFW test image sequence

CPLFW test image sequence

Place them into the root folder of the project.

Each image sequence has 500 image pairs for dodging and impersonation attack.

These images are curated from the aligned face datasets provided by face.evoLVe.

Usage

You can perform an attack experiment by entering the following command.

python attack.py --model=2 --attack=EAGD --dataset=LFW

The model argument is the index of the target facial recognition model.

1: CurricularFace ResNet-100, 2: ArcFace ResNet-50, 3: FaceNet

The attack argument indicates the attack method.

HSJA, SO, EA, EAD, EAG, EAGD, EAG, EAGDR, EAGDO, SFA, SFAD, SFAG, SFAGD

If --targeted is given as an execution argument, impersonation attack is performed. If no argument is given, dodging attack is performed by default.

The dataset argument sets which test dataset to use and supports LFW and CPLFW.

If you want to enable stateful detection as a defense, pass the --defense=SD argument to the command line.

When an experiment is completed for 500 test images, a 'Dataset_NumImages_targeted_attackname_targetmodel_defense_.pth' file is created in the results folder like 'CPLFW_500_1_EVGD_IR_50_gaussian_.pth'.

Using plotter.py, you can load the above saved file and print various results, such as the l2 norm of perturbation at 1000, 2000, 5000, and 10000 steps, the average number of queries until the l2 norm of perturbation becomes 2 or 4, adversarial examples, etc.

Citation

If you find this work useful, please consider citing our paper :) We provide a BibTeX entry of our paper below:

    @article{byun2021geometrically,
    title={Geometrically Adaptive Dictionary Attack on Face Recognition},
    author={Byun, Junyoung and Go, Hyojun and Kim, Changick},
    journal={arXiv preprint arXiv:2111.04371},
    year={2021}
    }

Acknowledgement

SeMask: Semantically Masked Transformers for Semantic Segmentation.

SeMask: Semantically Masked Transformers Jitesh Jain, Anukriti Singh, Nikita Orlov, Zilong Huang, Jiachen Li, Steven Walton, Humphrey Shi This repo co

Picsart AI Research (PAIR) 186 Dec 30, 2022
UnsupervisedR&R: Unsupervised Pointcloud Registration via Differentiable Rendering

UnsupervisedR&R: Unsupervised Pointcloud Registration via Differentiable Rendering This repository holds all the code and data for our recent work on

Mohamed El Banani 118 Dec 06, 2022
This repo provides code for QB-Norm (Cross Modal Retrieval with Querybank Normalisation)

This repo provides code for QB-Norm (Cross Modal Retrieval with Querybank Normalisation) Usage example python dynamic_inverted_softmax.py --sims_train

36 Dec 29, 2022
Unofficial implement with paper SpeakerGAN: Speaker identification with conditional generative adversarial network

Introduction This repository is about paper SpeakerGAN , and is unofficially implemented by Mingming Huang ( 7 Jan 03, 2023

This is an unofficial implementation of the paper “Student-Teacher Feature Pyramid Matching for Unsupervised Anomaly Detection”.

This is an unofficial implementation of the paper “Student-Teacher Feature Pyramid Matching for Unsupervised Anomaly Detection”.

haifeng xia 32 Oct 26, 2022
Official implementation of "UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-wise Perspective with Transformer"

[AAAI2022] UCTransNet This repo is the official implementation of "UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-wise Perspectiv

Haonan Wang 199 Jan 03, 2023
Time Dependent DFT in Tamm-Dancoff Approximation

Density Function Theory Program - kspy-tddft(tda) This is an implementation of Time-Dependent Density Functional Theory(TDDFT) using the Tamm-Dancoff

Peter Borthwick 2 Nov 17, 2022
The official re-implementation of the Neurips 2021 paper, "Targeted Neural Dynamical Modeling".

Targeted Neural Dynamical Modeling Note: This is a re-implementation (in Tensorflow2) of the original TNDM model. We do not plan to further update the

6 Oct 05, 2022
A library for implementing Decentralized Graph Neural Network algorithms.

decentralized-gnn A package for implementing and simulating decentralized Graph Neural Network algorithms for classification of peer-to-peer nodes. De

Multimedia Knowledge and Social Analytics Lab 5 Nov 07, 2022
An Ensemble of CNN (Python 3.5.1 Tensorflow 1.3 numpy 1.13)

An Ensemble of CNN (Python 3.5.1 Tensorflow 1.3 numpy 1.13)

0 May 06, 2022
Pytorch implementation of SenFormer: Efficient Self-Ensemble Framework for Semantic Segmentation

SenFormer: Efficient Self-Ensemble Framework for Semantic Segmentation Efficient Self-Ensemble Framework for Semantic Segmentation by Walid Bousselham

61 Dec 26, 2022
Code for AutoNL on ImageNet (CVPR2020)

Neural Architecture Search for Lightweight Non-Local Networks This repository contains the code for CVPR 2020 paper Neural Architecture Search for Lig

Yingwei Li 104 Aug 31, 2022
Safe Model-Based Reinforcement Learning using Robust Control Barrier Functions

README Repository containing the code for the paper "Safe Model-Based Reinforcement Learning using Robust Control Barrier Functions". Specifically, an

Yousef Emam 13 Nov 24, 2022
PiRapGenerator - Make anyone rap the digits of pi

PiRapGenerator Make anyone rap the digits of pi (sample files are of Ted Nivison

7 Oct 02, 2022
An efficient PyTorch library for Global Wheat Detection using YOLOv5. The project is based on this Kaggle competition Global Wheat Detection (2021).

Global-Wheat-Detection An efficient PyTorch library for Global Wheat Detection using YOLOv5. The project is based on this Kaggle competition Global Wh

Chuxin Wang 11 Sep 25, 2022
A reimplementation of DCGAN in PyTorch

DCGAN in PyTorch A reimplementation of DCGAN in PyTorch. Although there is an abundant source of code and examples found online (as well as an officia

Diego Porres 6 Jan 08, 2022
Losslandscapetaxonomy - Taxonomizing local versus global structure in neural network loss landscapes

Taxonomizing local versus global structure in neural network loss landscapes Int

Yaoqing Yang 8 Dec 30, 2022
Gapmm2: gapped alignment using minimap2 (align transcripts to genome)

gapmm2: gapped alignment using minimap2 This tool is a wrapper for minimap2 to r

Jon Palmer 2 Jan 27, 2022
NOMAD - A blackbox optimization software

################################################################################### #

Blackbox Optimization 78 Dec 29, 2022