Like this presentation? Why not share!

# Moshe Guttmann's slides on eigenface

## by wolf on Oct 31, 2006

• 5,337 views

### Views

Total Views
5,337
Views on SlideShare
5,315
Embed Views
22

Likes
4
0
1

### 3 Embeds22

 http://www.slideshare.net 14 http://www.cs.tau.ac.il 7 http://ab67ct.tripod.com 1

### Categories

Uploaded via SlideShare as Microsoft PowerPoint

### Report content

11 of 1 previous next

• tonyxxxxx this was realy nice one
thank u for the slide
1 year ago
Are you sure you want to

## Moshe Guttmann's slides on eigenfacePresentation Transcript

• Eigenfaces Developed in 1991 by M.Turk & A.Pentland Based on PCA Fisherfaces Developed in 1997 by P.Belhumeur et al. Based on Fisher’s LDA Moshe Guttmann
• Goal
• Face identification
Eigenfaces ? ? ? Alexander Roth - http://isl.ira.uka.de/~nickel/mmseminar04/A_Roth%20-%20Face%20Recognition.ppt Basic Face set (face space basis) Input image
• Eigenfaces
• Proposition:
• Input vector Z = [z 1 z 2 … z n ] T
• Face training set
• A = [a 1 a 2 … a n ] T
• How do we identify the face Z?
• Find
• The A’ that minimize the above is most probably the same face as Z
• Eigenfaces
• Problems
• Noise on samples (both input and training set). We cannot determine which of the coefficients is the noise and which represent the face.
• Different illumination/brightness of image
• Facial expression
• Eigenfaces
• Solution:
• If X is an N-dimensional vector, lower the dimension of X into an n-dimensional vector (n<<N).
• What are the requirements for the dimension reduction?
• Minimize reconstruction error
• Minimize the correlation between basis
• Eigenfaces
• Dimension reduction:
• How to choose the basis for the new n-dimensional space?
• Principal Component Analysis (PCA) (a.k.a Karhunen-Loeve transform)
• Eigenfaces – PCA
• Theory – intuition:
• Rotate the data so that its primary axes lie along the axes of the coordinate space and move it so that its center of mass lies on the origin.
x 1 x 2 e 1 e 2 x x x x x x x x y 1 y 2 PCA x x x x x x x x
• Eigenfaces – PCA
• Goal – Formally stated:
• Problem formulation
• Input: Matrix X = [ x 1 | … | x M ] N x M in N-dimensional space
• Look for: W N x n projection matrix (n  N)
• S.t. : Y = [y 1 |…|y M ] n x M = W T X
• And correlation is minimized
W X Y X Y x i y i
• Eigenfaces – PCA
• Define the covariance (scatter) matrix of the input samples as :
• (where  is the sample mean)
• Let X’ = [x 1 -  ,…,x N -  ] T then the above expression can be rewritten simply as :
• Cov(x) = X’X’ T
• Eigenfaces – PCA
• Properties of the Covariance Matrix
• The matrix Cov is symmetric and of dimension NxN.
• The diagonal contains the variance of each parameter (i.e. element Cov ii is the variance in the i’th direction).
• Each element Cov ij is the co-variance between the two directions i and j, or how correlated are they (i.e. a value of zero indicates that the two dimensions are uncorrelated).
• Eigenfaces – PCA cont’
• PCA goal – revised
• Look for: projection matrix W
• S.t. : [y 1 …y n ] T = W T [x 1 …x N ] T ...
• And correlation is minimized
• OR
• Cov(y) is diagonal
• max trace( Cov(y) )
• Note that Cov(y) can be expressed via Cov(x) and W as :
• Cov(y) = W T Cov(x) W
• Eigenfaces – Principal Component Analysis (PCA)
• Selecting the Optimal W
• How do we find such W ?
• s.t Cov(x) is diagonal
• and max trace( Cov(x) )
•  i w i = Cov(x)w i
• Therefore :
• Choose W opt to be the eigenvectors matrix:
• W opt = [w 1 |…|w n ]
• Where {w i |i=1,…,n} is the set of the n-dimensional
• eigenvectors of Cov(x) !
• Eigenfaces – PCA cont’
• Explaining the theory
• Each eigenvalue represents the total variance in its dimension.
• So…
• Throwing away the least significant eigenvectors in W opt means throwing away the least significant variance information !
• Eigenfaces – Principal Component Analysis (PCA)
• To find a more convenient coordinate system one needs to:
Calculate mean sample  Subtract it from all samples x i Calculate Covariance matrix for resulting samples Find the set of eigenvectors for the covariance matrix Create W opt , the projection matrix, by taking as columns the eigenvectors calculated !
• Eigenfaces – PCA
• Now we have that any point x i can be projected to an appropriate point y i by :
• y i = W opt T (x i -  )
• and conversely (since W -1 = W T )
• Wy i +  = x i
X Y x i X Y y i W opt T (x i -  ) Wy i + 
• Eigenfaces – PCA
• Data Loss
• Sample points can still be projected via the new N x n projection matrix W opt and can still be reconstructed, but some information will be lost.
x 1 x 2 2D data 1D data x 1 W opt T (x i -  ) x 1 x 2 2D data Wy i + 
• Eigenfaces – PCA
• Data Loss
• It can be shown that the mean square error between x i and its reconstruction using only m principle eigenvectors is given by the expression :
• Eigenfaces – the read deal
• Eigenfaces – preparing the training set
• Get a training set of faces (Nx1)
• Calculate μ
• Make Covariance matrix
• Get the n largest eigenvalues/eigenvectors of Cov
• Make W
• Eigenfaces – the read deal
• Eigenfaces – Identifying new image
• Get new image (Nx1)
• Calculate X’
• Project onto the “face space”
• Find the “Nearest Neighbor” to the projection
• The A’ that minimize the above is most probably the same face as X
• Eigenfaces – the read deal
• Get a training set of faces A,B,…
Turk & Pentland – Eigenfaces for recognition
• Eigenfaces – example
• Average of training set μ
Turk & Pentland – Eigenfaces for recognition
• Eigenfaces – example
• Seven of the eigenfaces calculated from the training set
Turk & Pentland – Eigenfaces for recognition
• Eigenfaces – example
• Face identification
• On new Image X
Turk & Pentland – Eigenfaces for recognition Input image and its “face space” projection
• Eigenfaces – example
• Face identification
• On new Image Z
Turk & Pentland – Eigenfaces for recognition Input image and its “face space” projection
• Eigenfaces – experiments
• Face identification – statistics (Yale Database)
P.Belhumeur et al. – Fisherfaces vs Eigenface
• Eigenfaces – problems
• Problems with eigenfaces
• Sensitive to illumination
• Sensitive to rotation, scale & translation
• Sensitive to different facial expression
• Background interference
• Eigenfaces – problems
• PCA problems
• PCA is not always an optimal dimensionality-reduction procedure:
http://network.ku.edu.tr/~yyemez/ecoe508/PCA_LDA.pdf
• Fisherfaces - LDA
• Fisher’s Linear Discriminant Analysis
• Purpose
• separate data clusters
Poor separation http://www.wisdom.weizmann.ac.il/mathusers/ronen/course/spring01/Presentations/Hassner%20Zelnik-Manor%20-%20PCA.ppt Good separation
• Fisherfaces
• Solution – find a better dimension reduction method
http://network.ku.edu.tr/~yyemez/ecoe508/PCA_LDA.pdf
• Fisherfaces - LDA
• Solution – find a better dimension reduction method
http://www.cs.huji.ac.il/course/2005/iml/handouts/class8-PCA-LDA-CCA.pdf 2-class set example Separation function Goal: maximize
• Fisherfaces - LDA
• Solution – find a better dimension reduction method
http://www.cs.huji.ac.il/course/2005/iml/handouts/class8-PCA-LDA-CCA.pdf 2-class set example Separation function Goal – revised: maximize
• Fisherfaces - LDA
• Fisher’s Linear Discriminant Analysis
• Solution
• Maximize the between-class scatter while minimizing the within-class scatter
• Fisherfaces
• Solution
• Widen the class.
• Class represents a person.
• Have r images of the same person’s face.
• Fisherfaces - LDA
• Linear Discriminant Analysis
• M images
• C classes
• Average per class
• Total Average
• Fisherfaces - LDA
• Linear Discriminant Analysis
• Within-class scatter matrix
• Between-class scatter matrix
• Fisherfaces - LDA
• Linear Discriminant Analysis
• Projection onto “face space”
• Within class scatter matrix
• Between-class scatter matrix
• Fisherfaces - LDA
• Example:
http://www.wisdom.weizmann.ac.il/mathusers/ronen/course/spring01/Presentations/Hassner%20Zelnik-Manor%20-%20PCA.ppt Good separation
• Fisherfaces - LDA
• Problem Finding the transformation matrix A
• Goal:
• Such a transformation retains class separability while reducing the variation due to sources other than identity (e.g., illumination).
• Fisherfaces - LDA
• Solution - Fisherfaces
• The linear transformation is given by a matrix W whose columns are the eigenvectors of
• From:
• We get that a i is the eigenvector of S w -1 S B
• Choose the eigenvectors with the largest k eigenvalues
• These eigenvectors give the directions of maximum discrimination.
• Fisherfaces - LDA
• LDA - Limitations
• The matrix S w -1 S B has at most C-1 nonzero eigenvalues.
• The upper limit of the LDA dimension reduction is C-1
• The matrix S w -1 does not always exist.
• To guarantee that S w is not singular
• M+C training samples are needed
• Not practical!
• Fisherfaces - Fisherfaces
• Solution: Fisherfaces – PCA + LDA
• PCA is first applied to the data set to reduce its dimension.
• M’ <= M – C
• LDA is then applied to further reduce the dimension.
• C’ <= C -1
• Fisherfaces – the read deal
• Fisherfaces – preparing the training set
• Get a training set of faces (Nx1)
• Calculate μ
• Find the PCA projection matrix using Cov(x)
• Find the LDA projection matrix using Cov(W T pca X)
• Make W
• Fisherfaces – the read deal
• Fisherfaces – Identifying new image
• Get new image (Nx1)
• Calculate X’
• Project onto the “face space”
• Find the “Nearest Neighbor” to the projection
• The A’ that minimize the above is most probably the same face as X
• Fisherfaces – experiments
• Face identification – statistics (Harvard Database)
P.Belhumeur et al. – Fisherfaces vs Eigenface
• Fisherfaces – experiments
• Face identification – statistics (Harvard Database)
P.Belhumeur et al. – Fisherfaces vs Eigenface
• Fisherfaces – experiments P.Belhumeur et al. – Fisherfaces vs Eigenface
• Fisherfaces – experiments P.Belhumeur et al. – Fisherfaces vs Eigenface
• Fisherfaces – experiments P.Belhumeur et al. – Fisherfaces vs Eigenface
• Bibliography
• Eigenfaces
• M. Turk and A. Pentland (1991). &quot; Face recognition using eigenfaces &quot;.  Proc. IEEE Conference on Computer Vision and Pattern Recognition , 586–591.
• M. Turk and A. Pentland (1991). &quot; Eigenfaces for recognition &quot;. Journal of Cognitive Neuroscience 3 (1): 71–86.
• Fisherfaces
• Peter N. Belhumeur, João P. Hespanha, David J. Kriegman “ Eigenfaces vs. Fisherfaces : Recognition Using Class Specific Linear Projection ” IEEE Transactions on Pattern Analysis and Machine Intelligence
• Class notes on PCA & LDA
• Introduction to Machine Learning. ( Amnon Shashua )
• Lecture 8: Spectral Analysis I: PCA, LDA, CCA
• Appendix – PCA proof Given a sample of n observations on a vector of p variables λ where the vector is chosen such that define the first principal component of the sample by the linear transformation is maximum
• Appendix – PCA proof cont’ Likewise, define the k th PC of the sample by the linear transformation where the vector is chosen such that is maximum subject to and to
• Appendix – PCA proof cont’ To find first note that where is the covariance matrix for the variables
• Appendix – PCA proof cont’ To find maximize subject to Let λ be a Lagrange multiplier by differentiating… then maximize is an eigenvector of corresponding to eigenvalue therefore
• Appendix – PCA proof cont’ We have maximized So is the largest eigenvalue of The first PC retains the greatest amount of variation in the sample.
• Appendix – PCA proof cont’ To find the next coefficient vector maximize then let λ and φ be Lagrange multipliers, and maximize subject to and to First note that
• Appendix – PCA proof cont’ We find that is also an eigenvector of whose eigenvalue is the second largest. In general The k th largest eigenvalue of is the variance of the k th PC. The k th PC retains the k th greatest fraction of the variation in the sample.