Commit a0f2bcf2 authored by André Anjos's avatar André Anjos 💬

[doc] Huge simplification of documentation given bob.bio.base is now a base package

parent c73331a8
.. vim: set fileencoding=utf-8 :
.. Mon 11 Jul 2016 16:39:15 CEST
============
Python API
============
This section contains a listing of all functionality available on this library
which can be used for vein experiments.
Pre-configured Databases
------------------------
.. automodule:: bob.bio.vein.configurations.databases
Preprocessors
-------------
.. automodule:: bob.bio.vein.preprocessors
Feature Extractors
------------------
.. automodule:: bob.bio.vein.extractors
Matching Algorithms
-------------------
.. automodule:: bob.bio.vein.algorithms
This diff is collapsed.
.. vim: set fileencoding=utf-8 :
.. date: Thu Jan 15 15:58:57 CEST 2015
.. _evaluate:
========================
Evaluating Score Files
========================
Now, you have successfully run fingervein recognition experiments, and the
result is one or more score files. Usually, these score files are located in
sub-directories of your ``--result-directory`` and are called ``scores-dev``
and ``scores-eval``. This section describes how to interpret these score
files. So far, so good. In this section we show, what to do with these files.
Interpreting Score Files
------------------------
The scores in the score files are arranged in rows. Usually, each score was
generated by comparing one probe image to one client model. Information about
this pair is contained in each row of the score file, which contains the four
elements:
1. The client id of the model. This is the identity of the enrolled client
model of this model/probe pair.
2. The client id of the probe. This is the identity shown in the probe image of
this model/probe pair.
3. The path of the probe image file, which is relative to the image database
directory and without file extension.
4. The score that was produced by comparing model and probe.
Hence, if the first two elements are identical, the score is a client (a.k.a.
genuine, positive, true access, target) score, if they differ it is an impostor
(a.k.a. negative, non-target) score.
Evaluation
----------
Since all required information is available in the score file, you can use any
tool (like MatLab) to evaluate the score file and compute error measures or
generate plots. The FingerveinRecLib defines one generic script that is able
to evaluate the score files, compute some error measures and generate various
types of plots. This script is called ``bin/evaluate.py`` and has the
following command line options (see ``bin/evaluate.py --help`` for the
shortcuts):
* ``--dev-files``: A list of files of the development set that will be evaluated.
* ``--eval-files`` (optional): A list of files of the evaluation set. If given,
please assure that there exist exactly one evaluation file for each
development score file and that they are given in the same order.
* ``--directory`` (optional): If given, the ``--dev-files`` and
``--eval-files`` have either absolute paths or are relative to the given
directory.
* ``--roc`` (optional): If given, the score files will be evaluated to compute
an ROC curve (one for dev and one for eval) and the result is plotted to the
given pdf file.
* ``--det`` (optional): If given, the score files will be evaluated to compute
a DET curve (one for dev and one for eval) and the result is plotted to the
given pdf file.
* ``--cmc`` (optional): If given, the score files will be evaluated to compute
a CMC curve (one for dev and one for eval) and the result is plotted to the
given pdf file. Please note that CMC plots are not valid for all databases.
* ``--legends`` (optional): If given, these legends will be placed into ROC,
DET and CMC plots. Otherwise the file names will be used. Please assure that
there exist exactly one legend for each development score file and that they
are given in the correct order.
* ``--criterion`` (optional): If given, a threshold will be computed based on
the EER or minimum HTER of each development set file, and applied to the
development and evaluation files. Both results will be written to console.
* ``--cllr`` (optional): If given, a the Cllr and the minCllr will be computed
on both the development and the evaluation set. All results will be written
to console.
As usual, the ``--verbose`` (i.e., ``-v``) option exists, and it is wise to use
``-vv``.
Deep Evaluation
---------------
For deep evaluation you can use to plot the fauna models, EER per model for the
all database in a detailed way. The script called ``bin/scoresanalysis.py``
and has the following command line options (see ``bin/scoresanalysis.py
--help`` for the shortcuts):
* ``--dev-files``: A list of files of the development set that will be
evaluated.
* ``--eval-files`` (optional): A list of files of the evaluation set. If given,
please assure that there exist exactly one evaluation file for each
development score file and that they are given in the same order.
* ``--norm`` (optional): The scores are normalized in the rank [0,1]. (default:
norm).
* ``--directory`` (optional): If given, the ``--dev-files`` and
``--eval-files`` have either absolute paths or are relative to the given
directory.
* ``--criterion`` (optional): If given, a threshold will be computed based on
the EER or minimum HTER of each development set file, and applied to the
development and evaluation files. Both results will be written to console.
* ``--pdf`` (optional): If given, Fauna graph will be plotted into the given
pdf file. (default: None)
As usual, the ``--verbose`` (i.e., ``-v``) option exists, and it is wise to use
``-vv``.
This diff is collapsed.
.. vim: set fileencoding=utf-8 :
.. date: Wed Jan 14 11:58:57 CEST 2015
.. _fingerveinreclib:
=============================================
Welcome to FingerveinRecLib's documentation!
=============================================
====================================
Biometric Vein Recognition Library
====================================
The FingerveinRecLib is an open source tool (based on FaceRecLib_) that is designed to run comparable and reproducible fingervein recognition experiments.
Most of this documentation is based on the documentation of FaceRecLib_.
To design a fingervein recognition experiment, one has to choose:
* an image databases and its according protocol,
* finger contours detection and image preprocessing algorithms,
* the type of features to extract from the fingervein image,
* the fingervein recognition algorithm to employ, and
* the way to evaluate the results
For any of these parts, several different types are implemented in the FingerveinRecLib, and basically any 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 fingervein recognition experiments that can be run using the current setup.
But it is also possible to use your own database, preprocessing, feature type, or fingervein recognition algorithm and test this against the baseline algorithms implemented in the FingerveinRecLib.
If you are interested, please continue reading:
The Biometric Vein Recognition Library is an open source tool consisting of a
series of plugins for bob.bio.base_, our open-source biometric recognition
platform. As a result, it is fully extensible using bob.bio.base_ documented
types and techniques. Please refer to the manual of that package for a thorough
introduction. In this guide, we focus on details concerning vein recognition
experiments with our plugins.
===========
......@@ -34,16 +21,9 @@ Users Guide
.. toctree::
:maxdepth: 2
installation
experiments
evaluate
contribute
satellite
references
This documentation is still under development.
api
.. include:: links.rst
.. _facereclib: http://pythonhosted.org/facereclib/index.html
.. vim: set fileencoding=utf-8 :
.. date: Thu Jan 15 15:58:57 CEST 2015
.. _installation:
=========================
Installation Instructions
=========================
.. note::
This documentation includes several ``file://`` links that usually point to files or directories in your source directory.
When you are reading this documentation online, these links won't work.
Please read `Generate this documentation`_ on how to create this documentation including working ``file://`` links.
Download
--------
FingerveinRecLib
~~~~~~~~~~~~~~~~
To have a stable version of the FingerveinRecLib, the safest option is to go to the `FingerveinRecLib <http://pypi.python.org/pypi/fingerveinreclib>`_ web page on PyPI_ and download the latest version.
Nevertheless, the library is also available as a project of `Idiap at GitHub`_.
To check out the current version of the FingerveinRecLib, go to the console, move to any place you like and call:
.. code-block:: sh
$ git clone git@github.com:bioidiap/fingerveinreclib.git
Be aware that you will get the latest changes and that it might not work as expected.
Bob
~~~
The FingerveinRecLib is a satellite package of Bob_, where most of the image processing, feature extraction, and fingervein recognition algorithms, as well as the evaluation techniques are implemented. This package uses FaceRecLib_ as a parent package.
In its current version, the FingerveinRecLib requires Bob_ version 2 or greater.
Since version 2.0 there is no need for a global installation of Bob any more, all required packages will be automatically downloaded from PyPi_.
To install `Packages of Bob <https://github.com/idiap/bob/wiki/Packages>`_, please read the `Installation Instructions <https://github.com/idiap/bob/wiki/Installation>`_.
For Bob_ to be able to work properly, some dependent packages are required to be installed.
Please make sure that you have read the `Dependencies <https://github.com/idiap/bob/wiki/Dependencies>`_ for your operating system.
.. note::
Currently, running Bob_ under MS Windows in not yet supported.
However, we found that running Bob_ in a virtual Unix environment such as the one provided by VirtualBox_ is a good alternative.
Usually, all possible database satellite packages (called ``bob.db.[...]``) are automatically downloaded from PyPI_.
If you don't want to download the databases, please edit the ``eggs`` section of the buildout.cfg_ configuration file by removing the databases that you don't want.
The ``gridtk`` tool kit is mainly used for submitting submitting jobs to Idiap_'s SGE_ grid.
The latest version also supports to run jobs in parallel on the local machine.
You can safely remove this line from the buildout.cfg_ if you are not at Idiap and if you don't want to launch your experiments in parallel.
Image Databases
~~~~~~~~~~~~~~~
With the FingerveinRecLib you will run fingervein recognition experiments using some default finger vein image databases.
Though the verification protocols are implemented in the FingerveinRecLib, the images are **not included**.
To download the image databases, please refer to the according Web-pages, database URL's will be given in the :ref:`databases` section.
Set-up your FingerveinRecLib
----------------------------
Now, you have everything ready so that you can continue to set up the FingerveinRecLib.
To do this, we use the BuildOut_ system.
To proceed, open a terminal in your FaceRecLib main directory and call:
.. code-block:: sh
$ python bootstrap-buildout.py
$ bin/buildout
The first step will generate a `bin <file:../bin>`_ directory in the main directory of the FingerveinRecLib.
The second step automatically downloads all dependencies of the FingerveinRecLib and creates all required scripts that we will need soon.
Test your Installation
~~~~~~~~~~~~~~~~~~~~~~
One of the scripts that were generated during the bootstrap/buildout step is a test script.
To verify your installation, you should run the script by calling:
.. code-block:: sh
$ bin/nosetests
In case any of the tests fail for unexplainable reasons, please file a bug report through the `GitHub bug reporting system`_.
.. note::
Usually, all tests should pass with the latest stable versions of the Bob_ packages.
In other versions, some of the tests may fail.
Generate this documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~
To generate this documentation, you call:
.. code-block:: sh
$ bin/sphinx-build docs sphinx
Afterwards, the documentation is available and you can read it, e.g., by using:
.. code-block:: sh
$ firefox sphinx/index.html
.. _buildout.cfg: file:../buildout.cfg
.. include:: links.rst
.. _facereclib: http://pythonhosted.org/facereclib/index.html
......@@ -17,3 +17,4 @@
.. _sge: http://wiki.idiap.ch/linux/SunGridEngine
.. _virtualbox: https://www.virtualbox.org
.. _hdf5: http://www.hdfgroup.org/HDF5
.. _bob.bio.base: https://pypi.python.org/pypi/bob.bio.base
.. vim: set fileencoding=utf-8 :
.. date: Wed Jan 14 11:58:57 CEST 2015
.. _satellite-packages:
=================================
Create your own Satellite Package
=================================
The simplest and most clean way to test your own code in the FingerveinRecLib is to add it in a satellite package.
In principle, you can choose a name that fits you, but it is preferable to have a package name that starts with ``xFingerveinRecLib.`` to show that it is a satellite package to the FingerveinRecLib.
Please refer to the :ref:`satellite package explanation of Bob <bob.extension>`, which explains in detail how to start.
Depending on of what nature is your contribution, you have to register it in the `setup.py` file of your satellite package.
In case, your contribution is a fingervein recognition algorithm, you might want to :ref:`register it <register-resources>`.
After doing that, you can simply use the ``bin/fingerveinverify.py`` (or any other script of the FingerveinRecLib) with your registered tool, as if it would be part of the FingerveinRecLib.
Another contribution of code is to provide the source code to rerun the experiments as published in a paper.
In this case, the contribution is more about scripts that can be used to run experiments.
To cause the buildout_ system to create a python script in the `bin <file:../bin>`_ directory, you have to register the script in your `setup.py` file under the ``console_scripts`` section.
Contribute your Code
--------------------
When you invented a completely new type of preprocessing, features, or recognition algorithm and you want to share them with the world, or you want other researchers to be able to rerun your experiments, you are highly welcome **and encouraged** to do so.
Please make sure that every part of your code is documented and tested.
To upload your satellite package to the world (more specifically to PyPI_) you have to create an account and register an ssh key.
Add the required packages in the `setup.py` file and under the ``install_requires`` section, provide the other information and upload the package to PyPI via:
.. code-block:: sh
$ python setup.py register
$ python setup.py sdist --formats zip upload
Now, all other researchers can make use of your invention, with the effect that your paper will be cited more often, simply by adding your project to the **setup.py** in their satellite package.
.. include:: links.rst
Markdown is supported
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