# 7.5 Eigen Faces

Eigenfaces is a well known Principle Component Analysis (PCA) based face recognition algorithm developed by researchers at MIT [99]. A reimplementation of the Eigenfaces algorithm from researchers at Colorado State University was used in this research [28]. Though the mathematical underpinnings of Eigenfaces are complex, the entire algorithm is simple and has a structure quite amenable to streaming and high statically schedulable ILP. Training images are represented as a set of flattened vectors and assembled together into a single matrix. The Eigen vectors of the matrix are then extracted and stored in a database. The training face images are projected onto a feature space, called face space, defined by the Eigen vectors. This captures the variation between the set of faces without emphasis on any one facial region like the eyes or nose. The projected face space representation of each training image is also saved to a database. To identify a face, the test image is projected to face space using the saved Eigen vectors. The projected test image is then compared against each saved projected training image for similarity. The identity of the person in the test image is assumed to be the same as the person depicted in the most similar training image. The actual algorithm that defines the face space is:

Make Eigen Vectors(ImageList, N, M): ImageList is a set of N training images, where each image is pixels. M is the number of Eigen vectors that needs to be generated.

- Flatten each image into a WH element vector by concatenating all the rows. Let be the matrix containing all the flattened images.
- Sum up all the rows of and divide by N to get an average flattened image. Call this WH element vector as .
- Subtract the average image from the flattened images in . Let the new matrix be .
- Compute dot products of all possible image pairs. Let be the new matrix where = dot product of and .
- Compute the N Eigen values and corresponding Eigen vectors of . Pick the Eigen vectors corresponding to the highest Eigen values. Each Eigen Vector is N elements long.
- Do a matrix multiplication of each of the selected M Eigen vectors against and save the resulting set of sized matrices as a combined element in a database. Save the average image also to the database.

Project to Face Space(Image): Image is pixels in size.

- Let be the flattened element vector form of Image.
- Load the average image and the from the database.
- Subtract the average image from to create a new image .
- Take the dot product of against each row of to obtain an M element vector .
- Let . Divide each element of by . This is the face space representation of Image.

Learn Faces(ImageList, N, M): ImageList is a set of N training images, where each image is pixels. A person's name is attached to each image. M is the number of Eigen vectors needed.

- Call Make Eigen Vectors(ImageList, N, M)
- For each image in , call Project to Face Space(image) and save the resulting projected faces to a database.

Identify(Image): Image is pixels in size.

- Load the saved known projected faces from the database.
- proj = Project to Face Space(Image)
- Take the dot product of proj against each known projected face. Call this the score.
- The known projected face that gets the highest score is considered the identity of the test image.

Binu Mathew