face_recognition is a self-contained implementation of the Eigenface-method in Python using OpenCV and NumPy.
This repository provides the core-library and some applications for testing.
- Website: www.indrome.com
- Python 2.X (tested 2.7.6)
- Numpy 1.8 (tested 1.8.0)
If you have the correct dependencies installed you can use the library file as such:
import eigenface
# load all reference faces
files = file_list_from_path("path-to-face-files")
# O is a set of columns corresponding to the eigenfaces of files
# UT is the eigenspace-basis
# X is the mean faces of files
O,UT,X = eigenface.train(files)
# load another face
vec = eigenface.vec_from_img_path("path-to-face.jpg")
# return the column-index of O which was recognized as the input vec
ind = eigenface.recognize(O,U,vec,X)
print files[ind]