Skip to content
Snippets Groups Projects
baselines.rst 12.85 KiB

Executing Baseline Algorithms

This section explains how to execute face presentation attack detection (PAD) algorithms implemented in bob.pad.face.

Running Baseline Experiments

To run the baseline PAD experiments, the bob pad vanilla-pad command is used. To see the description of the command, you can type in the console:

$ bob pad vanilla-pad --help

This command is explained in more detail in :ref:`bob.pad.base <bob.pad.base.vanilla_pad_features>`.

Usually, it is a good idea to have at least verbose level 2 (i.e., calling bob pad vanilla-pad --verbose --verbose, or the short version bob pad vanilla-pad -vv).

Note

Running in Parallel

To run the experiments in parallel, you can use an existing or (define a new) SGE grid or local host multiprocessing configuration. To run the experiment in the Idiap SGE grid, you can simply add the --dask-client sge command line option. To run experiments in parallel on the local machine, add the --dask-client local-parallel option.

See :ref:`this <bob.bio.base.vanilla_biometrics_advanced_features>` for more details on dask configurations.

Database setups and baselines are encoded using configuration-files, all stored inside the package structure, in the directory bob/pad/face/config. Documentation for each resource is available on the section :ref:`bob.pad.face.resources`.

Warning

You cannot run experiments just by executing the command line instructions described in this guide. You need first to procure yourself the raw data files that correspond to each database used here to correctly run experiments with those data. Biometric data is considered private and, under EU regulations, cannot be distributed without a consent or license. You may consult our :ref:`bob.pad.face.resources.databases` resources section for checking currently supported databases and accessing download links for the raw data files.

Once the raw data files have been downloaded, unpack the databases carefully and take a note of the root directory where they have been unpacked.

Use the following commands to specify the correct parameters of your dataset (see :ref:`bob.pad.face.resources.databases`):

$ bob config set bob.db.replaymobile.directory /path/to/replayattack-database/
$ bob config set bob.db.replaymobile.extension .mov

Notice it is rather important to correctly configure the database as described above, otherwise bob.pad.base will not be able to correctly load your data.

Once this step is done, you can proceed with the instructions below.


Baselines on REPLAY-ATTACK database

This section summarizes the results of baseline face PAD experiments on the REPLAY-ATTACK (`replayattack`_) database. The description of the database-related settings, which are used to run face PAD baselines on the Replay-Attack is given here :ref:`bob.pad.face.resources.databases.replay`. To understand the settings in more detail you can check the corresponding configuration file: bob/pad/face/config/replay_attack.py.

LBP features of facial region + SVM classifier

Detailed description of this PAD pipe-line is given at :ref:`bob.pad.face.resources.face_pad.lbp_svm_replayattack`.

To run this baseline on the `replayattack`_ database, using the grandtest protocol, execute the following:

$ bob pad vanilla-pad replay-attack lbp svm-frames -o <PATH_TO_STORE_THE_RESULTS>