Commit abaeb08d authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'dask-pipelines' into 'master'

Dask pipelines

See merge request !46
parents c1d98486 930992c1
Pipeline #44915 failed with stages
in 2 minutes and 56 seconds
......@@ -19,3 +19,4 @@ parts
sphinx
src/
submitted.sql3
*.DS_Store
include README.rst buildout.cfg develop.cfg COPYING version.txt requirements.txt test-requirements.txt
recursive-include doc *.py *.rst
recursive-include bob/bio/vein/tests *.png *.mat *.txt *.hdf5
recursive-include bob/bio/vein/tests *.png *.txt *.hdf5
......@@ -58,8 +58,8 @@ class MiuraMatch (Algorithm):
ch = ch,
cw = cw,
multiple_model_scoring = None,
multiple_probe_scoring = None
#multiple_model_scoring = None,
#multiple_probe_scoring = None
)
self.ch = ch
......
......@@ -11,17 +11,38 @@ the link.
"""
from ..database.fv3d import Database
from bob.extension import rc
from bob.bio.vein.database.fv3d import Database
from bob.bio.base.pipelines.vanilla_biometrics import DatabaseConnector
_fv3d_directory = "[YOUR_FV3D_DIRECTORY]"
"""Value of ``~/.bob_bio_databases.txt`` for this database"""
import logging
logger = logging.getLogger("bob.bio.vein")
database = Database(
# Retrieve directory from config
_fv3d_directory = rc["bob.db.fv3d.directory"]
"""Value in ``~/.bobrc`` for this dataset directory"""
# Set default protocol if not given via a config file
if 'protocol' not in locals():
logger.info("protocol not specified, using default: 'central'")
protocol = 'central'
legacy_database = Database(
original_directory = _fv3d_directory,
original_extension = '.png',
)
protocol = protocol,
)
"""The :py:class:`bob.bio.base.database.BioDatabase` derivative with fv3d
database settings
"""
database = DatabaseConnector(
legacy_database,
annotation_type=None,
fixed_positions=None
)
"""
The database interface wrapped for vanilla-biometrics
.. warning::
......@@ -29,16 +50,10 @@ database settings
manner, respecting usage protocols. It does **not** contain the raw
datafiles. You should procure those yourself.
Notice that ``original_directory`` is set to ``[YOUR_FV3D_DIRECTORY]``. You
must make sure to create ``${HOME}/.bob_bio_databases.txt`` setting this value
to the place where you actually installed the `3D Fingervein`_ Database, as
Notice that ``original_directory`` is set to ``rc[bob.db.fv3d.directory]``. You
must make sure to set this value with ``bob config set bob.db.fv3d.directory``
to the place where you actually installed the `3D Fingervein`_ dataset, as
explained in the section :ref:`bob.bio.vein.baselines`.
"""
protocol = 'central'
"""The default protocol to use for tests
You may modify this at runtime by specifying the option ``--protocol`` on the
command-line of ``verify.py`` or using the keyword ``protocol`` on a
configuration file that is loaded **after** this configuration resource.
"""
logger.debug(f"Loaded database fv3d config file, using protocol '{protocol}'.")
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 10:54:47 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# 3D Fingervein dataset, defined at bob.db.fv3d.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> central fv3d
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> central fv3d
# The protocol resource must be specified before the database resource.
# Available protocols are:
# 'central', 'left', 'right', 'stitched'
# This will be the default protocol if none is specified.
protocol = 'central'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 12:14:05 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# 3D Fingervein dataset, defined at bob.db.fv3d.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> left fv3d
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> left fv3d
# The protocol resource must be specified before the database resource.
# Available protocols are:
# 'central', 'left', 'right', 'stitched'
protocol = 'left'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 12:14:56 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# 3D Fingervein dataset, defined at bob.db.fv3d.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> right fv3d
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> right fv3d
# The protocol resource must be specified before the database resource.
# Available protocols are:
# 'central', 'left', 'right', 'stitched'
protocol = 'right'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 12:15:16 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# 3D Fingervein dataset, defined at bob.db.fv3d.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> stitched fv3d
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> stitched fv3d
# The protocol resource must be specified before the database resource.
# Available protocols are:
# 'central', 'left', 'right', 'stitched'
protocol = 'stitched'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 11:27:19 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# Put Vein dataset, defined at bob.db.putvein.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1',
# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4',
# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1',
# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4'
protocol = 'palm-LR_1'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 11:27:19 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# Put Vein dataset, defined at bob.db.putvein.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1',
# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4',
# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1',
# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4'
protocol = 'palm-LR_4'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 11:27:08 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# Put Vein dataset, defined at bob.db.putvein.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1',
# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4',
# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1',
# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4'
# This will be the default protocol if none is specified.
protocol = 'wrist-LR_1'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 11:27:00 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# Put Vein dataset, defined at bob.db.putvein.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1',
# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4',
# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1',
# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4'
protocol = 'wrist-LR_4'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 10:32:56 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# utfvp dataset, defined at bob.db.utfvp.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> full utfvp
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> full utfvp
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# '1vsall', 'full', 'fullLeftIndex', 'fullLeftMiddle', 'fullLeftRing',
# 'fullRightIndex', 'fullRightMiddle', 'fullRightRing', 'nom', 'nomLeftIndex',
# 'nomLeftMiddle', 'nomLeftRing', 'nomRightIndex', 'nomRightMiddle',
# 'nomRightRing'
protocol = 'full'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 10:30:22 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# utfvp dataset, defined at bob.db.utfvp.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> nom utfvp
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> nom utfvp
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# '1vsall', 'full', 'fullLeftIndex', 'fullLeftMiddle', 'fullLeftRing',
# 'fullRightIndex', 'fullRightMiddle', 'fullRightRing', 'nom', 'nomLeftIndex',
# 'nomLeftMiddle', 'nomLeftRing', 'nomRightIndex', 'nomRightMiddle',
# 'nomRightRing'
# This will be the default protocol if none is specified.
protocol = 'nom'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Wed 21 Oct 2020 10:34:41 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# utfvp dataset, defined at bob.db.utfvp.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> 1vsall utfvp
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> 1vsall utfvp
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# '1vsall', 'full', 'fullLeftIndex', 'fullLeftMiddle', 'fullLeftRing',
# 'fullRightIndex', 'fullRightMiddle', 'fullRightRing', 'nom', 'nomLeftIndex',
# 'nomLeftMiddle', 'nomLeftRing', 'nomRightIndex', 'nomRightMiddle',
# 'nomRightRing'
protocol = 'full'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 14:50:58 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# VeraFinger dataset, defined at bob.db.verafinger.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> Cropped-Full verafinger
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> Cropped-Full verafinger
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty',
# 'Full', 'Nom'
protocol = 'Cropped-Full'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 14:51:02 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# VeraFinger dataset, defined at bob.db.verafinger.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> Cropped-Nom verafinger
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> Cropped-Nom verafinger
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty',
# 'Full', 'Nom'
protocol = 'Cropped-Nom'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 14:51:11 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# VeraFinger dataset, defined at bob.db.verafinger.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> Full verafinger
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> Full verafinger
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty',
# 'Full', 'Nom'
protocol = 'Full'
# author: Yannick Dayer <yannick.dayer@idiap.ch>
# Fri 16 Oct 2020 14:51:16 UTC+02
# This is a config file for bob.bio.vein
# It defines the database protocol to use with the Database Interface for the
# VeraFinger dataset, defined at bob.db.verafinger.
# It is defined as a resource in the setup file of this package.
# Usage:
# $ bob bio pipelines vanilla-biometrics <pipeline> Nom verafinger
# or:
# $ bob bio pipelines vanilla-biometrics -p <pipeline> Nom verafinger
# The protocol resource must be specified before the database resource.
# Available protocols are (some require the creation of your own config file):
# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty',
# 'Full', 'Nom'
# This will be the default protocol if none is specified.
protocol = 'Nom'
......@@ -16,17 +16,38 @@ You can download the raw data of the `PUT Vein`_ database by following
the link.
"""
from ..database.putvein import PutveinBioDatabase
from bob.extension import rc
from bob.bio.vein.database.putvein import PutveinBioDatabase
from bob.bio.base.pipelines.vanilla_biometrics import DatabaseConnector
_putvein_directory = "[YOUR_PUTVEIN_IMAGE_DIRECTORY]"
"""Value of ``~/.bob_bio_databases.txt`` for this database"""
import logging
logger = logging.getLogger("bob.bio.vein")
database = PutveinBioDatabase(
_putvein_directory = rc["bob.db.putvein.directory"]
"""Value in ``~/.bobrc`` for this dataset directory"""
# Set default protocol if not given via a config file
if 'protocol' not in locals():
logger.info("protocol not specified, using default: 'wrist-LR_1'")
protocol = 'wrist-LR_1'
legacy_database = PutveinBioDatabase(
original_directory = _putvein_directory,
original_extension = '.bmp',
protocol = protocol,
)
"""The :py:class:`bob.bio.base.database.BioDatabase` derivative with PUT Vein
database settings
"""
database = DatabaseConnector(
legacy_database,
annotation_type=None,
fixed_positions=None
)
"""
The database interface wrapped for vanilla-biometrics
.. warning::
......@@ -34,23 +55,11 @@ database settings
manner, respecting usage protocols. It does **not** contain the raw
datafiles. You should procure those yourself.
Notice that ``original_directory`` is set to ``[YOUR_PUTVEIN_IMAGE_DIRECTORY]``.
You must make sure to create ``${HOME}/.bob_bio_databases.txt`` setting this
value to the place where you actually installed the PUT Vein Database, as
explained in the section :ref:`bob.bio.vein.baselines`.
Notice that ``original_directory`` is set to ``rc[bob.db.putvein.directory]``.
You must make sure to set this value with
``bob config set bob.db.putvein.directory`` to the place where you actually
installed the `put vein`_ dataset, as explained in the section
:ref:`bob.bio.vein.baselines`.
"""
protocol = 'wrist-LR_1'
"""The default protocol to use for tests
You may modify this at runtime by specifying the option ``--protocol`` on the
command-line of ``verify.py`` or using the keyword ``protocol`` on a
configuration file that is loaded **after** this configuration resource.
"""
logger.debug(f"loaded database putvein config file, using protocol '{protocol}'.")
......@@ -17,16 +17,36 @@ You can download the raw data of the `UTFVP`_ database by following the link.
.. include:: links.rst
"""
from ..database.utfvp import Database
from bob.extension import rc
from bob.bio.vein.database.utfvp import Database
from bob.bio.base.pipelines.vanilla_biometrics import DatabaseConnector
_utfvp_directory = "[YOUR_UTFVP_DIRECTORY]"
"""Value of ``~/.bob_bio_databases.txt`` for this database"""
import logging
logger = logging.getLogger("bob.bio.vein")
database = Database(
_utfvp_directory = rc["bob.db.utfvp.directory"]
"""Value in ``~/.bobrc`` for this dataset directory"""
# Set default protocol if not given via a config file
if 'protocol' not in locals():
logger.info("protocol not specified, using default: 'nom'")
protocol = 'nom'
legacy_database = Database(
original_directory = _utfvp_directory,
original_extension = '.png',
protocol = protocol,
)
"""The :py:class:`bob.bio.base.database.BioDatabase` derivative with UTFVP settings
"""
database = DatabaseConnector(
legacy_database,
annotation_type=None,
fixed_positions=None
)
"""
The database interface wrapped for vanilla-biometrics
.. warning::
......@@ -34,16 +54,11 @@ database = Database(
manner, respecting usage protocols. It does **not** contain the raw
datafiles. You should procure those yourself.
Notice that ``original_directory`` is set to ``[YOUR_UTFVP_DIRECTORY]``.
You must make sure to create ``${HOME}/.bob_bio_databases.txt`` setting this
value to the place where you actually installed the Verafinger Database, as
explained in the section :ref:`bob.bio.vein.baselines`.
Notice that ``original_directory`` is set to ``rc[bob.db.utfvp.directory]``.
You must make sure to set this value with
``bob config set bob.db.utfvp.directory`` to the place where you actually
installed the `utfvp`_ dataset, as explained in the section
:ref:`bob.bio.vein.baselines`.
"""
protocol = 'nom'
"""The default protocol to use for tests
You may modify this at runtime by specifying the option ``--protocol`` on the
command-line of ``verify.py`` or using the keyword ``protocol`` on a
configuration file that is loaded **after** this configuration resource.
"""
logger.debug(f"Loaded database utfvp config file, using protocol '{protocol}'.")
......@@ -12,18 +12,33 @@ You can download the raw data of the `VERA Fingervein`_ database by following
the link.
"""
from bob.extension import rc
from bob.bio.vein.database.verafinger import Database
from bob.bio.base.pipelines.vanilla_biometrics import DatabaseConnector
from ..database.verafinger import Database
import logging
logger = logging.getLogger("bob.bio.vein")
_verafinger_directory = "[YOUR_VERAFINGER_DIRECTORY]"
"""Value of ``~/.bob_bio_databases.txt`` for this database"""
_verafinger_directory = rc["bob.db.verafinger.directory"]
"""Value in ``~/.bobrc`` for this dataset directory"""
database = Database(
original_directory = _verafinger_directory,
original_extension = '.png',
)
# Set default protocol if not given via a config file
if 'protocol' not in locals():
logger.info("protocol not specified, using default: 'Nom'")
protocol = 'Nom'
"""Updated with the wrapper for the pipelines package"""
database = DatabaseConnector(Database(
original_directory=_verafinger_directory,
original_extension='.png',
protocol=protocol),
annotation_type=None,
fixed_positions=None
)
"""The :py:class:`bob.bio.base.database.BioDatabase` derivative with Verafinger
database settings
database settings, wrapped with the vanilla-biometrics database connector.
.. warning::
......@@ -31,22 +46,11 @@ database settings
manner, respecting usage protocols. It does **not** contain the raw
datafiles. You should procure those yourself.
Notice that ``original_directory`` is set to ``[YOUR_VERAFINGER_DIRECTORY]``.
You must make sure to create ``${HOME}/.bob_bio_databases.txt`` setting this
value to the place where you actually installed the Verafinger Database, as
explained in the section :ref:`bob.bio.vein.baselines`.
Notice that ``original_directory`` is set to
``rc[bob.db.verafinger.directory]``. You must make sure to set this value with
``bob config set bob.db.verafinger.directory`` to the place where you actually
installed the `vera fingervein`_ dataset, as explained in the section
:ref:`bob.bio.vein.baselines`.
"""
protocol = 'Nom'
"""The default protocol to use for tests
You may modify this at runtime by specifying the option ``--protocol`` on the
command-line of ``verify.py`` or using the keyword ``protocol`` on a
configuration file that is loaded **after** this configuration resource.
We accept any biometric recognition protocol implemented by bob.db.verafinger.
Variants of the biometric recognition protocol ending in ``-va`` can be used to
test for vulnerability analysis. For example, use the protocol ``Nom-va`` to
test the vulnerability of a biometric recognition pipeline using the ``Nom``
protocol for enrollment and probe samples from presentation attacks.
"""
logger.debug(f"Loaded database verafinger config file, using protocol '{protocol}'.")