Commit 5eec8e31 authored by Yannick DAYER's avatar Yannick DAYER
Browse files

[doc] Advances on the intro of pad and vanilla-pad

parent f0cfcd3f
......@@ -9,10 +9,6 @@
Running Presentation Attack Detection Experiments
.. todo::
check and revamp
The ``bob.pad`` packages provide open source tools to run comparable and reproducible presentation attack detection (PAD) experiments.
To design such experiment, one has to choose:
......@@ -26,7 +22,7 @@ For any of these parts, several different types are implemented in the ``bob.pad
combination of the five parts can be executed.
For each type, several meta-parameters can be tested.
This results in a nearly infinite amount of possible experiments that can be run using the current setup.
But it is also possible to use your own database, preprocessor, feature extractor, or PAD algorithm and test this against the baseline algorithms implemented in the our packages.
But it is also possible to use your own database, preprocessor, feature extractor, or PAD algorithm and test this against the baseline algorithms implemented in our packages.
.. note::
The ``bob.pad.*`` packages are derived from the `* <>`__, packages that are designed for biometric recognition experiments.
......@@ -5,9 +5,9 @@
.. _bob.pad.base.pad_intro:
Presentation attack detection
Introduction to presentation attack detection
.. todo::
......@@ -18,3 +18,27 @@
- How
Look at
Presentation Attack Detection, or PAD, is a branch of biometrics aiming at detecting an attempt to dupe a biometric recognition system by modifying the sample presented to the sensor.
The goal of PAD is to develop countermeasures to presentation attacks that are able to detect wether a biometric sample is a `bonafide` sample, or a presentation attack.
The paper
Presentation attack
Biometric recognition systems contain different points of attack. Attacks on certain points are either called direct or indirect attacks.
An indirect attack would consist of modifying data after the capture, in any of the steps between the capture and the decision stages. To prevent such attacks is relevant of classical cyber security, hardware and data protection.
Presentation attacks (PA), on the other hand, are the only direct attacks that can be performed on a biometric system, and countering those attacks is relevant to biometrics.
For a face recognition system, for example, one of the possible presentation attack would be to wear a mask resembling another individual so that the system identifies the attacker as that other person.
Presentation attack detection
A PAD system works much like a biometric recognition system, but with the ability to identify and reject a sample if it is detected as an attack.
This means that multiple cases are possible and should be detected by a biometric system with PAD:
- A Genuine subject presents itself, the captured sample is called **bona fide** sample,
- An Attacker presents itself without trying to pass for another subject, the sample is categorized as **zero effort impostor** sample,
- An Attacker uses a `presentation attack instrument` (`PAI`) to pass as a genuine subject. This is a **PA** sample.
......@@ -18,3 +18,14 @@
Look at vanilla-biometrics features
Import from filedb_guide and high_level_db_interface_guide
Most of the available features are equivalent to the ones defined in :ref:``.
However, there are some variations, and those are presented below.
Database interface
The database interface definition follows closely the one in :ref:``. However, the naming of the methods to retrieve data is different:
- :py:meth:`database.fit_samples` returns the samples used to train the classifier;
- :py:meth:`database.predict_samples` returns the samples that will be used for evaluating the system.
......@@ -4,9 +4,9 @@
.. _bob.pad.base.vanilla_pad_intro:
Vanilla PAD
Vanilla PAD: Introduction to presentation attack detection in practice
.. todo::
......@@ -17,3 +17,78 @@
Look at vanilla-biometrics
Import from experiments.rst
To easily run experiments in PAD, we offer a generic command called ``bob pad pipelines``.
Such CLI command is an entry point to several pipelines, and this documentation will focus on the one called **vanilla-pad**.
Running a biometric experiment with vanilla-pad
A PAD experiment consists of taking a set of biometric `bonafide` and `impostor` samples, feeding them to a pipeline, to finally gather the corresponding set of scores for analysis.
Similarly to ``vanilla-biometrics``, the ``vanilla-pad`` command needs a pipeline argument to specify which experiment to run and a database argument to indicate what data will be used. These can be given with the ``-p`` (``--pipeline``) and ``-d`` (``--database``) options, respectively::
$ bob pad vanilla-pad [OPTIONS] -p <pipeline> -a <database>
The different available options can be listed by passing the ``--help`` option to the command::
$ bob pad vanilla-pad --help
The `pipeline` argument given to vanilla-pad can be either a pipeline `resource name`, or a filename pointing to a configuration file defining the ``pipeline`` variable.
A list of existing `resource names` can be listed with::
$ -t pipeline
Similarly to `pipeline`, the `database` argument can be in the form of a predefined `resource name`, or a filename pointing to a file defining the ``database`` variable.
The list of database `resource names` can be retrieved with::
$ -t database
Building your own Vanilla PAD pipeline
The Vanilla PAD pipeline is the backbone of any experiment in this library. It is composed of:
- Transformers: One or multiple instances in series of :py:class:`sklearn.base.BaseEstimator` and :py:class:`sklearn.base.TransformerMixin`. A transformer takes a sample as input applies a modification on it and outputs the resulting sample.
A transformer can be trained before using it.
- A classifier: Instance of
.. todo::
instance of the classifier
A Transformer is an class that implements the fit and transform methods, which allow the application of an operation on a sample of data.
For more details, see :ref:``.
A Classifier is the final process of a Vanilla PAD pipeline. Its goal is to decide if a transformed sample given as input is originating from a genuine sample or if an impostor is trying to be recognized as someone else.
Running an experiment
Two part of an experiment have to be executed:
- Fit:
- Predict: assessing a series of test samples for authenticity.
\ No newline at end of file
Supports Markdown
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