Commit 34ae249a authored by Theophile GENTILHOMME's avatar 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
......@@ -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)
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)
......@@ -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',
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment