From 2fcc4d78b9e25b5c365ffd87f4f877937b0437bc Mon Sep 17 00:00:00 2001 From: Manuel Guenther <manuel.guenther@idiap.ch> Date: Wed, 2 May 2012 18:02:12 +0200 Subject: [PATCH] Added the requirement of Bob version 1.0.3 --- README.rst | 3 +++ faceverify/eigenface.py | 9 +++++++++ localbob.cfg | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 990a422..c781c32 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,9 @@ have a Bob version yet, you can get it from: http://idiap.github.com/bob/ +If you already have installed Bob, please make sure that you have at least +the version 1.0.3, otherwise the example won't work. + The AT&T image database is quite small, but sufficient to show how the face verification methods work. Still, the results may not be meaningful. One good thing about the AT&T database is that it is freely available. You can download diff --git a/faceverify/eigenface.py b/faceverify/eigenface.py index 753b93b..01d20cd 100644 --- a/faceverify/eigenface.py +++ b/faceverify/eigenface.py @@ -85,6 +85,15 @@ def main(): print "Training PCA machine" pca_machine = train(training_images) + # extract the first eigenvector + projection_matrix = pca_machine.weights + eigen_image = projection_matrix[:,0] + # reshape the eigenvector to the right image resolution + eigen_image.shape = (112,92) + # show the first eigenface + pyplot.imshow(eigen_image, cmap = 'gray') + pyplot.show() + ##################################################################### ### extract eigenface features of model and probe images diff --git a/localbob.cfg b/localbob.cfg index f51b78b..acdef6f 100644 --- a/localbob.cfg +++ b/localbob.cfg @@ -36,7 +36,7 @@ recipe = local.bob.recipe:config ; If you go for a relative path, remember this path is relative to the path ; you are calling buildout from. This is normally the path that contains the ; file 'setup.py' for your own package. -install-directory = ../bob/build +install-directory = /scratch/mguenther/Bob/cmake/trunk ; Some examples for Idiap: ;install-directory = /idiap/group/torch5spro/releases/bob-1.0.2/install/linux-x86_64-release -- GitLab