Home

Awesome

Backdoor Attack in Frequency Domain

DEPENDENCIES

python==3.8.3
numpy==1.19.4
tensorflow==2.4.0
opencv==4.5.1
idx2numpy==1.2.3
pytorch==1.7.0

Dataset Preparation

For GTSRB, PubFig(60 labels) and ImageNet(16 labels), you can download from data/download.txt and uncompress them in data directory. For cifar10 dataset, you can obtain from tensorflow.keras.datasets.

Change Config

You can modify the param dict in the train.py to train your own backdoored model. There are 6 parameters as follows:

Run Backdoor Attack Code

For Tensorflow2.0, you can directly run(default cifar10 dataset):

python train.py

For Pytorch, you can run:

python th_train.py