-
Notifications
You must be signed in to change notification settings - Fork 0
/
5.run_eval_adv_wb.sh
executable file
·154 lines (109 loc) · 9.02 KB
/
5.run_eval_adv_wb.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
GPU=0
# sysid=A11
# epsilon=100.0
GPU=1
sysid=A11
echo "LCNN half" >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
epsilon=0.1
python eval_adv.py --resume /data/longnv/_saved/models/LA_lcnnHalf_LPSseg_uf_seg600/20220603_083303/model_best.pth \
--adv_data /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/pgd_adv_egs_None_${epsilon} \
--protocol_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
--asv_score_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
--device ${GPU} >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
epsilon=5
python eval_adv.py --resume /data/longnv/_saved/models/LA_lcnnHalf_LPSseg_uf_seg600/20220603_083303/model_best.pth \
--adv_data /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/pgd_adv_egs_None_${epsilon} \
--protocol_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
--asv_score_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
--device ${GPU} >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
echo "LCNN" >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
epsilon=0.1
python eval_adv.py --resume /data/longnv/_saved/models/LA_lcnn_LPSseg_uf_seg600/20220603_103336/model_best.pth \
--adv_data /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/pgd_adv_egs_None_${epsilon} \
--protocol_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
--asv_score_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
--device ${GPU} >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
epsilon=5
python eval_adv.py --resume /data/longnv/_saved/models/LA_lcnn_LPSseg_uf_seg600/20220603_103336/model_best.pth \
--adv_data /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/pgd_adv_egs_None_${epsilon} \
--protocol_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
--asv_score_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
--device ${GPU} >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
echo "SENet" >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
epsilon=0.1
python eval_adv.py --resume /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/model_best.pth \
--adv_data /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/pgd_adv_egs_None_${epsilon} \
--protocol_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
--asv_score_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
--device ${GPU} >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
epsilon=5
python eval_adv.py --resume /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/model_best.pth \
--adv_data /data/longnv/_saved/models/LA_SENet12_LPSseg_uf_seg600/20220603_065018/pgd_adv_egs_None_${epsilon} \
--protocol_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
--asv_score_file /data/Dataset/ASVspoof/LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
--device ${GPU} >> /data/longnv/OutDir/result_20220620_EVAL_ADV_SEnet12.txt
# LCNN model
# python eval3_adv.py --resume _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/checkpoint-epoch3.pth \
# --adv_data _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/fgsm_adv_egs_${sysid}_${epsilon} \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl_${sysid}.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores_${sysid}.txt \
# --device ${GPU}
# origin performance of adv. attack
# python eval3_adv.py --resume _saved/models/LA_SENet12_LPSseg_uf_seg600/20190623_182148/model_best.pth \
# --adv_data _saved/models/LA_SENet34_LPSseg_uf_seg600/20190623_093457/fgsm_adv_egs_${sysid}_${epsilon} \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl_${sysid}.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores_${sysid}.txt \
# --device ${GPU}
# Conduct black-box attack
# python eval3_adv.py --resume _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/checkpoint-epoch3.pth \
# --adv_data _saved/models/LA_SENet12_LPSseg_uf_seg600/20190623_182148/fgsm_adv_egs_${sysid}_${epsilon} \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl_${sysid}.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores_${sysid}.txt \
# --device ${GPU}
# Conduct black-box attack
# python eval3_adv.py --resume _saved/models/LA_SENet12_LPSseg_uf_seg600/20190623_182148/checkpoint-epoch8.pth \
# --adv_data _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/fgsm_adv_egs_${sysid}_${epsilon} \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl_${sysid}.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores_${sysid}.txt \
# --device ${GPU}
# for epsilon in 0.1 1.0 5.0 10.0 25.0 50.0 100.0
# do
# # Conduct white-box attack
# echo -------------------- epsilon = $epsilon ---------------------
# python eval3_adv.py --resume _saved/models/LA_SENet12_LPSseg_uf_seg600/20190628_185040/model_best.pth \
# --adv_data _saved/models/LA_SENet12_LPSseg_uf_seg600/20190628_185040/fgsm_adv_egs_None_${epsilon} \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}
# done
# Conduct white-box attack
# python eval3_adv.py --resume _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/model_best.pth \
# --adv_data _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/pgd_adv_egs_None_5.0 \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}
# # Conduct white-box attack
# python eval3_adv.py --resume _saved/models/LA_lcnnHalf_LPSseg_uf_seg600/20190624_145447/model_best.pth \
# --adv_data _saved/models/LA_lcnnHalf_LPSseg_uf_seg600/20190624_145447/pgd_adv_egs_None_5.0 \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}
# for i in 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100
# do
# python eval2.py --resume _saved/models/config_LA_lcnnSmall3_LPS_257_uf_seg400hop200/20190619_231629/checkpoint-epoch$i.pth \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}
# done
# python eval2.py --resume _saved/models/config_LA_lcnnSmall4_LPS_257_uf_seg400hop200/20190620_083937/model_best.pth \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}
# python eval4.py --resume _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/checkpoint-epoch3.pth \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}
# python eval_tmp.py --resume _saved/models/LA_lcnn_LPSseg_uf_seg600/20190620_121836/checkpoint-epoch3.pth \
# --protocol_file data_LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.eval.trl.txt \
# --asv_score_file data_LA/ASVspoof2019_LA_asv_scores/ASVspoof2019.LA.asv.eval.gi.trl.scores.txt \
# --device ${GPU}