2013 Scientific Computing Face Recognition Image database: Test image: A: B: Who is this guy? C: D: E: F: Characteristics of FR: • A mode of biometric identification • Easy for human, hard for machine G: 2 2015/4/8 2 2013 Scientific Computing Biometric Identification Identification of people from their physical characteristics, such as • • • • • • • 3 2015/4/8 faces voices fingerprints palm prints hand vein distributions hand shapes and sizes retinal scans 3 2013 Scientific Computing FR via PCA First paper: • M. Turk and A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive Neuroscience, vol. 3, no. 1, pp. 71-86, 1991 Characteristics • Efficient computation • Proven mathematics • Applicable to face detection 4 2015/4/8 4 2013 Scientific Computing Problem Definition Input • A dataset of face images of n person • An unknown person’s face image Output: • Determine the identity of the unknown person 5 2015/4/8 5 2013 Scientific Computing ATT Face Dataset Origin • Olivetti Research Laboratory, 1992~1994 Stats: • 40 subjects, each with 10 images Characteristics 6 2015/4/8 • Same-size photos of black and white • Centered faces of different poses 6 2013 Scientific Computing Face Recognition via PCA Compute Mean Face Select 6 Principal Eigenfaces Facial Signatures Compute Eigenvectors (Eigenfaces) 6 f wi ui Subtract i 1 400 7 400 400 2013 Scientific Computing Steps of Feature Extraction via PCA 3 simple steps: 1. Data preprocessing - Each sample image is rearranged into a column vector of length 112*92=10304. All images are put into a matrix F of size 10304x400. - Mean face is subtracted from each column. 2. PCA - Find the eigenvectors of F*F’. 3. Projection - Select top k eigenvectors with k largest eigenvalues k eigenfaces! - Do projection along these eigenfaces to find new features for classification 8 2015/4/8 8 2013 Scientific Computing Details for Step 2: PCA Problem: FF ' is large,10304x10304! (849MB!) How to compute the eigenvectors of FF ' ? Observation: • • If u is the eigenvector of F’F, then Fu is the eigenvector of FF’. If l is the eigenvalue of F’F, then l is also the eigenvalue of FF’. F ' Fu lu FF' Fu lFu FF' Fu l Fu Note that: 9 2015/4/8 • • FF’ has 10304 eigenvalues. F’F has 400 eigenvalues, corresponding to the 9 400 largest eigenvalues of FF’. 2013 Scientific Computing Details for Step 3: Projection (1/2) Each face (minus the mean) in the training set can be represented as a linear combination of the best k eigenvectors: k f f mean wi ui i 1 Typical eigenfaces when k=4: u1 10 2015/4/8 u2 u3 u4 10 2013 Scientific Computing Details for Step 3: Projection (2/2) Since u1, u2 , u3 , u4 is an orthonormal basis, any face (after mean subtraction) can be represented by this basis: The feature vector of the face is then the new coordinates obtained by: u1T T u2 T T U f T f 0.9571, 0.1945, 0.0461, 0.0586 u3 T u4 11 2015/4/8 11 2013 Scientific Computing Classification Once the features for images are extracted, we can then apply any classification methods to obtain the final recognition results, including • • • • • 12 2015/4/8 Minimum distance classifier Support vector machines Neural networks Quadratic classifier Gaussian mixture models 12 2013 Scientific Computing Face Detection Using Eigenfaces 13 2015/4/8 13 2013 Scientific Computing Distance from Face Space (DFFS) 14 2015/4/8 14 2013 Scientific Computing PCA for ATT Dataset Variance vs. no. of eigenvalues used 15 2015/4/8 16 eigenfaces 15 2013 Scientific Computing PCA for ATT Dataset: Accuracy Accuracy vs. no. of eigenvalues used Accuracy of 98.50% is achieved when the dimensionality is 28. 16 2015/4/8 16 2013 Scientific Computing PCA for ATT Dataset: DFFS 17 2015/4/8 17 2013 Scientific Computing PCA for ATT Dataset: Similarity 18 2015/4/8 18 2013 Scientific Computing PCA for ATT Dataset: Demo Face Recognition via PCA (eigenfaces) load faceData.mat frOpt.method='pca'; frOpt.pcaDim=7; frOpt.plot=1; faceRecogDemo(faceData, frOpt); 19 2015/4/8 19 2013 Scientific Computing PCA+LDA for FR Steps for FR via fisherfaces: 1. 2. 20 2015/4/8 Perform PCA to reduce to 60 dimensions Perform LDA to find the best dimensionality 99.00% when the dimensionality is 14. 20