Face Detection via PCA

Embed Size (px)

Citation preview

  • 7/27/2019 Face Detection via PCA

    1/25

    Applied Physics 186 Investigative Project

    Presented by: Elexis Mae A. Torres

  • 7/27/2019 Face Detection via PCA

    2/25

    2

  • 7/27/2019 Face Detection via PCA

    3/25

    M. Turk and A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive Neuroscience, vol. 3,

    no. 1, pp. 71-86, 1991, hard copy 3

    Face Recognition

    To establish a computational model that could detect anddistinguish human faces from each other.

    Applications:

    o criminal identification

    o security systemso image and film processing

    o human-computer interaction

  • 7/27/2019 Face Detection via PCA

    4/25

    Sheng Zhang and Matthew Turk (2008) Eigenfaces. Scholarpedia, 3(9):4244. 4

    Face Recognition via PCA

    o Sirovich and Kirby 1987

    used principal components to represent human faces.

    o Turk and Pentland 1991

    extended to face detection and recognition.

  • 7/27/2019 Face Detection via PCA

    5/25

    1Jolliffe, I. (1986). Principal Component Analysis. Springer Verlag. 5

    Principal Components Analysis

    to reduce the dimensionality of a data set consisting of a large number of

    interrelated variables, while retaining as much as possible of the variation present in the

    data set. This is achieved by transforming to a new set of variables, the principal

    components (PCs), which are uncorrelated, and which are ordered so that the first few

    retain most of the variation present in all of the original variables. 1

  • 7/27/2019 Face Detection via PCA

    6/25

    6

  • 7/27/2019 Face Detection via PCA

    7/251Jolliffe, I. (1986). Principal Component Analysis. Springer Verlag. 7

    3 Main Steps

    1. Obtaining a training set

    2. Derivation of eigenfaces via PCA

    3. Face recognition using a test set

  • 7/27/2019 Face Detection via PCA

    8/258

    Training Set

    o consists of five 64x64 grayscaled face images

    o used detectfaces(), imcrop(), imresize()

    o histogram manipulation

    o transformed into a 4096x5 matrix matrix T

  • 7/27/2019 Face Detection via PCA

    9/259

    Derivation of Eigenfaces

    1. calculated for the mean face

    rowmean

    2. subtracted mean face from training set

    A = T - rowmean

    3. derived covariance matrix

    C = ATA4. applied pca() on C

    5. multiplied eigenvectors toA to get eigenfaces

    [ef1,ef2,ef3, ef4]

  • 7/27/2019 Face Detection via PCA

    10/2510

    Recognizing Face Images in Test Set

    1. subtracted mean face from input image

    diffim = inputimrowmean

    2. calculate for the coefficients/weights of each eigenface

    w1 = ef1*diffim

    3. sum up to reconstruct input image

    reim = w1*(u1(i)) + w2*(u2(i)) + w3*(u3(i)) + w4*(u4(i)

  • 7/27/2019 Face Detection via PCA

    11/2511

  • 7/27/2019 Face Detection via PCA

    12/2512

    Training Set

  • 7/27/2019 Face Detection via PCA

    13/2513

    Training Set and Mean Face

  • 7/27/2019 Face Detection via PCA

    14/25

    14

    Difference MatrixA

  • 7/27/2019 Face Detection via PCA

    15/25

    15

    Four Eigenfaces

  • 7/27/2019 Face Detection via PCA

    16/25

    Four Eigenfaces

  • 7/27/2019 Face Detection via PCA

    17/25

    17

    Results and DiscussionTest Set 1

    Face images of people from the training set

    Inputim :

    Reim :

  • 7/27/2019 Face Detection via PCA

    18/25

    18

    Inputim :

    Reim :

    Results and DiscussionTest Set 1

    Face images of people from the training set

  • 7/27/2019 Face Detection via PCA

    19/25

    19

    Results and DiscussionTest Set 1

    Face images of people from the training set

    Inputim :

    Reim :

  • 7/27/2019 Face Detection via PCA

    20/25

    Face images of people NOT in the training set

    20

    Inputim :

    Reim :

    Results and DiscussionTest Set 2

  • 7/27/2019 Face Detection via PCA

    21/25

    21

    Non-faces

    Results and DiscussionTest Set 3

    Inputim :

    Reim :

  • 7/27/2019 Face Detection via PCA

    22/25

    Comparing reconstructed images

    22

    Faces :

    Non-faces :

    Results and DiscussionTesting Set 3

  • 7/27/2019 Face Detection via PCA

    23/25

    23

    SUCCESS

    faces already in the training set

    facial expressions

    face orientation

    FAILURE

    faces not in the training set

    non-faces

  • 7/27/2019 Face Detection via PCA

    24/25

  • 7/27/2019 Face Detection via PCA

    25/25

    25

    Dog:

    http://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb

    2O-yMtGGrh6lG9pSk54b1QQp3-lwi9O

    Earth: http://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-

    FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbN Car: http://www.extremetech.com/wp-

    content/uploads/2012/12/Audi-A1.jpg

    http://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://www.extremetech.com/wp-content/uploads/2012/12/Audi-A1.jpghttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://t0.gstatic.com/images?q=tbn:ANd9GcRwrV9P-FyueuhEkN5he2Oz9N55lAHi2HDtzNOTgbRbUC3R3XbNhttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9Ohttp://t3.gstatic.com/images?q=tbn:ANd9GcQobNsAQ8bS3gtUwccUb2O-yMtGGrh6lG9pSk54b1QQp3-lwi9O