forked from ano-demo/AdvAttacksASVspoof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_eval_adv_wb.sh
91 lines (68 loc) · 5.38 KB
/
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
GPU=0
# sysid=A11
# epsilon=100.0
# 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}