Skip to content

Release for CDTA: A Cross-Domain Transfer-Based Attack with Contrastive Learning [AAAI23]

Notifications You must be signed in to change notification settings

LiulietLee/CDTA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDTA

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

Datasets

Download birds-400, food-101, comic books, and oxford 102 flower datasets. Extract them to the ./dataset directory.

Pre-trained target classifiers

Download target classifiers trained on birds-400, food-101, comic books, and oxford 102 flower. Extract them to the ./pretrained/target directory.

Pre-trained feature extractor

Download the per-trained feature extractor and put the tar file in the ./pretrained/surrogate directory.

Evaluation

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 be birds-400, food-101, comic books, or oxford 102 flower.
  • [target classifier] can be resnet34, densenet161, inception_v3, or vgg16_bn.

Or use eval.sh to test all target models.

bash ./eval.sh

Train feature extractor

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]'

About

Release for CDTA: A Cross-Domain Transfer-Based Attack with Contrastive Learning [AAAI23]

Resources

Stars

Watchers

Forks

Packages

No packages published