CSEP567 - Project 4

Brett Wilson

Extras: Speedy Method (Use 1/0 argument at end of --eigenface command)
Multiple Face Sizes
Additional Detection Measures

Recognizing Faces

Average Face

Computed EigenFaces

Below is the graph showing the number of matches when increasing the number of eigen faces used. The face size was 25x25. 10 eigenfaces appears to be the breaking point of decent detection but it also appears a little unstable until past 20 eigenfaces. My guess is that with a larger database of people to search where closer faces exist that more eigen faces would be needed.

With smaller face sizes, it takes longer to stabalize but it could do slightly better with sizes 15 and 20, but it drops off at 10

With larger face sizes, it takes less time to stabalize but and they all seem to stick around 20 faces total correct. Ofcourse, all of these graphs are skewed thanks to the Trouble Gang below.

The Trouble Gang

S00 S01 S03 S05 S06 S07
S10 S13 S15* S21 S23 S27*

These were the faces that were rarely detected correctly. Mostly just once or never. 15 and 27 were detected with smaller face sizes (10x10, 15x15, 20x20) but as the face size went up, so did the required number of eigen faces used. At the smaller face sizes, most of these faces were pretty low in the match order but the correct face rose in the order as the size of the faces used increased. However, even a later experiment using face sizes of 55, 60 and 65 resulted in the same max match of 20 faces.

Some of the trouble group were also constantly matched with the same incorrect face. Some examples are below. It kinds of looks like the space around the face has an effect when things are just too different (i.e. head tilt).

*cough*


Face Detection

Several features were tested when doing detection (using 25x25/10 eigenfaces):

My goal was to be able to set the thresholds such that one would set the number of faces to mark to a large value but only the real faces would be marked. i.e. little to no false positives. This was an easy task for the group photos from class (plain background, known faces) but when applying the program to other group photos, it required me to loosen the thresholds which let in a couple false positives.

As would be expected, the detector works best on people who's face is generally squared with the image and the distance between the eyes, nose and chin are the 'normal' ratios, unlike the 'shocked' look.

The first step in doing the matches is extracting grayscale face images from the image. I originally did this by scaling the color image and than repeatedly calling the Face::subimage call to create a grayscale face. The problem with this is that the normalization function works on small 25x25 squares and stretches the color range out to 0.0-255.0 distoring shade differences. When you have a relatively simple background with a couple shades of gray, this created white, gray and black sections. This caused alot of havoc with the variance measurement as it shows up as a relatively large variance. Eventually, I dropped variance and use the number of unique colors.

Currently, I use two full size images (color and grayscale created from color) and create two resampled (color and grayscale) images during each scale iteration. At each point in the scaled image, I extraced a face from the grayscale for processing but do a color check on the scaled color image directly. If it passes that test, the grayscale face is checked for the number of unique intensity values (rounded to integers) instead of variance. Real faces have varying shades and shadows. The next test is the projection of image onto the face plane and the calculation of its MSE. The last calculation is the distance from the average face but this is only used in the calculation of the 'error' value used in ordering. At any point in the tests, if it can be determined that the threshold isn't reached, the next loop iteration is started. I also do a double iteration if it fails the colors or uniques test as we aren't close enough to any yet and we want things to move relatively quickly.

Marking Faces

All of the marked images can be found here with their scales, false positives and negatives, and comments. Each run was done with match max of 20 to see if I get false positives past the real faces.

Cropping

All done with scale(0.25, 0.55, +0.01).
ResultOriginal
nothing

Future Ideas