Fisher Linear discriminant analysis (pag 228) 1 Nell Analisi delle componenti proncipali PCA si trovano quelle componenti utili per la rappresentazione dei dati Tali componenti non sono utili a discriminare i dati Si eliminano componenti che possono essere utili per la discriminazione Ad esempio nel trovare le componenti principali per le lettere O e Q si perderebbe l informazione utile a distinguere le due classi
Fisher Linear discriminant analysis 2 Supponiamo di avere un insieme D di n campioni d- dimensionale x 1,,x n suddivisi in l n 1 esempi nel sotto-insieme D 1 etichettato con ω 1 l n 2 esempi nel sotto-insieme D 2 etichettato con ω 2 Una combinazione lineare degli n vettori x su un vettore generico w y = w t x Ottenendo y 1,,y n e partizionandoli in Y 1 e Y 2
Fisher Linear discriminant analysis 3 A noi interessa trovare la componente w che separa i cluster dopo la proiezione
Fisher Linear discriminant analysis 4 Se indichiamo con m i la media del cluster D i Una misura di quanto i cluster proiettati sono separati è data dalla differenza tra le due medie La distanza è Il nostro obbiettivo è massimizzare questa misura!
Fisher Linear discriminant analysis 5 Ovviamente il massimo deve essere calcolato rispetto alle varianze. Misuriamo la dispersione Pertanto una stima della varianza è data da 1 n ~ ( 2 2 s + s ) 1 ~ 2 Within-class-scatter L analisi discriminante di Fisher trova il massimo della seguente Che non dipende da w
Fisher Linear discriminant analysis 6 Per ottenere J come funzione di w definiamo le due matrici di dispersione (scatter matrices) Within-class-scatter Ricordando che Riscrivendo
Fisher Linear discriminant analysis 7 In modo analogo la differenza delle medie proiettate Dove Quindi riscrivendo J Between-class-scatter Ed un vettore w che massimizza J deve soddisfare
Fisher Linear discriminant analysis 8 Ora bisognerà trovare una soglia per la classificazione. Si ricordi che se p(x ω i ) è Gaussiana w 0 è una costante che include w e prob. a priori Otteniamo quindi un vettore w nella direzione da rendere J massima
Fisher Linear discriminant analysis Caso Analisi discriminante multipla 9
10 Comparing Eigen-face and Fisher Face l PCA (Eigenface) approach maps features to principle subspaces that contains most energy. l Fisher linear discriminating (FLD, Fisherface) approach maps the feature to subspaces that most separate the two classes. Belhumeur, et al. IEEE Trans PAMI, July 1997, pp 771-720 10
Limitations of Eigenfaces Approach Variations in lighting conditions Different lighting conditions for enrolment and query. Bright light causing image saturation. Differences in pose Head orientation - 2D feature distances appear to distort. Expression - Change in feature location and shape.
Linear Discriminant Analysis PCA does not use class information PCA projections are optimal for reconstruction from a low dimensional basis, they may not be optimal from a discrimination standpoint. LDA is an enhancement to PCA Constructs a discriminant subspace that minimizes the scatter between images of same class and maximizes the scatter between different class images
Mean Images Let X 1, X 2,, X c be the face classes in the database and let each face class X i, i = 1,2,,c has k facial images x j, j=1,2,,k. We compute the mean image µ i of each class X i as: 1 µ = k i x j k j= 1 Now, the mean image µ of all the classes in the database can be calculated as: µ = 1 c c i= 1 µ i
Scatter Matrices We calculate within-class scatter matrix as: S W c = i= 1 x X k ( x i k µ )( x µ ) i k i T We calculate the between-class scatter matrix as: c S = ( µ i µ )( µ i µ ) B N i i= 1 T
Multiple Discriminant Analysis We find the projection directions as the matrix W that maximizes W^ = argmaxj(w ) = W T S B W W T S W W This is a generalized Eigenvalue problem where the columns of W are given by the vectors w i that solve S B w i = λ i S W w i
Fisherfaces Singularity problem The within-class scatter is always singular for face recognition This problem is overcome by applying PCA first, which can be called PCA/ LDA
Fisherface Projection We find the product of S W -1 and S B and then compute the Eigenvectors of this product (S W -1 S B ) - AFTER REDUCING THE DIMENSION OF THE FEATURE SPACE. Use same technique as Eigenfaces approach to reduce the dimensionality of scatter matrix to compute eigenvectors. Form a matrix W that represents all eigenvectors of S W -1 S B by placing each eigenvector w i as a column in W. Each face image x j X i can be projected into this face space by the operation p i = W T (x j µ)
Testing Same as Eigenfaces Approach
Variation in lighting Experimental Results
Experimental Results
Experimental Results
Experimental Results
Variations in Facial Expression, Eye Wear, and Lighting
Variations in Facial Expression, Eye Wear, and Lighting
Variations in Facial Expression, Eye Wear, and Lighting
Variations in Facial Expression, Eye Wear, and Lighting
Variations in Facial Expression, Eye Wear, and Lighting
Variations in Facial Expression, Eye Wear, and Lighting
Glasses Recognition Glasses / no glasses recognition
References Turk, M., Pentland, A.: Eigenfaces for recognition. J. Cognitive Neuroscience 3 (1991) 71 86. Belhumeur, P.,Hespanha, J., Kriegman, D.: Eigenfaces vs. Fisherfaces: recognition using class specific linear projection. IEEE Transactions on Pattern Analysis and Machine Intelligence 19 (1997) 711 720.
32 Technical Challenges l Within cluster scattering matrix S W is often singular in face recognition problem since the # of training faces is often smaller than the # of pixels in a face image. 10