-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun_exp_tab1.sh
95 lines (84 loc) · 7.86 KB
/
run_exp_tab1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
gpuid=0
dir_cache='data2/'
log='data/log_tab1.txt'
# attack params
dataset='rparis6k'
carrier='flower'
arch='alexnet'
sigmablur=0.0
scales='[1024]'
lam=0.0
# test params
testscale=1024
# attack params
iter=100
mode='global'
pool='gem'
modellist=$arch"-"$pool
# run attack
python3 attack_queries.py --dataset=$dataset --carrier=$carrier --mode=$mode --modellist=$modellist --scales=$scales --iters=$iter --lam=$lam --sigma-blur=$sigmablur --gpu-id=$gpuid
# evaluate retrieval performance
testpool='gem'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='mac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='spoc'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='rmac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='crow'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
# attack params
iter=100
mode='global'
pool='gem-mac-spoc'
modellist=$arch"-"$pool
# run attack
python3 attack_queries.py --dataset=$dataset --carrier=$carrier --mode=$mode --modellist=$arch"-"$pool --scales=$scales --iters=$iter --lam=$lam --sigma-blur=$sigmablur --gpu-id=$gpuid
# evaluate retrieval performance
testpool='gem'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='mac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='spoc'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='rmac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='crow'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
# attack params
iter=100
mode='hist'
pool=$mode
modellist=$arch"-"$pool
# run attack
python3 attack_queries.py --dataset=$dataset --carrier=$carrier --mode=$mode --modellist=$arch"-"$pool --scales=$scales --iters=$iter --lam=$lam --sigma-blur=$sigmablur --gpu-id=$gpuid
# evaluate retrieval performance
testpool='gem'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='mac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='spoc'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='rmac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='crow'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
# attack params
iter=1000
mode='tensor'
pool=$mode
modellist=$arch"-"$pool
# run attack
python3 attack_queries.py --dataset=$dataset --carrier=$carrier --mode=$mode --modellist=$arch"-"$pool --scales=$scales --iters=$iter --lam=$lam --sigma-blur=$sigmablur --gpu-id=$gpuid
# evaluate retrieval performance
testpool='gem'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='mac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='spoc'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='rmac'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log
testpool='crow'
python3 eval_retrieval.py --gpu-id $gpuid --network-offtheshelf $arch"-"$testpool --dataset $dataset --image-size 1024 --image-resize $testscale --dir-attack "data/"$dataset"_"$modellist"+"$scales"+iter"$iter"+lr0.01+lam"$lam"+sigmablur"$sigmablur"_"$carrier"/" --ext-attack '.png' --dir-cache $dir_cache --log=$log