Commit 463f1d17 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

[script][figure] Change vuln labels for det

parent 22047462
Pipeline #20713 failed with stage
in 29 minutes and 28 seconds
...@@ -111,9 +111,9 @@ class MetricsVuln(measure_figure.Metrics): ...@@ -111,9 +111,9 @@ class MetricsVuln(measure_figure.Metrics):
headers = ['' or title, '%s (threshold=%.2g)' % headers = ['' or title, '%s (threshold=%.2g)' %
(criter.upper(), threshold)] (criter.upper(), threshold)]
rows = [] rows = []
rows.append(['APCER (%)', '{:>5.1f}%'.format(100 * far)]) rows.append(['FMR (%)', '{:>5.1f}%'.format(100 * far)])
rows.append(['BPCER (%)', '{:>5.1f}%'.format(frr * 100)]) rows.append(['FNMR (%)', '{:>5.1f}%'.format(frr * 100)])
rows.append(['ACER (%)', '{:>5.1f}%'.format(50 * (far + frr))]) rows.append(['HTER (%)', '{:>5.1f}%'.format(50 * (far + frr))])
rows.append(['IAPMR (%)', '{:>5.1f}%'.format(100 * iapmr)]) rows.append(['IAPMR (%)', '{:>5.1f}%'.format(100 * iapmr)])
click.echo( click.echo(
tabulate(rows, headers, self._tablefmt), tabulate(rows, headers, self._tablefmt),
...@@ -643,7 +643,7 @@ class BaseDetRoc(PadPlot): ...@@ -643,7 +643,7 @@ class BaseDetRoc(PadPlot):
xytext=(xyannotate_spoof[0], xyannotate_spoof[1])) xytext=(xyannotate_spoof[0], xyannotate_spoof[1]))
else: else:
mpl.annotate( mpl.annotate(
'APCER=%.2f%%' % (farfrr_licit[0] * 100), 'FMR=%.2f%%' % (farfrr_licit[0] * 100),
xy=(farfrr_licit_det[0], farfrr_licit_det[1]), xy=(farfrr_licit_det[0], farfrr_licit_det[1]),
xycoords='data', xycoords='data',
xytext=(xyannotate_licit[0], xyannotate_licit[1]), xytext=(xyannotate_licit[0], xyannotate_licit[1]),
...@@ -692,14 +692,14 @@ class BaseDetRoc(PadPlot): ...@@ -692,14 +692,14 @@ class BaseDetRoc(PadPlot):
pass pass
class Det(BaseDetRoc): class Det(BaseDetRoc):
'''Base for DET and ROC''' '''DET for vuln'''
def __init__(self, ctx, scores, evaluation, func_load, criteria, real_data, def __init__(self, ctx, scores, evaluation, func_load, criteria, real_data,
no_spoof): no_spoof):
super(Det, self).__init__(ctx, scores, evaluation, func_load, super(Det, self).__init__(ctx, scores, evaluation, func_load,
criteria, real_data, no_spoof) criteria, real_data, no_spoof)
self._x_label = self._x_label or "APCER" self._x_label = self._x_label or "FMR"
self._y_label = self._y_label or "BPCER" self._y_label = self._y_label or "FNMR"
add = '' add = ''
if not self._no_spoof: if not self._no_spoof:
add = " and overlaid SPOOF scenario" add = " and overlaid SPOOF scenario"
...@@ -733,8 +733,8 @@ class RocVuln(BaseDetRoc): ...@@ -733,8 +733,8 @@ class RocVuln(BaseDetRoc):
no_spoof): no_spoof):
super(RocVuln, self).__init__(ctx, scores, evaluation, func_load, super(RocVuln, self).__init__(ctx, scores, evaluation, func_load,
criteria, real_data, no_spoof) criteria, real_data, no_spoof)
self._x_label = self._x_label or "APCER" self._x_label = self._x_label or "FMR"
self._y_label = self._y_label or "1 - BPCER" self._y_label = self._y_label or "1 - FNMR"
self._semilogx = ctx.meta.get('semilogx', True) self._semilogx = ctx.meta.get('semilogx', True)
add = '' add = ''
if not self._no_spoof: if not self._no_spoof:
...@@ -793,7 +793,7 @@ class FmrIapmr(PadPlot): ...@@ -793,7 +793,7 @@ class FmrIapmr(PadPlot):
title = self._title if self._title is not None else "FMR vs IAPMR" title = self._title if self._title is not None else "FMR vs IAPMR"
if title.replace(' ', ''): if title.replace(' ', ''):
mpl.title(title) mpl.title(title)
mpl.xlabel(self._x_label or "False Match Rate (%)") mpl.xlabel(self._x_label or "FMR (%)")
mpl.ylabel(self._y_label or "IAPMR (%)") mpl.ylabel(self._y_label or "IAPMR (%)")
mpl.grid(True, color=self._grid_color) mpl.grid(True, color=self._grid_color)
if self._disp_legend: if self._disp_legend:
......
Markdown is supported
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