Release for CDTA: Cross-Domain Transfer-Based Attack with Contrastive Learning [AAAI23]
Paper Link: https://ojs.aaai.org/index.php/AAAI/article/view/25239
Download birds-400, food-101, comic books, and oxford 102 flower datasets. Extract them to the ./dataset
directory.
Download target classifiers trained on birds-400, food-101, comic books, and oxford 102 flower. Extract them to the ./pretrained/target
directory.
Download the per-trained feature extractor and put the tar file in the ./pretrained/surrogate
directory.
python eval_cdta.py \
-d '[dataset]' \
-a '[target classifier]' \
--pretrained './pretrained/surrogate/simsiam_bs256_100ep_cst.tar' \
--eps 0.06274509803921569 \
--nb-iter 30 \
--step-size 0.01568627450980392
[dataset]
can bebirds-400
,food-101
,comic books
, oroxford 102 flower
.[target classifier]
can beresnet34
,densenet161
,inception_v3
, orvgg16_bn
.
Or use eval.sh
to test all target models.
bash ./eval.sh
cd cst
python train.py \
-a resnet50 \
-b 256 \
--dist-url 'tcp://localhost:10001' --multiprocessing-distributed --world-size 1 --rank 0 \
--fix-pred-lr \
'[ImageNet path]'