Skip to content
Snippets Groups Projects
Commit 0c429d0f authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV
Browse files

[sphinx] cleanup and fixes

parent 7ed3fe48
No related branches found
No related tags found
1 merge request!4[sphinx] cleanup and fixes
Pipeline #
from .database import PadDatabase from .database import PadDatabase
from .file import PadFile from .file import PadFile
# to fix sphinx warnings of not able to find classes, when path is shortened
PadDatabase.__module__ = "database"
PadFile.__module__ = "database"
# gets sphinx autodoc done right - don't remove it # gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')] __all__ = [_ for _ in dir() if not _.startswith('_')]
...@@ -86,15 +86,12 @@ To change this behavior, you can use the ``--verbose`` option several times to i ...@@ -86,15 +86,12 @@ To change this behavior, you can use the ``--verbose`` option several times to i
2) Informative messages 2) Informative messages
3) Debug messages 3) Debug messages
When running experiments, my personal preference is verbose level 2, which can be enabled by using the short version: ``-vv``. When running experiments, it is a good idea to set verbose level 2, which can be enabled by using the short version: ``-vv``.
So, a typical PAD experiment (in this case, attacks detection in speech) could look something like: So, a typical PAD experiment (in this case, attacks detection in speech) would look like the following:
.. code-block:: sh .. code-block:: sh
$ ./bin/spoof.py --database avspoof --preprocessor vad_energy --extractor lbp_hist --algorithm logregr --sub-directory pad_speech -vv $ ./bin/spoof.py --database <database-name> --preprocessor <preprocessor> --extractor <extractor> --algorithm <algorithm> --sub-directory <folder_name> -vv
.. note::
To be able to run exactly the command line from above, it requires to have :ref:`bob.pad.voice <bob.pad.voice>` installed.
Before running an experiment, it is recommended to add the ``--dry-run`` option, so that it will only print, which steps would be executed, without actually executing them, and make sure that everything works as expected. Before running an experiment, it is recommended to add the ``--dry-run`` option, so that it will only print, which steps would be executed, without actually executing them, and make sure that everything works as expected.
...@@ -151,7 +148,7 @@ Hence, to run the same experiment as above using four parallel threads on the lo ...@@ -151,7 +148,7 @@ Hence, to run the same experiment as above using four parallel threads on the lo
.. code-block:: sh .. code-block:: sh
$ ./bin/spoof.py --database avspoof --preprocessor vad_energy --extractor lbp_hist --algorithm logregr --sub-directory pad_speech -vv --grid local-p4 --run-local-scheduler --nice 10 $ ./bin/spoof.py --database <database-name> --preprocessor <preprocessor> --extractor <extractor> --algorithm <algorithm> --sub-directory <folder_name> -vv --grid local-p4 --run-local-scheduler --nice 10
.. note:: .. note::
You might realize that the second execution of the same experiment is much faster than the first one. You might realize that the second execution of the same experiment is much faster than the first one.
...@@ -198,7 +195,7 @@ To change the protocol, you can either modify the configuration file, or simply ...@@ -198,7 +195,7 @@ To change the protocol, you can either modify the configuration file, or simply
Some databases define several kinds of evaluation setups. Some databases define several kinds of evaluation setups.
For example, often two groups of data are defined, a so-called *development set* and an *evaluation set*. For example, often two groups of data are defined, a so-called *development set* and an *evaluation set*.
The scores of the two groups will be concatenated into two files called **scores-dev** and **scores-eval**, which are located in the score directory (see above). The scores of the two groups will be concatenated into several files called **scores-dev** and **scores-eval**, which are located in the score directory (see above).
In this case, by default only the development set is employed. In this case, by default only the development set is employed.
To use both groups, just specify ``--groups dev eval`` (of course, you can also only use the ``'eval'`` set by calling ``--groups eval``). To use both groups, just specify ``--groups dev eval`` (of course, you can also only use the ``'eval'`` set by calling ``--groups eval``).
......
...@@ -34,7 +34,7 @@ The implementation of (most of) the tools is separated into other packages in th ...@@ -34,7 +34,7 @@ The implementation of (most of) the tools is separated into other packages in th
All these packages can be easily combined. All these packages can be easily combined.
Here is a growing list of derived packages: Here is a growing list of derived packages:
* :ref:`bob.pad.voice <bob.pad.voice>` Tools to run presentation attack detection experiments for speech, including Cepstral-based feature and LBP-based feature extraction, GMM-based and logistic regression based algorithms, plot processing and score fusion scripts. * `bob.pad.voice <http://pypi.python.org/pypi/bob.pad.voice>`__` Tools to run presentation attack detection experiments for speech, including several Cepstral-based features and LBP-based feature extraction, GMM-based and logistic regression based algorithms, as well as plot and score fusion scripts.
If you are interested, please continue reading: If you are interested, please continue reading:
......
...@@ -29,10 +29,6 @@ There, in the ``eggs`` section of the ``buildout.cfg`` file, simply list the ``b ...@@ -29,10 +29,6 @@ There, in the ``eggs`` section of the ``buildout.cfg`` file, simply list the ``b
gridtk gridtk
in order to download and install all packages that are required for your experiments. in order to download and install all packages that are required for your experiments.
In the example above, you might want to run a simple speech presentation attack detection
experiment using the :py:class:`bob.bio.spear.preprocessor.Mod_4Hz` and
the :py:class:`bob.pad.voice.extractor.LBPHistograms` feature extractor
defined in :ref:`bob.pad.voice <bob.pad.voice>`, using the AVspoof database interface defined in :ref:`bob.db.avspoof <bob.db.avspoof>`.
Running the simple command line: Running the simple command line:
.. code-block:: sh .. code-block:: sh
...@@ -67,7 +63,7 @@ Please use ``./bin/databases.py`` for a list of known databases, where you can s ...@@ -67,7 +63,7 @@ Please use ``./bin/databases.py`` for a list of known databases, where you can s
.. note:: .. note::
If you have installed only ``bob.pad.base``, there is no database listed -- as all databases are included in other packages, such as :ref:`bob.pad.voice <bob.pad.voice>`. If you have installed only ``bob.pad.base``, there is no database listed -- as all databases are included in other extension packages, such as :ref:`bob.pad.voice <bob.pad.voice>`.
Test your Installation Test your Installation
......
...@@ -40,10 +40,6 @@ Details ...@@ -40,10 +40,6 @@ Details
.. automodule:: bob.pad.base .. automodule:: bob.pad.base
.. attribute:: valid_keywords
Valid keywords, for which resources are defined, are ``('database', 'preprocessor', 'extractor', 'algorithm', 'grid')``
.. automodule:: bob.pad.base.tools .. automodule:: bob.pad.base.tools
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment