Tim Cook
CSE 455 Project 4
Eigenfaces
The average face:
![](average_face.png)
My eigenfaces:
Getting my eigenfaces to generate properly was the hardest part of this assignment for me, due to a lot of very minor off-by-one errors in my code that completely ruined all the eigenface output. Once they were fixed, the eigenfaces ended up looking pretty decent.
Recognition:
This table plots number of eigenfaces to number of matches. The results are generally unimpressive; even with 27 eigenfaces, I don't get above 37% accuracy.
E \ M |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
1 |
| | |
|
3 |
| | | | | |
|
5 |
| | | | | |
|
7 |
| | | | | |
|
9 |
| | | | |
|
11 |
| | | | |
|
13 |
| | | | |
|
15 |
| | | |
|
17 |
| | | | | |
|
19 |
| | | | | |
|
21 |
| | | | | | |
|
23 |
| | | | | | | |
|
25 |
| | | | | | | | |
|
27 |
| | | | | | | | |
|
... |
99 |
| | | | | | | | |
|
Up to 27 eigenfaces (the same number as there was input images) makes a difference. More than that has no effect at all. My program definately works best with as many eigenfaces as there were input images.
One example of a match:
![](nonsmiling_02.png)
Features like hair over the face probably helped this match.
One example of a failed match, from 27 eigenfaces:
Another example of a failed match, from 27 eigenfaces:
The odd thing about these failed matches is that the first failed match looks almost reasonable at first glance, while the second looks very different; looking harder at the pictures, though, features such as the nose are definately more similar in the second one. The single feature that's most similar in each of these pairs is face orientation: There's a reasonably large hole in the lower-left of the first failed match, and in the second match, the picture is much more filled. The presence and lack of glasses is a major problem, though; I'm not sure why my program didn't match glasses at least. It seems like it's easiest for my program to match on the overall facial shape, ie, how well it fills the frame.
Cropping and finding:
My attempt at cropping elf.tga:
![](elfcrop.png)
Obviously, this failed. So, I tried marking the top five matches:
![](elfmark.png)
The fourth eigenface probably contributed to the false positive; the hole in the hat could almost pass for a nose or an eye. Unfortunately, since two of the false positives were partly overlapping faces, they prevented any of the other matches from locking on to those same faces.
A picture of me, with best matches marked:
It picks up on background elements very strongly. I may not be normalizing enough, or I may have normalized too much--I need this to pick up only on generally face-colored things with decent contrast.
On IMG_0031.TGA, I used scales of 0.45 to 0.55, step 0.01, as the faces seemed to be the same size as in elf.tga.
Results were unimpressive, even though the scale seemed right.
Here's another group photo that didn't work: Scale was 0.40 to 0.60, step 0.05.
In general, I would say that these problems came from improper eigenface generation. If I couldn't even recognize most smiling faces with 27 eigenfaces, I certainly can't find faces in pictures. My eigenfaces did work to some extent--the matches on my graph were far more than I could get from random chance--but they were simply not good enough.