Commit f3657022 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Merge branch 'moving' into 'theo'

Moving biometrics-related functionality to bob.bio.base

See merge request !49
parents c89e5cb3 7ef58230
Pipeline #17712 passed with stage
in 30 minutes and 52 seconds
......@@ -7,9 +7,7 @@ from . import version
from .version import module as __version__
from . import plot
from . import load
from . import calibration
from . import openbr
import numpy
def mse (estimation, target):
......@@ -134,9 +132,7 @@ def recognition_rate(cmc_scores, threshold = None, rank = 1):
The input has a specific format, which is a list of two-element tuples. Each
of the tuples contains the negative :math:`\\{S_p^-\\}` and the positive
:math:`\\{S_p^+\\}` scores for one probe item :math:`p`, or ``None`` in case
of open set recognition. To read the lists from score files in 4 or 5 column
format, please use the :py:func:`bob.measure.load.cmc_four_column` or
:py:func:`bob.measure.load.cmc_five_column` function.
of open set recognition.
If ``threshold`` is set to ``None``, the rank 1 recognition rate is defined
as the number of test items, for which the highest positive
......@@ -172,9 +168,9 @@ def recognition_rate(cmc_scores, threshold = None, rank = 1):
Parameters:
cmc_scores (:py:class:`list`): A list in the format ``[(negatives,
positives), ...]`` containing the CMC scores loaded with one of the
functions (:py:func:`bob.measure.load.cmc_four_column` or
:py:func:`bob.measure.load.cmc_five_column`).
positives), ...]`` containing the CMC scores (i.e. :py:class:`list`:
A list of tuples, where each tuple contains the
``negative`` and ``positive`` scores for one probe of the database).
Each pair contains the ``negative`` and the ``positive`` scores for **one
probe item**. Each pair can contain up to one empty array (or ``None``),
......@@ -258,9 +254,7 @@ def cmc(cmc_scores):
The input has a specific format, which is a list of two-element tuples. Each
of the tuples contains the negative and the positive scores for one probe
item. To read the lists from score files in 4 or 5 column format, please use
the :py:func:`bob.measure.load.cmc_four_column` or
:py:func:`bob.measure.load.cmc_five_column` function.
item.
For each probe item the probability that the rank :math:`r` of the positive
score is calculated. The rank is computed as the number of negative scores
......@@ -281,10 +275,7 @@ def cmc(cmc_scores):
cmc_scores : :py:class:`list`
A list in the format ``[(negatives, positives), ...]`` containing the CMC
scores loaded with one of the functions
:py:func:`bob.measure.load.cmc_four_column`,
:py:func:`bob.measure.load.cmc_five_column`, or
:py:func:`bob.measure.load.cmc`.
scores.
Each pair contains the ``negative`` and the ``positive`` scores for **one
probe item**. Each pair can contain up to one empty array (or ``None``),
......@@ -345,9 +336,7 @@ def detection_identification_rate(cmc_scores, threshold, rank = 1):
Parameters:
cmc_scores (:py:class:`list`): A list in the format ``[(negatives,
positives), ...]`` containing the CMC scores loaded with one of the
functions (:py:func:`bob.measure.load.cmc_four_column` or
:py:func:`bob.measure.load.cmc_five_column`).
positives), ...]`` containing the CMC.
Each pair contains the ``negative`` and the ``positive`` scores for **one
probe item**. Each pair can contain up to one empty array (or ``None``),
......@@ -406,9 +395,9 @@ def false_alarm_rate(cmc_scores, threshold):
Parameters:
cmc_scores (:py:class:`list`): A list in the format ``[(negatives,
positives), ...]`` containing the CMC scores loaded with one of the
functions (:py:func:`bob.measure.load.cmc_four_column` or
:py:func:`bob.measure.load.cmc_five_column`).
positives), ...]`` containing the CMC scores (i.e. :py:class:`list`:
A list of tuples, where each tuple contains the
``negative`` and ``positive`` scores for one probe of the database).
Each pair contains the ``negative`` and the ``positive`` scores for **one
probe item**. Each pair can contain up to one empty array (or ``None``),
......
Failure To Acquire (FTA) in the development set is: 0.000%
Failure To Acquire (FTA) in the test set is: 0.000%
[Min. criterion: EER] Threshold on Development set: -4.830500e-03
| Development | Test
-------+-----------------+------------------
FMR | 6.731% (35/520) | 2.500% (13/520)
FNMR | 6.667% (26/390) | 6.154% (24/390)
FAR | 6.731% | 2.500%
FRR | 6.667% | 6.154%
HTER | 6.699% | 4.327%
[Min. criterion: Min. HTER] Threshold on Development set: 3.430500e-03
| Development | Test
-------+-----------------+------------------
FMR | 4.231% (22/520) | 1.731% (9/520)
FNMR | 7.949% (31/390) | 7.692% (30/390)
FAR | 4.231% | 1.731%
FRR | 7.949% | 7.692%
HTER | 6.090% | 4.712%
This diff is collapsed.
This diff is collapsed.
1 1 probe_1 1
1 1 probe_2 1
1 2 probe_3 0
1 2 probe_4 0
1 2 probe_5 0
1 3 probe_6 0
1 3 probe_7 0
1 4 probe_8 0
1 5 probe_9 0
2 1 probe_1 0
2 1 probe_2 0
2 2 probe_3 1
2 2 probe_4 1
2 2 probe_5 1
2 3 probe_6 0
2 3 probe_7 0
2 4 probe_8 0
2 5 probe_9 0
3 1 probe_1 0
3 1 probe_2 0
3 2 probe_3 0
3 2 probe_4 0
3 2 probe_5 0
3 3 probe_6 1
3 3 probe_7 -0.1
3 4 probe_8 0
3 5 probe_9 0
1 1 probe_1 1
1 1 probe_2 1
1 2 probe_3 0
1 2 probe_4 0
1 2 probe_5 0
1 3 probe_6 0
1 3 probe_7 0
1 4 probe_8 0
1 5 probe_9 0
2 1 probe_1 0
2 1 probe_2 0
2 2 probe_3 1
2 2 probe_4 1
2 2 probe_5 1
2 3 probe_6 0
2 3 probe_7 0
2 4 probe_8 0
2 5 probe_9 0
3 1 probe_1 0
3 1 probe_2 0
3 2 probe_3 0
3 2 probe_4 0
3 2 probe_5 0
3 3 probe_6 1
3 3 probe_7 -0.1
3 4 probe_8 0
3 5 probe_9 10
1 1 probe_1 1
1 1 probe_2 1
1 2 probe_3 0
1 2 probe_4 0
1 2 probe_5 0
1 3 probe_6 0
1 3 probe_7 0
1 4 probe_8 0
1 5 probe_9 0
2 1 probe_1 0
2 1 probe_2 0
2 2 probe_3 1
2 2 probe_4 1
2 2 probe_5 1
2 3 probe_6 0
2 3 probe_7 0
2 4 probe_8 0
2 5 probe_9 0
3 1 probe_1 0
3 1 probe_2 0
3 2 probe_3 0
3 2 probe_4 0
3 2 probe_5 0
3 3 probe_6 1
3 3 probe_7 1
3 4 probe_8 0
3 5 probe_9 0
This diff is collapsed.
This diff is collapsed.
S2
unknown-gallery.lst
unknown-probe.lst
MB 100 20 xV4

