diff --git a/doc/eigenface.png b/doc/eigenface.png index 4249388f8c2adfc2e37d37071568ff862dd11b51..39fa0b6a281dddc98ecacbb36715de9c2b7978bf 100644 Binary files a/doc/eigenface.png and b/doc/eigenface.png differ diff --git a/doc/examples.rst b/doc/examples.rst index d12bfb0a51c47123f13c61ae3e6a37eaf4036aed..d2b625a9b5d35300a093040d2cb92dae92711cfd 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -82,13 +82,13 @@ After training, the model and probe images are loaded, linearized, and projected ... probe_image = bob.io.load(filename) ... probe_feature = pca_machine(probe_image.flatten()) -To compute the verification result, each model feature is compared to each probe feature by computing the Euclidean distance: +To compute the verification result, each model feature is compared to each probe feature by computing the negative Euclidean distance: .. code-block:: python >>> for model_feature in model_features: ... for probe_feature in probe_features: - ... score = bob.math.euclidean_distance(model_feature, probe_feature) + ... score = - bob.math.euclidean_distance(model_feature, probe_feature) The results are divided into a list of positive scores (model and probe are from the same identity) and a a list of negative scores (identities of model and probe differ). Using these lists, the ROC curve is plotted: @@ -107,12 +107,12 @@ and the performance is computed: >>> threshold = bob.measure.eer_threshold(negatives, positives) >>> FAR, FRR = bob.measure.farfrr(negatives, positives, threshold) -The expected result is: FAR 83.6% and FRR 83.6% at distance threshold 2048.9 +The expected result is: FAR 16.4% and FRR 16.4% at distance threshold 2048.9 .. note:: - Computing eigenfaces with such a low amount of training data is usually not an excellent idea. - Hence, the performance in this example is extremely poor. + Computing eigenfaces with a low amount of training data is usually not an excellent idea. + Hence, the performance in this example is relatively poor. Gabor jet comparisons diff --git a/faceverify/eigenface.py b/faceverify/eigenface.py index 6693570fb23503ff1e2988823cc3b988d3e52b6b..65efa5847b2c342716372530b6590393e37470ab 100644 --- a/faceverify/eigenface.py +++ b/faceverify/eigenface.py @@ -135,8 +135,8 @@ def main(): # iterate through models and probes and compute scores for model_key, model_feature in model_features.iteritems(): for probe_key, probe_feature in probe_features.iteritems(): - # compute score - score = distance_function(model_feature, probe_feature) + # compute score as negative distance + score = - distance_function(model_feature, probe_feature) # check if this is a positive score if atnt_db.get_client_id_from_file_id(model_key) == atnt_db.get_client_id_from_file_id(probe_key): diff --git a/setup.py b/setup.py index 81e2ed83cf8e2e08901193f155105cd7e9b435ad..09e7d54b9cff3c61c11a61b4a5216ad837470efd 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ setup( # This is the basic information about your project. Modify all this # information before releasing code publicly. name='bob.example.faceverify', - version='0.3.1', + version='0.3.2', description='Example for using Bob to create face verification systems', url='http://pypi.python.org/pypi/bob.example.faceverify', license='GPLv3',