Face Recognition Ying Wu yingwunorthwestern edu Electrical and















































- Slides: 47
Face Recognition Ying Wu yingwu@northwestern. edu Electrical and Computer Engineering Northwestern University, Evanston, IL http: //www. eecs. northwestern. edu/~yingwu 1
Recognizing Faces? Lighting View 2
Outline ü Bayesian Classification ü ü ü Principal Component Analysis (PCA) Fisher Linear Discriminant Analysis (LDA) Independent Component Analysis (ICA) 3
Bayesian Classification Classifier & Discriminant Function ü Discriminant Function for Gaussian ü Bayesian Learning and Estimation ü 4
Classifier & Discriminant Function Discriminant function gi(x) i=1, …, C n Classifier n n Example The choice of D-function is not unique n Decision boundary 5
Multivariate Gaussian x 2 principal axes x 1 ü The principal axes (the direction) are given by the eigenvectors of ; ü The length of the axes (the uncertainty) is given by the eigenvalues of 6
Mahalanobis Distance x 1 x 2 Mahalanobis distance is a normalized distance 7
Whitening n x 2 Whitening: – Find a linear transformation (rotation and scaling) such that the covariance becomes an identity matrix (i. e. , the uncertainty for each component is the same) y 2 y=ATx y 1 x 1 p(x) ~ N( , ) p(y) ~ N(AT , AT A) 8
Disc. Func. for Gaussian n Minimum-error-rate classifier 9
Case I: i = 2 I constant Liner discriminant function Boundary: 10
Example n Assume p( i)=p( j) Let’s derive the decision boundary: j i 11
Case II: i= The decision boundary is still linear: 12
Case III: i= arbitrary The decision boundary is no longer linear, but hyperquadrics! 13
Bayesian Learning means “training” n i. e. , estimating some unknowns from “training data” n WHY? n – It is very difficult to specify these unknowns – Hopefully, these unknowns can be recovered from examples collected. 14
Maximum Likelihood Estimation Collected examples D={x 1, x 2, …, xn} n Estimate unknown parameters in the sense that the data likelihood is maximized n Likelihood n Log Likelihood n n ML estimation 15
Case I: unknown 16
Case II: unknown and generalize 17
Bayesian Estimation n n Collected examples D={x 1, x 2, …, xn}, drawn independently from a fixed but unknown distribution p(x) Bayesian learning is to use D to determine p(x|D), i. e. , to learn a p. d. f. p(x) is unknown, but has a parametric form with parameters ~ p( ) Difference from ML: in Bayesian learning, is not a value, but a random variable and we need to recover the distribution of , rather than a single value. 18
Bayesian Estimation n n This is obvious from the total probability rule, i. e. , p(x|D) is a weighted average over all If p( |D) peaks very sharply about some value *, then p(x|D) ~ p(x| *) 19
The Univariate Case n n assume is the only unknown, p(x| )~N( , 2) is a r. v. , assuming a prior p( ) ~ N( 0, 02), i. e. , 0 is the best guess of , and 0 is the uncertainty of it. P( |D) is also a Gaussian for any # of training examples 20
The Univariate Case The best guess for after observing n examples n measures the uncertainty of this guess after observing n examples n=30 p( |x 1, …, xn) n=10 n=5 n=1 p( |D) becomes more and more sharply peaked when observing more and more examples, i. e. , the uncertainty decreases. 21
The Multivariate Case 22
PCA and Eigenface Principal Component Analysis (PCA) ü Eigenface for Face Recognition ü 23
PCA: motivation Pattern vectors are generally confined within some low-dimensional subspaces n Recall the basic idea of the Fourier transform n – A signal is (de)composed of a linear combination of a set of basis signal with different frequencies. 24
PCA: idea e x m xk 25
PCA To maximize e. TSe, we need to select max 26
Algorithm n Learning the principal components from {x 1, x 2, …, xn} 27
PCA for Face Recognition n Training data D={x 1, …, x. M} – Dimension (stacking the pixels together to make a vector of dimension N) – Preprocessing ü cropping ü normalization n n These faces should lie in a “face” subspace Questions: – What is the dimension of this subspace? – How to identify this subspace? – How to use it for recognition? 28
Eigenface The Eigen. Face approach: M. Turk and A. Pentland, 1992 29
An Issue In general, N >> M n However, S, the covariance matrix, is Nx. N! n Difficulties: n – S is ill-conditioned. Rank(S)<<N – The computation of the eigenvalue decomposition of S is expensive when N is large n Solution? 30
Solution I: Let’s do eigenvalue decomposition on ATA, which is a Mx. M matrix n ATAv= v n AATAv= Av n To see is clearly! (AAT) (Av)= (Av) n i. e. , if v is an eigenvector of ATA, then Av is the eigenvector of AAT corresponding to the same eigenvalue! n Note: of course, you need to normalize Av to make it a unit vector 31 n
Solution II: You can simply use SVD (singular value decomposition) n A = [x 1 -m, …, x. M-m] n A = U VT n – A: Nx. M – U: Nx. M UTU=I – : Mx. M diagonal – V: Mx. M VTV=VVT=I 32
Fisher Linear Discrimination LDA ü PCA+LDA for Face Recognition ü 33
When does PCA fail? PCA 34
Linear Discriminant Analysis n Finding an optimal linear mapping W n Catches major difference between classes and discount irrelevant factors n In the mapped space, data are clustered 35
Within/between class scatters 36
Fisher LDA 37
Solution I n If Sw is not singular n You can simply do eigenvalue decomposition on SW-1 SB 38
Solution II n Noticing: – SBW is on the direction of m 1 -m 2 (WHY? ) – We are only concern about the direction of the projection, rather than the scale n We have 39
Multiple Discriminant Analysis 40
Comparing PCA and LDA PCA 41
MDA for Face Recognition Lighting • PCA does not work well! (why? ) • solution: PCA+MDA 42
Independent Component Analysis The cross-talk problem ü ICA ü 43
Cocktail party x 1(t) S 1(t) A t t x 2(t) S 2(t) Can you recover s 1(t) and s 2(t) from x 1(t), x 2(t) and x 3(t)? t t x 3(t) t 44
Formulation Both A and S are unknowns! Can you recover both A and S from X? 45
The Idea n n n y is a linear combination of {si} Recall the central limit theory! A sum of even two independent r. v. is more Gaussian the original r. v. So, ZTS should be more Gaussian than any of {si} In other words, ZTS become least Gaussian when in fact equal to {si} Amazed! 46
Face Recognition: Challenges View 47















































