4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2...

6
2 3 FACE RECOGNITION 4 FACE RECOGNITION The face is our primary focus of attention in social intercourse, playing a major role in conveying indentity and emotion. Humans can recognize thousands of faces….

Transcript of 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2...

Page 1: 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2 face3 face4 face5 face6 face7 face8. 7 13 FACE RECOGNITION USING PCA and Matlab

2

3

FACE RECOGNITION

4

FACE RECOGNITION

The face is our primary focus of attention in social intercourse, playing a major role in conveying indentity and emotion.

Humans can recognize thousands of faces….

Page 2: 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2 face3 face4 face5 face6 face7 face8. 7 13 FACE RECOGNITION USING PCA and Matlab

3

5

FACE RECOGNITION

6

FACE DETECTION

Page 3: 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2 face3 face4 face5 face6 face7 face8. 7 13 FACE RECOGNITION USING PCA and Matlab

4

7

FACE RECOGNITION BY APPEARANCE (I)

Appearance-based methods rely heavily on the concept of an image space. A two-dimensional image I (x,y ) or any type of visual data (depth maps, flow fields, etc.) may be viewed as a vector (or point) in a very high dimensional space, often called the image space, where each coordinate of the space corresponds to one pixel value of the original image. In general, a grayscale image with r rows and c columnsdescribes a vector x in a m -dimensional image space, where m = r x c . With this image representation, the image becomes a very high dimensional feature vector, and perhaps the simplest classification approach is a nearest neighbor classifier in the image space

8

FACE RECOGNITION BY APPEARANCE (II)

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

26 27 28 29 30

⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜

2550012

232323111221334237621522461233324562342323134153434234131210025512

K

MMMMM

K

K

K

K

K

K

K

K

30 members

Num

ber

of

pix

els

Page 4: 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2 face3 face4 face5 face6 face7 face8. 7 13 FACE RECOGNITION USING PCA and Matlab

5

9

FACE RECOGNITION BY APPEARANCE (III)

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

26 27 28 29 30

?

Face recognition systems can not be directly implementedin such large spaces as the classifiers are slowed down by the great size of the input vector.

10

-2 -1.5 -1 -0.5 0 0.5 1 1.5

x 104

-1.5

-1

-0.5

0

0.5

1

1.5x 10

4

face1face2face3face4face5face6face7face8

FACE RECOGNITION BY APPEARANCE (IV)

*

Page 5: 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2 face3 face4 face5 face6 face7 face8. 7 13 FACE RECOGNITION USING PCA and Matlab

6

11

DIMENSIONALITY REDUCTION

PCA

112x92=10304 2

Reducing the dimensionality of the data, we speed up the computations, without losing too much information.

The most popular technique for dimensionality reduction purposes is Principal Component Analysis (PCA).

12

FACE RECOGNITION USING PCA

1. Acquire an initial set of face images (the training set)

2. Calculate the PCA transform of the training set (compute the eigenvectors-eigenfaces-)

3. Project the training images onto the “eigenspace”

TRAINING

-2 -1.5 -1 -0.5 0 0.5 1 1.5

x 104

-1.5

-1

-0.5

0

0.5

1

1.5x 104

face1face2face3face4face5face6face7face8

Page 6: 4 - Face recognitionyqi/lect/Facerecognition1.pdf · FACE RECOGNITION 4 FACE RECOGNITION ... face2 face3 face4 face5 face6 face7 face8. 7 13 FACE RECOGNITION USING PCA and Matlab

7

13

FACE RECOGNITION USING PCA and Matlab

%data matrix

%each column is a face

X=[x1 x2 x3 x4 x5 x6 x7 x8];

% PCA

[V,D,Average] = pc_evectors(X,Nv);

%projecting the data

P=V'*Xm;

TRAINING (matlab code)

-2 -1.5 -1 -0.5 0 0.5 1 1.5

x 104

-1.5

-1

-0.5

0

0.5

1

1.5x 104

face1face2face3face4face5face6face7face8

14

FACE RECOGNITION USING PCA and Matlab (II)

1. Project the new image onto the“eigenspace”

2. Use a classifier to see which class is nearest to the new face

TEST (TO RECOGNIZE NEW FACES)

classifier.m