Slides of PCA for face recognition

Download Report

Transcript Slides of PCA for face recognition

2013

Scientific Computing

Face Recognition Image database: A: 2 F:

2020/5/2

G: B: C: D: E: Test image: Who is this guy?

Characteristics of FR:

A mode of biometric identification

Easy for human, hard for machine

2

2013

Scientific Computing

Biometric Identification Identification of people from their physical characteristics, such as

• • • • • • •

faces voices fingerprints palm prints hand vein distributions hand shapes and sizes retinal scans 3

2020/5/2 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

2020/5/2 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

2020/5/2 5

2013

Scientific Computing

ATT Face Dataset 6

Origin

Olivetti Research Laboratory, 1992~1994 Stats:

40 subjects, each with 10 images Characteristics

Same-size photos of black and white

2020/5/2 •

Centered faces of different poses

6

2013

Scientific Computing

Face Recognition via PCA

Compute Mean Face Compute Eigenvectors (Eigenfaces) Select 6 Principal Eigenfaces Subtract Facial Signatures

f

i

6   1

w i u i

7

400 400 400

2013

Scientific Computing

8 Steps of Feature Extraction via PCA

3 simple steps:

2020/5/2

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

2013

Scientific Computing

Details for Step 2: PCA

Problem: is large,10304x10304! (849MB!) How to compute the eigenvectors of ?

Observation:

• •

If u is the eigenvector of F’F, then Fu is the eigenvector of FF’.

If

l

is the eigenvalue eigenvalue of FF’.

of F’F, then

l

is also the

F

'

Fu

 l

u

FF

'

Fu

 l

Fu

FF

'

9

Note that:

2020/5/2 • •

FF’ has 10304 eigenvalues.

F’F has 400 eigenvalues, corresponding to the 400 largest eigenvalues of FF’.

9

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:

f

f mean

i k

  1

w i u i

Typical eigenfaces when k=4:

u

1

u

2

u

3

u

4

10

2020/5/2 10

2013

Scientific Computing

Details for Step 3: Projection (2/2)

 

face (after mean subtraction) can be represented by this basis:

11

The feature vector of the face is then the new coordinates obtained by:

T U f

u

 

u

2

u

3

f

u

4

  

T

2020/5/2 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

• • • • •

Minimum distance classifier Support vector machines Neural networks Quadratic classifier Gaussian mixture models

12

2020/5/2 12

2013

Scientific Computing

Face Detection Using Eigenfaces 13

2020/5/2 13

2013

Scientific Computing

Distance from Face Space (DFFS) 14

2020/5/2 14

2013

Scientific Computing

PCA for ATT Dataset Variance vs. no. of eigenvalues used 16 eigenfaces 15

2020/5/2 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

2020/5/2 16

2013

Scientific Computing

PCA for ATT Dataset: DFFS 17

2020/5/2 17

2013

Scientific Computing

PCA for ATT Dataset: Similarity 18

2020/5/2 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

2020/5/2 19

2013

Scientific Computing

PCA+LDA for FR Steps for FR via fisherfaces: 1.

2.

Perform PCA to reduce to 60 dimensions Perform LDA to find the best dimensionality

99.00% when the dimensionality is 14.

20

2020/5/2 20