Computer
Vision
CSE 252A,
Winter 2004
David
Kriegman
Assignment 4
Face Recognition
(Due date: Friday,
Hand in under my office door or mailbox in
APM
The goal of this assignment is to implement a number of appearance-based methods for recognizing faces. As in assignment one, you will use face images from the Yale Face Database B where there are 10 faces under 64 lighting conditions. You will evaluate the ability of the algorithms to handle lighting conditions of the probe images that differ from training images. The algorithms that you will implement are
1. Eigenfaces
2. Fisherfaces
3. Distance to 3-D linear subspace.
This document will first describe the algorithms (and variations) that you will implement, and then describe how to test them on the Yale database.
Part I. Face
Alignment
The raw images from the Yale database are large (640 by 480), the faces are in different positions, and their sizes are slightly different. The first step of the assignment is to create rotated, translated, and scaled images so that the eyes of each subject are aligned to a standard position. That is, you should write a piece of code where you first click on the two eyes, and then compute a similarity transformation (rotation, translation, scale) that will map the coordinates of the two eyes to a standard position. As similarity transformations are a subgroup of affine transformations, you can use the two Matlab functions maketform and imtransform to transform an image.
Note that for this step, you cannot use CP2TFORM or similar Matlab functions for constructing the transform from the clicked control points. You should compute this yourself.
Once you’ve transformed the image, you should crop out a subwindow of the image containing the INTERIOR of the face. You do not want to include any of the background in the crop window. For a rectangular crop window, a reasonable size is 40 by 50. One could actually consider using nonrectangular crop windows, to get as much of everyone’s face without getting any background, but this is more coding effort.
The output of this step should be 640 cropped images where the eyes are aligned.
Note that YOU DO NOT HAVE TO ESTIMATE 640 TRANSFORMS, ONLY 10. The images of each person in the database where taken in the dome with the flashes. The faces are essentially static. So if you compute the transform for one image, it should be appropriate for the other 63 images of that individual.
Part II: Algorithms to implement
Here are the specific variations of the algorithms to implement. Note that you can find a summary of the algorithms in the paper:
Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear
Projection
P. Belhumeur, J. Hespanha, D. Kriegman / IEEE
Transactions on Pattern Analysis and Machine Intelligence, Special issue on
face recognition, July 1997, pp. 711-720.
http://vision.ucsd.edu/kriegman-grp/publication/papers/pami97.pdf
A. Eigenfaces
You will take your n by m pixel training images in as input, vectorize them into an (n*m) dimensional vector and , and then perform principal component analysis (PCA) on them and retain the top d principal components. The d basis images are the Eigenfaces, and you should show these in your report..
Now take all of your training images, and project them to the Eigenspace.
Each test image is then projected to the Eigenspace, and classification will be performed by nearest neighbor with the L2 metric in the Eigenspace.
You will report error rates for d=9 (same dimension as Fisherfaces) and also for d=30.
B. Fisherfaces
Following the above paper, you will create the fisherfaces from the vectorized training images. In your report, show the 9 Fisherfaces.
As for Eigenfaces, the training images are projected to the lower dimensional space. For each test image, it is projected to the lower dimensional space, and classification is performed again by nearest neighbor using the L2 metric.
C. Recognition using 3-D linear subspaces.
As in your photometric stereo assignment, you will take your training images for an individual as input and perform SVD to estimate the basis vectors of the best fitting 3-D linear subspace (i.e., the “B-matrix” in assignment 1). For a given test image, you will compute the L2 distance from the vectorized test image to the subspace. The subspace yielding the smallest distance determines the person’s identity. In your report, show the three basis images for each person.
Part 3: Evaluating your three algorithms.
You will evaluate your algorithm on the frontal pose images (e.g. yaleB01_P00.tar.gz) of the ten people in the Yale Face Database: B that can be obtained from ftp://plucky.cs.yale.edu/CVC/pub/images/yalefacesB/ and described at
http://cvc.yale.edu/projects/yalefacesB/yalefacesB.html
You should be familiar with these images from homework 1. For each individual, the 64 images can be divided into 5 subsets as described in
http://cvc.yale.edu/projects/yalefacesB/subsets.html
(Subset 5 comprises the remaining images not in subsets 1-4).
As a model for the type of comparisons you will perform, consider the evaluation shown in Figure 12 of section 4.2 of the paper: From Few to Many: Illumination Cone Models for Face Recognition under Variable lighting and Pose, A. Georghiades, P. Belhumeur, D. Kriegman / IEEE Transactions on Pattern Analysis and Machine Intelligence, 2001, pp.643-660
http://vision.ucsd.edu/kriegman-grp/publication/papers/pami01.pdf
You should train your three algorithms (with d=9 and d=30 for Eigenfaces) on the images in subset 1, and evaluate on subsets 2-5 and report the error rates in both a table and plot as in Figure 12. There’s no need to evaluate on subset 1 since you expect perfect recognition when evaluating on the training data. Your results will not be exactly as the same as those reported in the table since your crop window will be different, etc.
Repeat the experiment by picking one other subset as training data, and evaluate on the other subsets.
You should be writing Matlab scripts/functions for each experimental result so they can be replicated.
What to Hand in
You should hand in: