Defining baselinesΒΆ

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 of, and

First, check it out the baselines ready to be triggered in your environment by doing:

$ 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 and bob.db.atnt).

To create your own baseline, you just need to define it like in the recipe below:

from import Baseline

baseline = Baseline(name="my-baseline",
                    preprocessors={"default": 'my-preprocessor'},

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 below:

self.preprocessors = dict()
self.preprocessors["default"] = 'my-preprocessor'
self.preprocessors["database_name"] = 'my-specific-preprocessor'

Follow below a full example on how to define a baseline with database specific preprocessors.

from import Baseline

preprocessors = {"default": 'my-preprocessor'}
preprocessors["database_name"] = 'my-specific-preprocessor'
baseline = Baseline(name="another-baseline",


The triplet can be a resource or a configuration file. This works in the same way as in Running Experiments.


Baselines are also registered as resources under the keyword

You can find the list of readily available baselines using the command:

$ --types baseline