Coder Social home page Coder Social logo

dftnd's Introduction

attack demo

To generate attacked images, use the following example. Make sure to specify the necessary commands.

python main.py --area C --attack_type PGD_l2 --attack_goal N --model_type resnet18 --strategy WB 

And then the following commands will be executed.

python PGD.py --area C --attack_type PGD_l2 --attack_goal N --model_type resnet18 --strategy WB

The arguments behind are the ones in PGD.py file, which are be used to set the conresponding parameters.

To submit your attacks, name your main attack file with the attack name such as 'PGD.py'. Originize your source files and make sure the attack can run such as the following example.

python PGD.py --area C --attack_type PGD_l2 --attack_goal N --model_type resnet18 --strategy WB

How to add your own attacks?
In main.py, make sure to keep attack_type same with attack_type in your own attack files. For example, 'PGD_linf' and 'PGD_l2' are the attack_types used in PGD.py. So the codes in main.py shoule be like:

if attack_type == 'PGD_linf' or 'PGD_l2':
    attack = 'PGD'

Here attack is the name of your attack file.
Another example is adversarial patch attack.

if attack_type == 'Patch':
    attack = 'Patch_Attack'

The codebook is here:

Codebook:

head

details

area

attack type

attack goal

attacker knowledge

model type

strategy

C -- Classification

0 -- non-attack

T -- target

V16 -- VGG16

WA -- White Box

D -- Detection

1 -- lp attack

N -- non-target

V19 -- VGG19

TB -- Transfer based Black Box

F -- Face recognition

2 -- patch attack

R50 -- Resnet50

QB -- Query based Black Box

3 -- trojan attack

R18 -- Resnet18

L04 – Lenet with 4 convs

I03 -- inception3

 

 

 

dftnd's People

Contributors

linlabneu avatar yeez-lee avatar eddieback avatar zkysfls avatar vishal3477 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.