Giter VIP home page Giter VIP logo

face-adversarial-attack's Introduction

Face-Adversarial-Attack

Introduction

This is an easy approach for the competition "Facial Adversary Examples" in TIANCHI, which can get 3.5 in score based the evaluation criterion of the competition.

Preparation

  1. Download the dataset from TIANCHI. Suppose the directory is $DATA_DIR.

  2. Download the pretrained Face-Recognition models from Baidu (Extraction code: sjqs).

  3. Download the feature files from Baidu (Extraction code: jf2z). Or you can use the script attack/preprocess_eval.py to generate these files.

  4. Init attack mask directory:

    mkdir attack/masks
    

    Your directory tree should look like this:

    ${PROJECT_HOME}
    ├── attack
        ├── log
        ├── masks
        ├── state
        └── *.py
    ├── model
        └── downloaded models
    ├── result
        └── downloaded features
    ├── ...
    └── ...
    

Dependencies

  • python 3.6
  • PyTorch 1.0.1
  • CUDA 9.0
  • CUDNN 7.1.2
  • opencv 3.4.2
  • numpy 1.15
  • scipy 1.2.0

Note

  • The code is developed using python 3.6 on Ubuntu 18.04. NVIDIA GPUs are needed.
  • The code is tested using 1 NVIDIA 1080Ti GPU card. Other platforms or GPU cards are not fully tested.
  • OpenCV is installed through anaconda, which is a little different with installed through pip.

Usage

cd $PROJECT_HOME/attack

python attack.py \
    --root $DATA_DIR/securityAI_round1_images \
    --dev_path $DATA_DIR/securityAI_round1_dev.csv \
    --output_path $OUTPUT_PATH

Acknowledgement

We develop our attack codes based wujiyang's Face_Pytorch.

face-adversarial-attack's People

Contributors

zhang943 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.