\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -451,13 +451,9 @@ def det_axis(v, **kwargs):
def cmc(cmc_scores, logx=True, **kwargs):
"""Plots the (cumulative) match characteristics and returns the maximum rank.
This function plots a CMC curve using the given CMC scores, which can be read
from the our score files using the
:py:func:`bob.measure.load.cmc_four_column` or
:py:func:`bob.measure.load.cmc_five_column` methods. The structure of the
``cmc_scores`` parameter is relatively complex. It contains a list of pairs
of lists. For each probe object, a pair of list negative and positive scores
is required.
This function plots a CMC curve using the given CMC scores (:py:class:`list`:
A list of tuples, where each tuple contains the
``negative`` and ``positive`` scores for one probe of the database).
Parameters:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6,11 +6,6 @@ package:
version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }}
build:
entry_points:
- bob_compute_perf.py = bob.measure.script.compute_perf:main
- bob_eval_threshold.py = bob.measure.script.eval_threshold:main
- bob_apply_threshold.py = bob.measure.script.apply_threshold:main
- bob_plot_cmc.py = bob.measure.script.plot_cmc:main
number: {{ environ.get('BOB_BUILD_NUMBER', 0) }}
run_exports:
- {{ pin_subpackage(name) }}
......@@ -51,10 +46,6 @@ test:
imports:
- {{ name }}
commands:
- bob_compute_perf.py --help
- bob_eval_threshold.py --help
- bob_apply_threshold.py --help
- bob_plot_cmc.py --help
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }}
- sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
......
This diff is collapsed.
......@@ -64,21 +64,6 @@ Generic
bob.measure.rmse
bob.measure.get_config
Loading data
------------
.. autosummary::
bob.measure.load.open_file
bob.measure.load.scores
bob.measure.load.split
bob.measure.load.cmc
bob.measure.load.four_column
bob.measure.load.split_four_column
bob.measure.load.cmc_four_column
bob.measure.load.five_column
bob.measure.load.split_five_column
bob.measure.load.cmc_five_column
Calibration
-----------
......@@ -98,19 +83,10 @@ Plotting
bob.measure.plot.cmc
bob.measure.plot.detection_identification_curve
OpenBR conversions
------------------
.. autosummary::
bob.measure.openbr.write_matrix
bob.measure.openbr.write_score_file
Details
-------
.. automodule:: bob.measure
.. automodule:: bob.measure.load
.. automodule:: bob.measure.calibration
.. automodule:: bob.measure.plot
.. automodule:: bob.measure.openbr
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