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.
Download the dataset from TIANCHI. Suppose the directory is $DATA_DIR.
Download the pretrained Face-Recognition models from Baidu (Extraction code: sjqs).
Download the feature files from Baidu (Extraction code: jf2z). Or you can use the script attack/preprocess_eval.py to generate these files.
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
├── ...
└── ...
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
We develop our attack codes based wujiyang's Face_Pytorch.