@click.option('--database','-d',required=True,cls=ResourceOption,help="Registered database. Check it out `resources.py --types database` for ready to be used databases")
@click.option('--baseline','-b',required=True,cls=ResourceOption,help="Registered baseline. Check it out `resources.py --types baseline` for ready to be used baseline")
@click.option('--temp-dir','-T',required=False,cls=ResourceOption,help="The directory for temporary files")
@click.option('--result-dir','-R',required=False,cls=ResourceOption,help="The directory for resulting score files")
@click.option('--grid','-g',help="Execute the algorithm in the SGE grid.",is_flag=True)
@click.option('--zt-norm','-z',help="Enable the computation of ZT norms (if the database supports it).",is_flag=True)
Once you have a biometric system well established, tuned and working for a particular database (or a particular set of databases), you may want to provide **an easier to reproduce** way to share it.
For this purpose, we defined something called baseline.
Once you have a biometric system well established, tuned and working for a
particular database (or a particular set of databases), you may want to provide
**an easier to reproduce** way to share it. For this purpose, we defined
something called baseline.
A baseline is composed by the triplet :any:`bob.bio.base.preprocessor.Preprocessor`, :any:`bob.bio.base.extractor.Extractor` and :any:`bob.bio.base.algorithm.Algorithm`.
A baseline (:any:`bob.bio.base.baseline.Baseline`) is composed by the triplet
of :any:`bob.bio.base.preprocessor.Preprocessor`,
:any:`bob.bio.base.extractor.Extractor` and
:any:`bob.bio.base.algorithm.Algorithm`.
First, check it out the baselines ready to be triggered in your environment by doing:
First, check it out the baselines ready to be triggered in your environment by
doing:
.. code-block:: sh
$ bob bio baseline --help
For example, if you run ``bob bio baseline -vvv eigenface atnt``, it will run
the eigenface face recognition baseline on the atnt database (assuming you have
installed ``bob.bio.face`` and ``bob.db.atnt``).
To create your own baseline, you just need to define it like in the recipe below:
To create your own baseline, you just need to define it like in the recipe
below:
.. code-block:: py
from bob.bio.base.baseline import Baseline
class DummyBaseline(Baseline):
def __init__(self):
self.preprocessors = dict() # SHOULD BE DEFINED AS A DICTIONARY
self.preprocessors["default"] = 'my-preprocessor'
self.extractor = 'my-extractor'
self.algorithm = 'my-algorithm'
baseline = DummyBaseline()
baseline = Baseline(name="my-baseline",
preprocessors={"default": 'my-preprocessor'},
extractor='my-extractor'),
algorithm='my-algorithm'))
Some databases may require some especific preprocessors depending on the type of meta-informations provided.
For instance, for some face recognition databases, faces should be cropped in a particular way depending on the annotations provided.
To approach this issue, the preprocessors are defined in a dictionary, with a generic preprocessor defined as **default** and the database specific preprocessor defined by database name as in the example below:
Some databases may require some specific preprocessors depending on the type
of meta-informations provided. For instance, for some face recognition
databases, faces should be cropped in a particular way depending on the
annotations provided. To approach this issue, the preprocessors are defined in
a dictionary, with a generic preprocessor defined as **default** and the
database specific preprocessor defined by database name as in the example