Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.base
Commits
f423144f
Commit
f423144f
authored
Jun 22, 2018
by
Theophile GENTILHOMME
Browse files
[script,test][vuln_commands,test_commands] Allows vuln histo to take
dev-scores only and fix the tests accordingly.
parent
5998bdcf
Pipeline
#21272
passed with stage
in 33 minutes and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/script/vuln_commands.py
View file @
f423144f
...
...
@@ -310,7 +310,7 @@ def epsc(ctx, scores, criteria, var_param, fixed_param, three_d, sampling,
@
click
.
command
()
@
common_options
.
scores_argument
(
nargs
=-
1
,
min_arg
=
2
,
force_eval
=
True
)
@
common_options
.
scores_argument
(
nargs
=-
1
,
min_arg
=
2
)
@
common_options
.
output_plot_file_option
(
default_out
=
'vuln_hist.pdf'
)
@
common_options
.
n_bins_option
()
@
common_options
.
criterion_option
()
...
...
@@ -331,19 +331,21 @@ def epsc(ctx, scores, criteria, var_param, fixed_param, three_d, sampling,
@
common_options
.
legend_ncols_option
()
@
common_options
.
style_option
()
@
common_options
.
hide_dev_option
()
@
common_options
.
eval_option
()
@
verbosity_option
()
@
click
.
pass_context
def
hist
(
ctx
,
scores
,
**
kwargs
):
def
hist
(
ctx
,
scores
,
evaluation
,
**
kwargs
):
'''Vulnerability analysis distributions.
Plots the histogram of score distributions. You need to provide 4 score
files for each biometric system in this order:
Plots the histogram of score distributions. You need to provide 2 or 4 score
files for each biometric system in this order.
When evaluation scores are provided, you must use the ``--eval`` option.
\b
* licit development scores
* licit evaluation scores
*
(optional)
licit evaluation scores
* spoof development scores
* spoof evaluation scores
*
(optional)
spoof evaluation scores
See :ref:`bob.pad.base.vulnerability` in the documentation for a guide on
vulnerability analysis.
...
...
@@ -355,12 +357,12 @@ def hist(ctx, scores, **kwargs):
Examples:
$ bob vuln vuln_hist -v licit/scores-dev licit/scores-eval
\
$ bob vuln vuln_hist
-e
-v licit/scores-dev licit/scores-eval
\
spoof/scores-dev spoof/scores-eval
$ bob vuln vuln_hist -v {licit,spoof}/scores-{dev,eval}
$ bob vuln vuln_hist
-e
-v {licit,spoof}/scores-{dev,eval}
'''
process
=
figure
.
HistVuln
(
ctx
,
scores
,
True
,
load
.
split
)
process
=
figure
.
HistVuln
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
.
run
()
...
...
bob/pad/base/test/test_commands.py
View file @
f423144f
...
...
@@ -111,14 +111,13 @@ def test_hist_vuln():
result
=
runner
.
invoke
(
vuln_commands
.
hist
,
[
'--criterion'
,
'eer'
,
'--output'
,
'HISTO.pdf'
,
'-b'
,
'30'
,
licit_dev
,
licit_test
,
spoof_dev
,
spoof_test
])
licit_dev
,
licit_test
])
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
vuln_commands
.
hist
,
[
'--criterion'
,
'eer'
,
'--output'
,
'HISTO.pdf'
,
'-b'
,
'2,20,30'
,
'HISTO.pdf'
,
'-b'
,
'2,20,30'
,
'-e'
,
licit_dev
,
licit_test
,
spoof_dev
,
spoof_test
])
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment