SlideShare a Scribd company logo
1 of 26
FACE RECOGNITION

          By
   Vaishali S. Bansal
   M.Tech Computer
   C.G.P.I.T. Bardoli
LEARNING OBJECTIVES
 THE VERY BASICS :
   What is face recognition?
   Difference between detection & recognition !!!
   The origin and use of this technology ?
   What are the various approaches to recognize a face?


 OUR SELECTED FACE RECOGNITION METHOD :
    Introduction to PCA Based Eigen Face Recognition
     Method.
WHAT IS FACE RECOGNITION?

    “Face Recognition is the task
     of identifying an already
     detected face as a KNOWN
     or UNKNOWN face, and in
     more advanced cases,
     TELLING EXACTLY
     WHO’S IT IS ! “


                             FEATURE
FACE DETECTION                          FACE RECOGNITION
                           EXTRACTION
METHODS FOR FEATURE
EXTRACTION/FACE RECOGNITION
FACE DETECTION V/S FRECOGNITION

                                             Face database



                                                              Output:
                                                              Mr.Chan
                          Face detection   Face recognition
                                                              Prof..Cheng




5   face interface v.2a
THE "PCA" ALGORITHM
 STEP 0: Convert image of training set to image vectors
 A training set consisting of total M images




                                            Each image is of size NxN

     
 STEP 1: Convert image of training set to image vectors

 A training set consisting of total M image
                                               foreach (image in training set)
                                                  {                      1




               Image converted to vector
                                                          NxN Image

                                                                         N
                    ……
                    Ti                                }                      Vector




               • Free vector space
 STEP 2: Normalize the face vectors
           1. Calculate the average face vectors

 A training set consisting of total M image




              Image converted to vector

                                          Calculate average face vector „U‟
                                    U
             ……
                      Ti




              • Free vector space
 STEP 2: Normalize the face vectors
            1. Calculate the average face vectors
            2. Subtract avg face vector from each face vector
 A training set consisting of total M image




               Image converted to vector

                                           Calculate average face vector „U‟
                                     U
               ……                          Then subtract mean(average) face
                       Ti                  vector from EACH face vector to
                                           get to get normalized face vector
                                                    Øi=Ti-U
               • Free vector space
 STEP 2: Normalize the face vectors
            1. Calculate the average face vectors
            2. Subtract avg face vector from each face vector
 A training set consisting of total M image




               Image converted to vector

                                           Øi=Ti-U
                                     U
               ……                          Eg.     a1 – m1
                       Ti
                                                   a2 – m2
                                             Ø1=     .   .
                                                     .   .
               • Free vector space                 a3 – m3
 STEP 3: Calculate the Eigenvectors (Eigenvectors represent the
  variations in the faces )

 A training set consisting of total M image




               Image converted to vector

                                           To calculate the eigenvectors , we
                                     U     need to calculate the covariance
               ……                          vector C
                       Ti
                                           C=A.AT
                                             where A=[Ø1, Ø2, Ø3,… ØM]
               • Free vector space
                                                        N2 X M
 STEP 3: Calculate the Eigenvectors

 A training set consisting of total M image




               Image converted to vector



                                     U
                                               C=A.AT
               ……
                       Ti
                                                  N2 X M   M X N2 = N2 X N2
                                                                Very huge
               • Free vector space                                 matrix
 STEP 3: Calculate the Eigenvectors

 A training set consisting of total M image
                                                           N2 eigenvectors




                                                                         ……


               Image converted to vector



                                     U
                                               C=A.AT
               ……
                       Ti
                                                  N2 X M       M X N2 = N2 X N2
                                                                    Very huge
               • Free vector space                                     matrix
 STEP 3: Calculate the Eigenvectors

 A training set consisting of total M image
                                                          N2 eigenvectors




                                                                         ……


               Image converted to vector


               •                           But we need to find only K
               •                     U     eigenvectors from the above
               ……                          N2 eigenvectors, where K<M
                       Ti
                                           Eg. If N=50 and K=100 , we need to
                                           find 100 eigenvectors from 2500
               • Free vector space         (i.e.N2 ) VERY TIME CONSUMING
 STEP 3: Calculate the Eigenvectors

 A training set consisting of total M image
                                                           N2 eigenvectors




                                                                           ……


               Image converted to vector


               •                           SOLUTION
               •                     U
               ……                          “DIMENSIONALITY REDUCTION”
                       Ti
                                           i.e. Calculate eigenvectors from a
                                           covariance of reduced
               • Free vector space         dimensionality
 STEP 4: Calculating eigenvectors from reduced covariance
               matrix

 A training set consisting of total M image                 M2 eigenvectors




                                                                           ……


                Image converted to vector


                •                              New C=AT .A
                •                      U
                ……                                M XN2        N2 X M = M XM
                          Ti                                             matrix




                • Free vector space
 STEP 5: Select K best eigenfaces such that K<=M and can
 represent the whole training set

     Selected K eigenfaces MUST be in the ORIGINAL dimensionality of the face Vector
      Space
 STEP 6: Convert lower dimension K eigenvectors to
  original face dimensionality
 A training set consisting of total M image
                                               ui = A vi
                                                ui = ith eigenvector in the
                                               higher dimensional space
                                               vi = ith eigenvector in the
                                               lower dimensional space
               Image converted to vector

                                                    100 eigenvectors
               •
               •                     U
               ……
                       Ti
                                                                  ……


               • Free vector space
2500 eigenvectors

                       ui

                  ……



Each 2500 X 1 dimension
  ui = A v i



      =A

    100 eigenvectors

                   vi

                 ……


     Each 100 X 1 dimension
2500 eigenvectors

                              ui

                         ……



       Each 2500 X 1 dimension

yellow colour shows K selected eigenfaces = ui
 STEP 6: Represent each face image a linear
  combination of all K eigenvectors

                                                                    w1
                                                                 Ω= w2
                                                                     :
                                          w of mean face            wk
                                      ∑


    w1             w2            w3             w4          ….           wk




We can say, the above image contains a little bit proportion of all these eigenfaces.
Calculating weight of each eigenface
 The formula for calculating the weight is:
        wi= Øi. Ui

   For Eg.
   w1= Ø1. U1
   w2= Ø2. U2
Recognizing an unknown face
Input image of
UNKNOWN FACE
                                                                     a1 – m1
                    Convert the        r1
                                                     Normaloze the   a2 – m2
                   input image to      r2
                    a face vector                     face vector    .       .
                                        :                                .       .
                                       rk                            a3 – m3




RECOGNIZED AS
                               Is                             Project Normalized
            YES            Distance                              face onto the
                                                NO                eigenspace
                              €>
                           threshold
                              ∂?            UNKNOWN FACE


                                                                    w1
                    Calculate Distance between
                                                                Ω= w2
                  input weight vector and all the
                                                                     :
                   weight vector of training set
                                                                     wk
                           €=|Ω–Ωi|2
                              i=1…M                             Weight vector of
                                                                 input image
Applications..
Thank you…

More Related Content

What's hot

Moshe Guttmann's slides on eigenface
Moshe Guttmann's slides on eigenfaceMoshe Guttmann's slides on eigenface
Moshe Guttmann's slides on eigenfacewolf
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output PrimitivesPrathimaBaliga
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.Mohd Arif
 
Gil Shapira's Active Appearance Model slides
Gil Shapira's Active Appearance Model slidesGil Shapira's Active Appearance Model slides
Gil Shapira's Active Appearance Model slideswolf
 
Tracking Faces using Active Appearance Models
Tracking Faces using Active Appearance ModelsTracking Faces using Active Appearance Models
Tracking Faces using Active Appearance ModelsComponica LLC
 
Output primitives computer graphics c version
Output primitives   computer graphics c versionOutput primitives   computer graphics c version
Output primitives computer graphics c versionMarwa Al-Rikaby
 
Lec02 03 rasterization
Lec02 03 rasterizationLec02 03 rasterization
Lec02 03 rasterizationMaaz Rizwan
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniyaTutorialsDuniya.com
 
Dda line algorithm presentatiion
Dda line algorithm presentatiionDda line algorithm presentatiion
Dda line algorithm presentatiionMuhammadHamza401
 
Bca1040 digital logic
Bca1040   digital logicBca1040   digital logic
Bca1040 digital logicsmumbahelp
 
Eigenfaces In Scala
Eigenfaces In ScalaEigenfaces In Scala
Eigenfaces In ScalaJustin Long
 
scan conversion of point , line and circle
scan conversion of point , line and circlescan conversion of point , line and circle
scan conversion of point , line and circleDivy Kumar Gupta
 

What's hot (20)

Face recognition using LDA
Face recognition using LDAFace recognition using LDA
Face recognition using LDA
 
Lec14 eigenface and fisherface
Lec14 eigenface and fisherfaceLec14 eigenface and fisherface
Lec14 eigenface and fisherface
 
Moshe Guttmann's slides on eigenface
Moshe Guttmann's slides on eigenfaceMoshe Guttmann's slides on eigenface
Moshe Guttmann's slides on eigenface
 
Lda
LdaLda
Lda
 
BTP Presentation
BTP PresentationBTP Presentation
BTP Presentation
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output Primitives
 
Unit 3
Unit 3Unit 3
Unit 3
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.
 
Lect3cg2011
Lect3cg2011Lect3cg2011
Lect3cg2011
 
Gil Shapira's Active Appearance Model slides
Gil Shapira's Active Appearance Model slidesGil Shapira's Active Appearance Model slides
Gil Shapira's Active Appearance Model slides
 
Tracking Faces using Active Appearance Models
Tracking Faces using Active Appearance ModelsTracking Faces using Active Appearance Models
Tracking Faces using Active Appearance Models
 
Output primitives computer graphics c version
Output primitives   computer graphics c versionOutput primitives   computer graphics c version
Output primitives computer graphics c version
 
Lec02 03 rasterization
Lec02 03 rasterizationLec02 03 rasterization
Lec02 03 rasterization
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniya
 
Dda line algorithm presentatiion
Dda line algorithm presentatiionDda line algorithm presentatiion
Dda line algorithm presentatiion
 
Hog
HogHog
Hog
 
Bca1040 digital logic
Bca1040   digital logicBca1040   digital logic
Bca1040 digital logic
 
Lect14 lines+circles
Lect14 lines+circlesLect14 lines+circles
Lect14 lines+circles
 
Eigenfaces In Scala
Eigenfaces In ScalaEigenfaces In Scala
Eigenfaces In Scala
 
scan conversion of point , line and circle
scan conversion of point , line and circlescan conversion of point , line and circle
scan conversion of point , line and circle
 

Similar to Face recognition vaishali

/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon
/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon
/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tenconDr. Jai Sakthi
 
Bouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration ToolboxBouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration ToolboxYuji Oyamada
 
Dimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptxDimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptxRohanBorgalli
 
Face Recognition
Face RecognitionFace Recognition
Face Recognitionlaknatha
 
DimensionalityReduction.pptx
DimensionalityReduction.pptxDimensionalityReduction.pptx
DimensionalityReduction.pptx36rajneekant
 
Iaetsd traffic sign recognition for advanced driver
Iaetsd traffic sign recognition for  advanced driverIaetsd traffic sign recognition for  advanced driver
Iaetsd traffic sign recognition for advanced driverIaetsd Iaetsd
 
Harris corner detector and face recognition
Harris corner detector and face recognitionHarris corner detector and face recognition
Harris corner detector and face recognitionShih Wei Huang
 

Similar to Face recognition vaishali (11)

Lec15 sfm
Lec15 sfmLec15 sfm
Lec15 sfm
 
/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon
/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon
/.Amd mnt/lotus/host/home/jaishakthi/presentation/tencon/tencon
 
Bouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration ToolboxBouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration Toolbox
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 
ppt
pptppt
ppt
 
Dimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptxDimension Reduction Introduction & PCA.pptx
Dimension Reduction Introduction & PCA.pptx
 
CBIR Final project1
CBIR Final project1CBIR Final project1
CBIR Final project1
 
Face Recognition
Face RecognitionFace Recognition
Face Recognition
 
DimensionalityReduction.pptx
DimensionalityReduction.pptxDimensionalityReduction.pptx
DimensionalityReduction.pptx
 
Iaetsd traffic sign recognition for advanced driver
Iaetsd traffic sign recognition for  advanced driverIaetsd traffic sign recognition for  advanced driver
Iaetsd traffic sign recognition for advanced driver
 
Harris corner detector and face recognition
Harris corner detector and face recognitionHarris corner detector and face recognition
Harris corner detector and face recognition
 

Face recognition vaishali

  • 1. FACE RECOGNITION By Vaishali S. Bansal M.Tech Computer C.G.P.I.T. Bardoli
  • 2. LEARNING OBJECTIVES  THE VERY BASICS :  What is face recognition?  Difference between detection & recognition !!!  The origin and use of this technology ?  What are the various approaches to recognize a face?  OUR SELECTED FACE RECOGNITION METHOD :  Introduction to PCA Based Eigen Face Recognition Method.
  • 3. WHAT IS FACE RECOGNITION?  “Face Recognition is the task of identifying an already detected face as a KNOWN or UNKNOWN face, and in more advanced cases, TELLING EXACTLY WHO’S IT IS ! “ FEATURE FACE DETECTION FACE RECOGNITION EXTRACTION
  • 5. FACE DETECTION V/S FRECOGNITION Face database Output: Mr.Chan Face detection Face recognition Prof..Cheng 5 face interface v.2a
  • 7.  STEP 0: Convert image of training set to image vectors  A training set consisting of total M images Each image is of size NxN 
  • 8.  STEP 1: Convert image of training set to image vectors  A training set consisting of total M image foreach (image in training set) { 1 Image converted to vector NxN Image N …… Ti } Vector • Free vector space
  • 9.  STEP 2: Normalize the face vectors 1. Calculate the average face vectors  A training set consisting of total M image Image converted to vector Calculate average face vector „U‟ U …… Ti • Free vector space
  • 10.  STEP 2: Normalize the face vectors 1. Calculate the average face vectors 2. Subtract avg face vector from each face vector  A training set consisting of total M image Image converted to vector Calculate average face vector „U‟ U …… Then subtract mean(average) face Ti vector from EACH face vector to get to get normalized face vector Øi=Ti-U • Free vector space
  • 11.  STEP 2: Normalize the face vectors 1. Calculate the average face vectors 2. Subtract avg face vector from each face vector  A training set consisting of total M image Image converted to vector Øi=Ti-U U …… Eg. a1 – m1 Ti a2 – m2 Ø1= . . . . • Free vector space a3 – m3
  • 12.  STEP 3: Calculate the Eigenvectors (Eigenvectors represent the variations in the faces )  A training set consisting of total M image Image converted to vector To calculate the eigenvectors , we U need to calculate the covariance …… vector C Ti C=A.AT where A=[Ø1, Ø2, Ø3,… ØM] • Free vector space N2 X M
  • 13.  STEP 3: Calculate the Eigenvectors  A training set consisting of total M image Image converted to vector U C=A.AT …… Ti N2 X M M X N2 = N2 X N2 Very huge • Free vector space matrix
  • 14.  STEP 3: Calculate the Eigenvectors  A training set consisting of total M image N2 eigenvectors …… Image converted to vector U C=A.AT …… Ti N2 X M M X N2 = N2 X N2 Very huge • Free vector space matrix
  • 15.  STEP 3: Calculate the Eigenvectors  A training set consisting of total M image N2 eigenvectors …… Image converted to vector • But we need to find only K • U eigenvectors from the above …… N2 eigenvectors, where K<M Ti Eg. If N=50 and K=100 , we need to find 100 eigenvectors from 2500 • Free vector space (i.e.N2 ) VERY TIME CONSUMING
  • 16.  STEP 3: Calculate the Eigenvectors  A training set consisting of total M image N2 eigenvectors …… Image converted to vector • SOLUTION • U …… “DIMENSIONALITY REDUCTION” Ti i.e. Calculate eigenvectors from a covariance of reduced • Free vector space dimensionality
  • 17.  STEP 4: Calculating eigenvectors from reduced covariance matrix  A training set consisting of total M image M2 eigenvectors …… Image converted to vector • New C=AT .A • U …… M XN2 N2 X M = M XM Ti matrix • Free vector space
  • 18.  STEP 5: Select K best eigenfaces such that K<=M and can represent the whole training set  Selected K eigenfaces MUST be in the ORIGINAL dimensionality of the face Vector Space
  • 19.  STEP 6: Convert lower dimension K eigenvectors to original face dimensionality  A training set consisting of total M image ui = A vi ui = ith eigenvector in the higher dimensional space vi = ith eigenvector in the lower dimensional space Image converted to vector 100 eigenvectors • • U …… Ti …… • Free vector space
  • 20. 2500 eigenvectors ui …… Each 2500 X 1 dimension ui = A v i =A 100 eigenvectors vi …… Each 100 X 1 dimension
  • 21. 2500 eigenvectors ui …… Each 2500 X 1 dimension yellow colour shows K selected eigenfaces = ui
  • 22.  STEP 6: Represent each face image a linear combination of all K eigenvectors w1 Ω= w2 : w of mean face wk ∑ w1 w2 w3 w4 …. wk We can say, the above image contains a little bit proportion of all these eigenfaces.
  • 23. Calculating weight of each eigenface  The formula for calculating the weight is: wi= Øi. Ui For Eg.  w1= Ø1. U1  w2= Ø2. U2
  • 24. Recognizing an unknown face Input image of UNKNOWN FACE a1 – m1 Convert the r1 Normaloze the a2 – m2 input image to r2 a face vector face vector . . : . . rk a3 – m3 RECOGNIZED AS Is Project Normalized YES Distance face onto the NO eigenspace €> threshold ∂? UNKNOWN FACE w1 Calculate Distance between Ω= w2 input weight vector and all the : weight vector of training set wk €=|Ω–Ωi|2 i=1…M Weight vector of input image