installation.rst 3.47 KB
Newer Older
1 2 3 4 5 6 7
.. vim: set fileencoding=utf-8 :
.. author: Manuel Günther <manuel.guenther@idiap.ch>
.. author: Pavel Korshunov <pavel.korshunov@idiap.ch>
.. date: Wed Apr 27 14:58:21 CEST 2016

.. _bob.pad.base.installation:

8 9 10 11 12 13

.. todo::

   update and link to general bob install instructions.


14 15 16
===========================
 Installation Instructions
===========================
17

18
As noted before, this package is part of the ``bob.pad`` packages, which in
Yannick DAYER's avatar
Yannick DAYER committed
19
turn are part of the signal processing and machine learning toolbox Bob_. To
20
install Bob_, please read the `Installation Instructions <bobinstall_>`_.
21

Yannick DAYER's avatar
Yannick DAYER committed
22
Then, to install the ``bob.pad`` packages and in turn, maybe the database
23
packages that you want to use, use conda_ to install them:
24

25
.. code-block:: sh
26

27 28 29
    $ conda search bob.pad # searching
    $ conda search bob.db  # searching
    $ conda install bob.pad.base bob.pad.<padname> bob.db.<dbname>
30

31 32
where you would replace ``<padname>`` and ``<dbname>`` with the name of
packages that you want to use.
33

34 35
An example installation
-----------------------
36

37 38 39 40 41 42 43
For example, to run a speech presentation attack detection experiments,
you need preprocessor, extractor, classifier, and
a database. Preprocessors and extractors can be reused from ``bob.bio`` packages, while classifier is normally
provided in ``bob.pad``. Hence for speech PAD, you can take
the :py:class:`bob.bio.spear.preprocessor.Energy_2Gauss` and the
:py:class:`bob.bio.spear.extractor.Cepstral` feature extractor defined in
:ref:`bob.bio.spear <bob.bio.spear>`, and the
44 45
:py:class:`bob.pad.base.algorithm.OneClassGMM` algorithm defined in
:ref:`bob.pad.base <bob.pad.base>`, using voicePA database (contains speech presentation attacks)
46 47
interface defined in :ref:`bob.db.voicepa <bob.db.voicepa>`. Running the
command line below will install all the required packages:
48

49
.. code-block:: sh
50

51
    $ conda activate <bob_conda_environment>
52 53 54 55 56 57
    $ conda install bob.bio.base \
                    bob.bio.spear \
                    bob.pad.base \
                    bob.pad.voice \
                    bob.db.voicepa \
                    gridtk
58 59

Databases
60
---------
61 62 63

With ``bob.pad`` you will run biometric recognition experiments using databases that contain presentation attacks.
Though the PAD protocols are implemented in ``bob.pad``, the original data are **not included**.
Yannick DAYER's avatar
Yannick DAYER committed
64
To download the original data of the databases, please refer to the corresponding Web-pages.
65 66
For a list of supported databases including their download URLs,
please refer to the `spoofing_databases <https://gitlab.idiap.ch/bob/bob/wikis/Packages>`_.
67 68 69

After downloading the original data for the databases, you will need to tell ``bob.pad``, where these databases can be found.
For this purpose, we have decided to implement a special file, where you can set your directories.
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
70
Similar to ``bob.bio.base``, by default, this file is located in ``~/.bob_bio_databases.txt``, and it contains several lines, each line looking somewhat like:
71 72 73 74 75 76 77 78 79 80 81 82 83

.. code-block:: text

   [DEFAULT_DATABASE_DIRECTORY] = /path/to/your/directory

.. note::
   If this file does not exist, feel free to create and populate it yourself.


Please use ``./bin/databases.py`` for a list of known databases, where you can see the raw ``[YOUR_DATABASE_PATH]`` entries for all databases that you haven't updated, and the corrected paths for those you have.


.. note::
84
   If you have installed only ``bob.pad.base``, there is no database listed -- as all databases are included in other extension packages, such as ``bob.pad.voice``.
85 86 87


.. include:: links.rst