Example use of facial recognition using OpenCV's eigenface implementation.
./test_eigenfaces.py
N.B requires a csv file at
./faces.csv
##Dependencies OpenCV
brew install opencv
Create your virtualenv allowing for site packages, so you can access opencv python bindings
virtualenv --system-site-packages
Then install deps from requirements.txt
pip install -r requirements.txt
I used the set of example face images available from AT&T Labs Database of Faces.
wget http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.tar.Z \
&& uncompress att_faces.tar.Z \
&& tar xvf att_faces.tar
Create the necessary csv file
./create_csv.py orl_faces > faces.csv
This will create a csv in the form file;label. See OpenCV Docs for more info.
This is just a python implementation of some of the behaviour shown in the OpenCV docs.