Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.measure
Commits
34ae249a
Commit
34ae249a
authored
Apr 09, 2018
by
Theophile GENTILHOMME
Browse files
Fix evaluate so that all metrics are written in the same log file. Add cmc option
parent
44c25df8
Pipeline
#18476
passed with stage
in 23 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/measure/script/commands.py
View file @
34ae249a
...
...
@@ -191,7 +191,7 @@ def evaluate(ctx, scores, test, **kwargs):
test-score set is provided
3. Reports error rates on the console
4. Plots ROC, EPC, DET curves and score distributions to a multi-page PDF
file
(unless --no-plot is passed)
file
You need to provide 2 score files for each biometric system in this order:
...
...
@@ -206,10 +206,12 @@ def evaluate(ctx, scores, test, **kwargs):
$ bob measure evaluate -t -l metrics.txt -o my_plots.pdf dev-scores test-scores
'''
# first time erase if existing file
ctx
.
meta
[
'open_mode'
]
=
'w'
click
.
echo
(
"Computing metrics with EER..."
)
ctx
.
meta
[
'criter'
]
=
'eer'
# no criterion passed to evaluate
ctx
.
invoke
(
metrics
,
scores
=
scores
,
test
=
test
)
# second time, appends the content
ctx
.
meta
[
'open_mode'
]
=
'a'
click
.
echo
(
"Computing metrics with HTER..."
)
ctx
.
meta
[
'criter'
]
=
'hter'
# no criterion passed in evaluate
ctx
.
invoke
(
metrics
,
scores
=
scores
,
test
=
test
)
...
...
bob/measure/script/common_options.py
View file @
34ae249a
...
...
@@ -62,6 +62,19 @@ def test_option(**kwargs):
callback
=
callback
,
is_eager
=
True
,
**
kwargs
)(
func
)
return
custom_test_option
def
cmc_option
(
dflt
=
False
,
**
kwargs
):
'''Get option flag to say if cmc scores'''
def
custom_cmc_option
(
func
):
def
callback
(
ctx
,
param
,
value
):
ctx
.
meta
[
'cmc'
]
=
value
return
value
return
click
.
option
(
'-C'
,
'--cmc/--no-cmc'
,
default
=
dflt
,
help
=
'If set, CMC score files are provided'
,
show_default
=
True
,
callback
=
callback
,
is_eager
=
True
,
**
kwargs
)(
func
)
return
custom_cmc_option
def
sep_dev_test_option
(
**
kwargs
):
'''Get option flag to say if dev and test plots should be in different
plots'''
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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