William Dean Gowin Graduate Student Appalachian State University July 26, 2007
Outline
EigenFaces Deconstruct a known face into an N-dimensional facespace where N is the number of faces in our data set. Deconstruct new faces and check how close they are in the facespace to the known face.
Objectives Explain Principle Component Analysis (PCA), and Singular Value Decomposition (SVD) Test any visual differences between PCA and SVD and then check the computational efficiency
Outline
PCA Utilized in: genomic studies biochemistry neurology biometrics The goal of PCA is to find the most important basis to represent a large data set, which filters out redundant or extraneous information.
Reduces dimensionality of the data set and filters out the redundant data. Calculate the eigenvalues and eigenvectors of the covariance matrix AA T. The k largest eigenvalues and their subsequent eigenvectors represent the most important patterns or characteristics in the data. That is you can reproduce the original faces reasonably well with only these k eigenvectors.
A simple Example of PCA
Subtract means, calculate eigenvalues and eigenvectors of the covariance matrix.
x y 2.6 2.3 0.6 0.7 2.2 2.8 1.9 2.1 3.2 3.2 2.3 2.7 2.0 1.6 1.0 1.2 1.4 1.6 1.1 0.8 2.8 3.2 1.3 1.1 x restore y restore 2.3623 2.5080 0.7019 0.6108 2.4366 2.5929 1.9596 2.0478 3.0686 3.3150 2.4305 2.5858 1.7552 1.8143 1.1232 1.0922 1.4949 1.5169 0.9683 0.9153 2.8951 3.1167 1.2037 1.1842
Let A be an n 2 m matrix, where m is the number of images in the data set, and each image is: n n, and n m. AA T has n 2 eigenvalues (λ i ), and eigenvectors (u i ), but n 2 is much to large to compute and therefore intractable. A T A has m eigenvalues and eigenvectors (v i ), and are the largest m eigenvalues of AA T. The eigenvectors of AA T are related to A T A by: u i = Av i. References: M. Turk and A. Pentland, Eigenfaces for Recognition, Journal of Cognitive Neuroscience, Vol. 3, no. 1, pp. 71-86, 1991
Outline
SVD Every m n matrix can be factored into a singular value decomposition (SVD) of the form: A = UΣV T (1) where the columns of U and V are the left and right (respectively) singular vectors of A and they are both orthogonal matrices: U T = U 1, V T = V 1, and Σ = diag(σ 1, σ 2,..., σ n ) where the σ i s are the singular values of A which are non-negative. References: Carl Meyer, Matrix Analysis and Applied Linear Algebra, Siam, Philadelphia, 2000. Jonathon Shlens, A Tutorial on Principal Component Analysis, http://www.snl.salk.edu/ shlens/notes.html
To see how the singular values relate to the eigenvalues, the SVD of A can be rewritten as: AV = UΣ and A T U = V Σ, which leads to: Av i = σ i u i A T Av i = A T σ i u i = σ i A T u i = σ 2 i v i A T Av i = λ i v i where v i represents the i th column vector of V, u i represents the i th column vector of U and λ i is the i th eigenvalue of A T A. The above proof demonstrates the relationship that the squared singular values of A are the eigenvalues of A T A and the column vectors of V are the eigenvectors of A T A and the column vectors of U are the corresponding eigenvectors of AA T.
Outline
Figure: Faces in the data set.
Figure: PCA facebasis.
Figure: SVD facebasis.
Figure: Recreating with top 5 PCA facebasis. Figure: Recreating with top 5 SVD facebasis.
No visual difference between PCA and SVD. On average the time to compute was twice as fast with PCA compared to SVD. Using only 5 eigenfaces produced similar results to using 20. Was able to identify most faces even ones that were quite different than the original.
Figure: Top 5 Closest faces in facespace using PCA. Figure: Top 5 Closest faces in facespace using SVD.
Figure: Reconstructing a face that is smiling and has eyes closed. Figure: Recreating with glasses, smiling and further away.
Figure: Recreating a face that is smiling. Figure: Recreating a face that is smiling.
Figure: Recreating a face that is turned and smiling. Figure: Recreating a face that is smiling.
Figure: Recreating face with only 5 eigenfaces. Figure: Recreating face with only 5 eigenfaces.
Outline
Improvements A larger data set Cropped closer to the face. Subtract off the background Use Eigenfaces first to check and then use face proportions (eye width...), instead of human input or threshold
Difficulties Aligning the faces (trying to get the camera centered & perpendicular to the face) can be quite difficult. Other factors: distance away from camera, head tilt, lighting, image resolution,... Cropping - not including hair, ears, neck. Working in RGB space is more difficult and computational expensive.