Skip to content

Simultaneously Optimizing Perturbations and Positions for Black-box Adversarial Patch Attacks (TPAMI 2022)

Notifications You must be signed in to change notification settings

shighghyujie/newpatch-rl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simultaneously Optimizing Perturbations and Positions for Black-box Adversarial Patch Attacks

This repository contains the code for Simultaneously Optimizing Perturbations and Positions for Black-box Adversarial Patch Attacks (TPAMI 2022)

This work empirically illustrates that the position and perturbation of the adversarial patch are equally important and interact with each other closely. Therefore, taking advantage of the mutual correlation, an efficient method is proposed to simultaneously optimize them to generate an adversarial patch in the black-box setting.

Preparation

Environment Settings:

This project is tested under the following environment settings:

  • Python>=3.6.0
  • PyTorch>=1.7
$ git clone https://github.com/shighghyujie/newpatch-rl.git
$ cd newpatch_rl
$ pip install -r requirements.txt

Data Preparation:

Please download the dataset (LFW) to construct the face database.

If you want to use your own database, you should prepare your own dataset, and the dataset structure is as follows:

Directory structure:

-datasets name
 --person 1
   ---pic001
   ---pic002
   ---pic003  

Then you can execute the command as follows:

$ cd newpatch-rl/rlpatch
$ python create_new_ens.py --database_path Your_Database_Path --new_add 0

Model Preparation:

The models should be placed in "newpatch_rl/rlpatch/stmodels".

Quick Start

You should prepare the folder of sacrificed faces according to the above directory structure.

Running this command for attacks:

$ cd rlpatch
$ python target_attack.py

About

Simultaneously Optimizing Perturbations and Positions for Black-box Adversarial Patch Attacks (TPAMI 2022)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages