Eigenfaces is a basic face detection and recognition program. By training the program on 32 images of my classmates, eigenfaces generated the following images for use in face detection and recognition.
Average Face
Top 10 Eigenfaces
Using a userbase generated from these 10 eigenfaces, my program correctly identified 20 smiling photos of the original 32 people used to construct the eigenfaces. This is a recognition accuracy of 62.5%. Below is a graph of the number of eigenfaces used and the resulting accuracy.
The benefit of adding more eigen faces was steep in the very beginning. It quickly reached the average peak at 8 eigen faces. The peak benefit was at 12 eigen faces. 12 eigen faces seem to give the best accuracy, but looks like 8-12 would be a good number to settle at (again based only on this experiment).
There were also several consistent recognition errors. Certain faces were never correctly identified. But interestingly, the correct face was within 2-4 best faces.
For example, s23.tga was never correctly identified .
In all except one case it was identified as
In almost all the cases, the second best picture was the correct picture for the above failure.
Again s27.tga was never correctly identified:
In all except one case it was identified as
In almost all the cases, the second, third or fourth best picture was the correct picture for the above failure.
min_scale =
0.25; max_scale = 0.55; step = 0.01; crop
min_scale =
0.25; max_scale = 0.55; step = 0.01; crop
min_scale =
0.25; max_scale = 0.55; step = 0.01; crop
min_scale =
0.5; max_scale = 0.70; step = 0.01; mark
This next image was less than optimal; there were 4 faces but my program & range only found 3 of them. Interesting note is that I was able to successfully crop the faces in individual portraits. The key is to find the right scales. For portraits, .25 to .55 seems to work fine for all my 3 samples. But the range of .5 to .7 does not work always for group pictures. I had to try a differnt range for the second picture. But I could not find a range where all four faces were detected. I had another range .4, .47, .05 where the first face was detected, but not the second one.
min_scale =
0.4; max_scale = 0.5; step = 0.01; mark
1) Completed speedup of Eigen Vector calculation. The results
were taken using the speedup version function. I still have the old function commented out in faces.cpp
2) I also completed verifyFace, a function that
allows users to check an image against a userbase of
known faces to determine if the face is who the user believes it to be.
MSE tolerance of 2000 gets an accuracy of 62% and 3500 MSE tolerance gives 96% accuracy.
Tolerance MSE % Accuracy
500 6
750 28
1000 40
1250 46
1500 53
1750 59
2000 62
2500 75
3000 87
3500 96