Class Based Approach for Face Recognition using Eigen Faces

DOI : 10.17577/IJERTV3IS030219

Download Full-Text PDF Cite this Publication

Text Only Version

Class Based Approach for Face Recognition using Eigen Faces

Harshita Dubey

Electronics & Telecom. Engg.

Maharashtra Institute of Technology Pune, India

Abstract Person identification using facial features has the potential to be implemented in various areas. One of the approaches for face recognition is using Principal component analysis (PCA). The advantage of PCA is the optimized dimensional space of features it provides. This algorithm when applied on the database gives the feature of the images i.e Eigen faces which are further used for recognition of an image. The aim of this paper is to present a class-based approach for face recognition using Eigen faces and analysis for the same.

Index TermsPCA, Face recognition, class-based, Eigen Values, Eigen Vectors, Eigen faces

  1. INTRODUCTION

    Utilizing face as the base for person identification is useful in many applications such as attendance system in schools, colleges and organizations, security systems, etc. To correctly identify the person from his face, the system must incorporate an algorithm which takes in the prominent features of a persons face & identifies him/her correctly. Principal component analysis method is one of the solutions that gives the chance to reduce down the dimensionality and consider only the prominent features of face. These features are the Eigen faces of the image.

    This paper presents the class-based approach for face recognition using Eigen faces and its accuracy analysis. The class-based method incorporates assigning a peculiar set of images a class number each. This means each person will have some class numbers assigned to it. The PCA algorithm [1] is then applied to this database. In class based approach only the highest Eigen Vectors, of the number equal to total number of classes is taken into consideration.

  2. SYSTEM MODEL FOR FACE RECOGNITION

    A training database of 60 images is taken. This database is already stored in the computer hard drive. If the test image is of the person considered in the database then the output will give the name of the person as the matched image, else it will give the output as Error: Image is unknown.

    The step-by-step approach for class-based face recognition system:

    1. Training database with classes

    2. Pre-processing for database

    3. Eigen Values and Eigen Vectors determination

    4. Classes and Selection of Eigen Vectors

    5. Face Recognition

      1. Training database with classes

        For training database, 6 images of each person is taken and total 10 people are considered, so a total of 60 images is present in the database. Two images of front profile, two images of 30o ( left and right profile) and two images of 45o (left and right profile) of each person is taken. A .mat file is loaded with images in one column and the corresponding class number in another.

      2. Pre Processing for Database [4]

        The images stored are resized to a square matrix of 192* 192 pixels. The pre-requisite of PCA is that the image matrix considered must be square.

      3. Eigen Values and Eigen Vectors determination Step1: The training images in the .mat file are say,

        1 ,2 ,3 M

        M=Total number of training images Mean of training images is taken:

        = (1/M) * n (1)

        = Mean of training database

        n= nth Training image

        M= Total number of training images

        Step 2: Subtract mean image from each training image:

        The mean obtained from equation (1) is subtracted from each training image n .

        n = n – , n =1,2,3..M (2)

        n = nth Difference vector after mean subtraction

        = Mean of training database

        n=nth Training image

        Step 3: Calculate covariance matrix.

        The Covariance matrix of n is calculated:

        C= (1/M)* n * n T (3) n=1,2,3M

        C=Covariance matrix of , calculated from equation (2)

        Step 4: Eigen Values and Eigen Vectors determination

        Eigen Values m and Eigen Vectors Vmm. of the covariance matrix C are calculated.

      4. Classes and Selection of Eigen Vectors

        While recognizing a face using Eigen faces approach there is a trade-off between accuracy and number of computations involved. So, an approach to optimize number of computations and accuracy is presented. Instead of taking all the Eigen Vectors into consideration, it is possible to select only significant number of Eigen Vectors, which will serve the purpose of recognizing the image and will also reduce number of computations. The selection of Eigen Vectors will depend on the number of classes that will be considered.

        considered. So, the Eigen faces (Eig_f) will only be chosen with highest values.

        Using the chosen Eigen Vector Vtn , Eigen face matrix (Eig_f) is calculated as:

        Eig_f = n * Vtn (4) Eig_f = Eigen face matrix

        n = nth Difference vector after mean subtraction Vtn= Chosen Eigen Vectors

      5. Face Recognition

    1. Feature vector of Training images is calculated: Train_feature = Eig_f T * (5)

      Train_feature = Feature vector of a training image

      Eig_f T = Eigen face matrix transpose

      = Difference vector after mean subtraction

      For each image in a particular class, Train_feature is calculated. Under a particular class, the Train_feature for all the images in a class are obtained are added. This means, for all classes there will be a unique Train_feature.

    2. An average feature vector (avg_feature) is calculated by dividing the value of the Train_feature of a particular class by number of images present in that class.

      avg_feature=

      (Train_feature) t / (Number of images in that class)

      It is also important to carefully select the classes. Tests were carried out with different number of classes. The results of the same have been put in the Tests and Results section. The class selection with best result (TABLE 1) is explained here. Images with front profile are given a distinctive class number, images with left profile (both 30o&45o) and right profile (both

      t=1,2,3L

      L=number of classes

      Train_feature was obtained from equation (5)

      (6)

      30o & 45o) are given a different class number each. That is the number of classes for each person is three (frontal, left and right). Since, total number of persons considered is 10, the total number of classes is 30.

      Choosing Eigen Vectors:

      The largest Eigen Vectors corresponding to largest Eigen Values were chosen. The number of Eigen vectors chosen is equal to number of classes. The reason for choosing the largest values of Eigen Vectors and Eigen Values is that they contain most of the significant information i.e features of image. Number of Eigen Vectors is equal to the number of classes

      Instead of considering all the feature vectors of training

      database, average feature vector of training database was calculated.

      Thus each class will have a unique avg_feature matrix.

    3. When Test image (T) is input. The mean image is subtracted from the test image and this difference image is operated by Eigen face matrix to obtain the feature vector of test image (Test_feature).

      Test_feature= Eig_f T * (T- ) (7)

    4. The recognition is done by calculating the Euclidean distance between the Test feature and the feature vector of each training database. The minimum of the difference is obtained. This minimum distance indicates the class to which the test image belongs.

      Distmin= min || Test _feature-(avg_feature)i || (8

      Distmin = minimum distance between the test image feature vector and average feature vector of a class

      Test _feature =Feature vector of test image (avg_feature) i = Feature vector of ith class where, i=1,2,3L

      Instead of M (number of training images) number of minimum distance calculations, only L (number of classes) calculations are done, where L<M. Thus, reducing the number of computations.

    5. To recognize if the test image is present in the database, a threshold value £ is determined. If the difference is greater than threshold value £ then the image is not present in database and a message will be popped up asError: Image is unknown. In case the value is less than threshold then, the name of person corresponding to matched class will be displayed.

  3. TESTS AND RESULTS

Figure 2. Test images (100 images)

The training image database consists of 60 images (6 image per person, 10 persons are considered). The images are captured taking into consideration frontal face (2 images per person), left profile (2 images) i.e at 30o (1 image) & 45o(1 image) & right profile (2 images) i.e at 30o (1 image) & 45o (1 image).

Training database:

Figure 1. Training Database of 60 images

In Figure 2, the test images are shown which contain same images as that of the training database i.e 80, with an additional 20 images not present in the training database. Out of these 20 images, 10 images are of the people not considered in the database at all and the other 10 images are of randomly selected people considered in the database, but whose images are not present in the training set.

The tests are conducted considering all the 100 test images in Figure 2. & 60, 30, 20 images which are subset of training database..

  1. Tests conducted for 3 classes:

    (Frontal face, left profile, right profile)

    When 3 classes namely frontal face images of a person is given a class number , left profile and right profile of a person is given a different class number each , the recognition rate for the 100 test images considered is 88% and the performance with other sets of test images is shown in TABLE1.

    TABLE 1. Accuracy Analysis for class-based face recognition considering 3 classes based on left, right and frontal profile

    Number of Training

    Images

    Number of Test Images

    Correct

    Incorrect

    Accuracy

    60

    100

    88

    12

    88%

    60

    60

    60

    0

    100%

    60

    30

    30

    0

    100%

    60

    20

    20

    0

    100%

  2. Tests conducted for 3 classes based on angles:

    (Frontal face, 30o (Both left & right), 45o (Both left & right) )

    In this test, each person is allotted 3 classes with one for frontal profile, one for 30o and one for 45o. TABLE 2 gives the accuracy analysis for the classes in consideration.

    TABLE 2. Accuracy Analysis for class-based face recognition considering 3 classes based on angles

    Number of

    Training Images

    Number of Test Images

    Correct

    Incorrect

    Accuracy

    60

    100

    78

    22

    78%

    60

    60

    54

    6

    90%

    60

    30

    30

    0

    100%

    60

    20

    20

    0

    100%

  3. Tests conducted for 2 classes based on angles (Frontal face , 45o (Both left & right))

    Only two classes per person is considered in this test, one for frontal face and one for 45o profile (both left and right). The reason for choosing 45o was that instead of going for extreme angles like 90 o , 45o is the mid-way which gives a part of features of front and 90 o . And helps in identifying 90 o side profile and front profile more accurately than other angles.

    However, with only two classes per person the accuracy reduces even though the number of computations will be less as the numbers of classes considered are less.

    TABLE 3. Accuracy Analysis for class-based face recognition using 2 classes

  4. Tests conducted for one class based on frontal profile: (Frontal face)

When only one class per person corresponding to only frontal face is considered the recognition of other angles reduces lowering the accuracy rate.

TABLE 4. Accuracy Analysis for class-based face recognition using 2 classes

Number of Training

Images

Number of Test Images

Correct

Incorrect

Accuracy

60

100

45

55

45%

60

60

38

22

63.33%

60

30

17

13

56.67%

60

20

12

8

60%

From the four test results, it is observed that the 3 classes considered with left and right profile with two angles (30o & 45o) gives the best recognition rate of all. The Test 2 conducted with 3 classes, each corresponding to a different angle i.e frontal, 30o and 45o gives lesser accuracy than Test 1. The accuracy keeps decreasing with lesser number of classes considered The accuracy was least when only one class with frontal profile was considered.

REFERENCES

[1.] Prof. V.P Kshirsagar, M. R Baviskar, M.E. Gaikwad, Face Recognition Using Eigen Faces, IEEE Computer Society, 2011

[2.] anarthany Nagendrarajah., Recognition of Expression Variant Faces- Principle Component Analysis Based Approach for Access Control,

IEEE Computer Society, 2010

[3.] Turk M. and Pentland A, Eigenfaces for recognition, Vision and Modelling Group, Massachussets Institute of Technology, 1991

[4.] Kyungnam Kim, Face Recognition using Principle Component Analysis,

University of Maryland, College Park, USA, IJERT, 2010

[5.] H.Spies & I.Rickets Face Recognition using Fourier Space, Interdisciplinary enter for scientific computing University Of Heidelberg, IJERT, 2009

Number of Training

Images

Number of Test Images

Correct

Incorrect

Accuracy

60

100

74

26

74%

60

60

48

12

80%

60

30

24

6

80%

60

20

18

2

90%

Leave a Reply