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

FaceRecLib

To have a stable version of the FaceRecLib, the safest option is to go to the FaceRecLibs 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 FaceRecLib, go to the console, move to any place you like and call:

$ git clone git@github.com:idiap/facereclib.git

Be aware that you will get the latest changes and that it might not work as expected.

Bob

The FaceRecLib is a satellite package of Bob, where most of the image processing, feature extraction, and face recognition algorithms, as well as the evaluation techniques are implemented. In its current version, the FaceRecLib 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, please read the Installation Instructions. 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 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.

The CSU Face Recognition Resources

Two open source algorithms are provided by the CSU Face Recognition Resources, namely the LRPCA and the LDA-IR algorithm. For these algorithms, optional wrapper classes are provided in the xfacereclib.extension.CSU satellite package. By default, this package is disabled. To enable them, please call:

$ bin/buildout -c buildout-with-csu.cfg

after downloading and patching the CSU resources, and updating the sources-dir in the buildout-with-csu.cfg file – as explained in xfacereclib.extension.CSU.

Image Databases

With the FaceRecLib you will run face recognition experiments using some default facial image databases. Though the verification protocols are implemented in the FaceRecLib, the images are not included, and for some databases, also the hand-labeled facial landmark annotations are external. To download the image databases, please refer to the according Web-pages.

For a start, you might want to try the small, but freely available image database called the AT&T database (formerly known as the ORL database).

Warning

The AT&T database is a toy database and outdated. Do not base any real experiments on the AT&T database. Particularly, do not try to publish scientific papers that rely on AT&T experiments!

Other database URL’s will be given in the Databases section.

Set-up your FaceRecLib

Now, you have everything ready so that you can continue to set up the FaceRecLib. To do this, we use the BuildOut system. To proceed, open a terminal in your FaceRecLib main directory and call:

$ python bootstrap-buildout.py
$ ./bin/buildout

The first step will generate a bin directory in the main directory of the FaceRecLib. The second step automatically downloads all dependencies of the FaceRecLib 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:

$ ./bin/nosetests

Some of the tests that are run require the images of the AT&T database database. If the database is not found on your system, it will automatically download and extract the AT&T database a temporary directory (which will not be erased).

To avoid the download, please:

  1. Download the AT&T database database and extract it to the directory of your choice.
  2. Set an environment variable ATNT_DATABASE_DIRECTORY to the directory, where you extracted the database to. For example, in a bash you can call:
$ export ATNT_DATABASE_DIRECTORY=/path/to/your/copy/of/atnt

Note

To set the directory permanently, you can also change the atnt_default_directory in the file facereclib/utils/tests.py. In this case, there is no need to set the environment variable any more.

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:

$ ./bin/sphinx-build doc sphinx

Afterwards, the documentation is available and you can read it, e.g., by using:

$ firefox sphinx/index.html