Paul Draghicescu

Computer Vision (CSE 455), Winter 2012

Project 4: Eigenfaces

Project Abstract

Objectives

In this project, we created a face regocgnition system which tries to correctly identify the locations of faces in an input image. We do this by creating a set of "eigenfaces", the principal components of a distribution of faces, and then threshold against the input image projected on to the face space

Challenges

One challenge of this project was the large running times. Finding the eigenvectors and eigenvalues of large face images is slow, so we had to limit the eigenfaces to be fairly small. We also couldn't use too many eigenfaces because blah blah blah

Experiment: Recognition

Methodology

I created three different scripts to run the first experiment. The first uses --eigenfaces to create sets of eigenfaces from size 1 to 33 of the non-smiling class photos. The eigenfaces are all of size 25x25 pixels. The next script creates a userbase from the smiling class photos, and the last script uses --recognizeFace to find the best match in the smiling database using mean squared error.

Sample Results

average face

first 10 eigenfaces

Questions

The number of correct faces predicted increased sharply for the first few eigenfaces, but then after adding more eigenfaces there didn't seem to be as much improvement. With 5 eigenfaces the program correctly found 23/33 faces, and with 33 it only found one more.

There were quite a few recognition errors. A lot of the smiling faces had really exaggerated expressions that seemed to throw the recognition rate off. Below are two examples where the program didn't recognize the correct face. For the first set, using 15 eigenfaces, the correct face was second best face chosen, and for the second set the actual best face ended up third. So the program still managed to score the correct face highly when it didn't get the correct face.

Sample Prediction Errors

Non-smiling

Incorrect match to smiling



Non-smiling

Incorrect match to smiling


Discussion

Overall the program seems to work fairly well at recognizing faces, even using eigenfaces of only 25x25 pixels. It also seems like there isn't much gain in recognition rates for more than 10 or 15 eigenfaces.

Experiment: Find Faces

I realized that I turned in a broken executable, so I have a attached the working one along with eigfaces.cpp in the artifact folder. My program was working fine, but I introduced too many bugs while trying to solve the problem of overlapping windows, so now my program is only able to find the top n scores in the picture without removing overlapping windows (without finding the local maximum). I had hard time understanding the syntax to erase and insert items into the list. EDIT: So findfaces does not work at all anymore, and I don't have a copy of it before I made all these changes. I was detecting faces at some point, but now I can't figure out what I've changed. The list of face positions no longer stays sorted, so I am not finding the best face positions. Here are some debug images from the group photo and one from the class photo showing mean squared error for every pixel. It looks like it does fairly well, with the lowest error around the faces and also around the edges. When my program was working correctly I was able to get boxes in these black areas, usually around the face. I can no longer predict faces on the group photos, so I left the last two experiments incomplete. If I had time I would try to start over and write the whole findfaces method again, but try storing every faceposition in the list and sorting it at the end, then removing duplicates. I made the program too complicated by trying to remove duplicates while keeping the list sorted.

group debug photo


class debug photo