Back to Openface

Demo 2 Comparison

docs/demo-2-comparison.md

0.2.21.8 KB
Original Source

Demo 2: Comparing two images

Released by Brandon Amos on 2015-10-13.


The comparison demo outputs the predicted similarity score of two faces by computing the squared L2 distance between their representations. A lower score indicates two faces are more likely of the same person. Since the representations are on the unit hypersphere, the scores range from 0 (the same picture) to 4.0. The following distances between images of John Lennon and Eric Clapton were generated with ./demos/compare.py images/examples/{lennon*,clapton*}.

Lennon 1Lennon 2Clapton 1Clapton 2
</img></img></img></img>

The following table shows that a distance threshold of 0.99 would distinguish these two people. In practice, further experimentation should be done on the distance threshold. On our LFW experiments, the mean threshold across multiple experiments is 0.99, see accuracies.txt.

Image 1Image 2Distance
Lennon 1Lennon 20.763
Lennon 1Clapton 11.132
Lennon 1Clapton 21.145
Lennon 2Clapton 11.447
Lennon 2Clapton 21.521
Clapton 1Clapton 20.318