0% found this document useful (0 votes)
11 views

Unique Face Identification System Using Machine Learning

Uploaded by

dishasatere28
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Unique Face Identification System Using Machine Learning

Uploaded by

dishasatere28
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA-2020)

IEEE Xplore Part Number: CFP20N67-ART; ISBN: 978-1-7281-5374-2

Unique Face Identification System using Machine


Learning
Vaishnavi Chawda1, Vandana Arya2, Shuchi Pandey3, Shristi4, Manohar Valleti5

1,2,3,4,5
Department of Electronics and Communication Engineering
CMR Institute of Technology, Bengaluru, 560037, India.
1
[email protected], [email protected], [email protected], [email protected]
5
Assistant Professor: [email protected]

Abstract— The recognition of human faces plays an important Various face recognition (FR) techniques are used, such
role in many applications, for example in video surveillance and as common face detection methods and adaptive regional
the management of facial image databases. This paper will design mixed matching methods. Most of the features of the FR
and implement a security system based on a machine learning system are based on various nodes in the human face.
algorithms. Principal Component Analysis (PCA) is the Measured values for face-related variables help to uniquely
algorithm that represents the faces economically. It extracts the
identify a person. This technology allows the application to
most dominant Eigenfaces from the present set of the faces.
Comparison of video frames can be done by using this technique. accurately and quickly identify the target individual using
Faces can be recognized in frames using the haar cascade to face-to-face data.
extract the characteristics of a human face. The SVM algorithm
is used to classify between data sets using the kernel. The The recognition of the face has many advantages. It is
performance of the identification system also depends on the contactless compared to other biometric techniques. Face
extraction of the attributes and their classification in order to images can be taken and analyzed remotely without ever
obtain accurate results. These algorithms give different accuracy requiring user / person interaction. No user can successfully
rates under different conditions, as observed experimentally. The imitate another person as a unique machine learning face
precision and efficiency with which the model identifies people is
recognition system. Face recognition can serve as an excellent
the real added value of this paper.
safety measure for recording time and attendance. Face
Keywords—ML, Facial recognition, Haar cascade, PCA, SVM, recognition is also a low-cost technology, as it requires less
Eigen faces. processing than other biometric techniques. Face recognition
technology is rapidly evolving with new approaches to 3D
I. INTRODUCTION modeling to overcome the problems of existing technology

M achine learning is an area derived from artificial [12].


intelligence (AI). AI created modern and intelligent
machines. With the quick development of artificial Face recognition has great potential for use in government
intelligence in past few years, face recognition (FR) is gaining agencies, public institutions, security, e-commerce, retail,
more attention. Compared to traditional fingerprint education and many other areas. More and more security
recognition, iris recognition and card recognition, FR offers incidents have triggered a feeling of insecurity among
numerous advantages, those are high parallelism, non-contact individuals and companies. They do what is feasible and
and ease of use. Facial knowledge in biometric software can affordable for them to feel more secure. The installation of
accurately identify people by comparing and analyzing face security systems at home and in the office is a first protective
based models. It is used mainly for safety and security. In fact, layer against security threats. The present systems, which are
face-to-face technology has obtained considerable recognition used to recognize faces from videos, are more expensive. The
as it has a broad range of applications [1]. traditional method of recognizing and identifying people is a
manual method that is very time consuming and requires more
With the help of ML, our own neural network did not effort for people. In this project, a security system is designed
have to be set up and have access to a trained model that can and implemented based on machine-learning algorithms.
be used [4]. It does exactly what a series of numbers (face Therefore, designing and implementing a system is suggested
encodings) need to be printed when the image of someone’s that identifies and recognizes faces using effective techniques
faces is passed; If you compare the face encodings of faces that can be most effective for humanity.
from different images, you can determine whether a person's
face matches a person pictures of [1].

978-1-7281-5374-2/20/$31.00 ©2020 IEEE 701


Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on September 02,2024 at 09:29:57 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA-2020)
IEEE Xplore Part Number: CFP20N67-ART; ISBN: 978-1-7281-5374-2

The remaining paper is planned as follows. In the next A. Haar cascades


section, a Literature review has been discussed. Section 3 talks Real-time video identification system identifies and
about various stages, starting with Haar Cascade, Dataset detects faces from a stream of images using Haar cascade
generation followed by Principle Component Analysis and filters. When the camera starts to work, Haar filters work with
Support Vector Machine. In Section 4, the experimental the camera to detect a face from the entire region of the image.
results have been detailed out. And the last section is the Fig. 1 shows some of the Haar filters which are used for
conclusion. detecting faces [8].
II. LITERATURE REVIEW Edge filter
The unique technology of the identification system was
originally developed for the purpose of security surveillance in Line filter
order to anticipate various functions such as detection of
crime, theft, robbery, etc. The present systems, which are used
Fig. 1. Haar filters
to recognize faces from videos, are more expensive. The
traditional method of recognizing and identifying people is a .
manual method that is very time consuming and requires more The Haar filters works on black and white pixels, so the
effort for people. image must be changed to a black and white image. Fig. 2
shows how these filters work on the image to detect a face. A
In the domain of FR, different tools have been described rectangular region is defined as a search operation. This box
and implemented. Principle component analysis (PCA) is one starts to search from the top left corner of the image and
of the first effective and best analyzes approach to the FR proceeds in a linear manner [2].
domain [13]. This approach takes the entire picture as a
vector and uses it to produce statistical information. This
brings all of the image vectors together and creates an image
matrix and then the Eigenvectors of this equation will be
calculated. The images on the face can then be represented as
a linear solution.

Teddy M et al. says the process of FR with the Haar


Cascade and Eigenface method is capable of optimizing facial
recognition with more than one face with good accuracy [14].
Support vector machines (SVMs) based on statistical learning
theory have been proposed as a new intelligence technique for
Fig. 2. Haar filters for face detection
both regression and classification tasks. The design of SVM
follows the concept of structural risk minimization (SRM), As shown in fig. 2 human eyebrows were detected using
which has been shown to be superior to the conventional horizontal line filters. The eyebrows were found because the
theory of empirical risk minimization (ERM) used by neural hair color has darker pixels and the surrounding area has
networks [16]. lighter pixels. As well as the nose is composed of brighter
pixels on the length of the nose and dark pixels on the
surrounding area, hence, it is identified by vertical line filters.
III. METHODOLOGY
The system successfully detects a face when all such features
When a camera is operating it captures images of the like eyebrows, nose and lips are detected inside the defined
person to create a database. The further process can be carried rectangular box [2].
out by preparing the dataset, recognizing faces and pre-
processing the taken picture [11]. The technique starts when B. Dataset generation
the basic image is taken. The next process followed is In this experiment, each face with a unique id is taken with
database development, face recognition, preprocessing, feature multiple images and are stored in the desired location. To
extraction, and classification phases. Faces can be recognized generate a dataset for each id, a total number of different
from frames by using Haar cascade to extract specific facial images taken is 101. For example, a person has a face Id as 1,
features. Haar Cascade is basically a classifier used to will have 101 images stored in the database of the system.
determine objects that are trained from the source. Haar Below figure shows the dataset that is generated by taking
sequences are trained by superimposing positive images on a multiple images.
series of negative images [2]. The features are extracted using
PCA, which are known as Eigenfaces. These Eigenfaces are
compared with images present in the database [7]. Support
Vector machine (SVM) performs the classification with the
Eigenfaces. The performance of an identification system also
depends on the extraction of the characteristics and their
classification in order to obtain exact results [10]. By
extracting and classifying facial features, a person can be
identified based on the train and test sets prepared by the
algorithm [7].
Fig. 3. Dataset generation

978-1-7281-5374-2/20/$31.00 ©2020 IEEE 702


Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on September 02,2024 at 09:29:57 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA-2020)
IEEE Xplore Part Number: CFP20N67-ART; ISBN: 978-1-7281-5374-2

𝐴 = {𝑞1 , 𝑞2 , 𝑞3 … } (3)
Open camera and haar cascade xml file
Where, q = normalized face with unique feature / Eigenfaces
A = set of Eigenfaces
Enter face Id

Count = 0

If count <= Fig. 5. Eigen faces


101
True 3) Creation of Eigenvector
False Eigenvector is computed from the covariance matrix which
is computed as:
Convert image into grey scale

C = 𝐴𝐴T where 𝐴 = {𝑞1 , 𝑞2 , 𝑞3 … } (4)


Store the images and increment count by
one Where, A = Eigen faces.
AT = transform of A.
C = Covariance matrix
Turn off camera and release the camera

Arranging the matrix in decreasing order, topmost vector


Fig. 4. Flow chart for dataset generation will be having, the Eigenvector with highest Eigen value. This
will be final principle component. Once the Eigenfaces are
Each image will have different facial expression of the obtained it will be split into train and test datasets. The
person so that the person will be identified even when he is training and testing datasets contains 75% and 25% of the total
changing his facial expressions.
available Eigenfaces respectively.
C. Applying Principle Component Analysis algorithm
Dataset generated
This algorithm was introduced to overcome the overfitting Turn the dataset into array
problem that occurs when a model tries to predict a trend in
very crowded data. This is the result of a very complex model
with many parameters [6]. A model that studies noise rather Split array into train and test sets
than signal is considered “overfit” because it matches the
training dataset but is not suitable for new datasets [3]. Here
PCA is used in the form of dimensionality reduction for Apply PCA () module on train
test set
extracting Eigenface. Eigenfaces are the facial images which
contain dominant features of a face as shown in fig. 5. Steps Eigen faces
for computing PCA algorithm are described below [7]. Apply transform () module on
train and test set
1) Calculating mean of faces
The first step is to calculate the mean of images which
Fig .6. Flow chart for PCA
takes the features shared by all the images. Consider a set of
faces: D. Support Vector Machine
SVM is used for classification between the Eigenfaces.
𝑋 = {𝑥1 , 𝑥2 , 𝑥3 , . . } (1) The classifier searches for support vector which are Eigen
faces here, just near to the support-vector of the other class.
Where, x = faces captured
X = set of faces captured for a single person This process is done for all the classes and a boundary is
drawn in between which is known as a hyperplane. As shown
2) Normalization in the fig. 7 and fig. 9 there is a positive and negative
Faces are normalized by subtracting the mean face from hyperplane. The distance between these two should be such
each of the faces. These normalized faces give unique features that it should have maximum margin and the corresponding
which are nothing but the Eigenfaces. Normalized value is hyperplane is called a maximum hyperplane. This algorithm is
calculated as follows. specifically called linear support vector machine (LSVM)
because the classes can be easily classified by drawing a
𝑞 =𝑥−𝑚 (2) straight line as shown in fig.7. For some data sets, it’s almost
impossible to draw a single line to classify the classes, for this
Where, q = unique feature of a face / Eigenface a transformation is applied on the dataset. A function can be
x = face capture used to transform our data into a higher dimensional feature
m = mean face
space [9].

978-1-7281-5374-2/20/$31.00 ©2020 IEEE 703


Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on September 02,2024 at 09:29:57 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA-2020)
IEEE Xplore Part Number: CFP20N67-ART; ISBN: 978-1-7281-5374-2

Fig. 7. Segregation of two classes using SVM Fig. 11. Non-linear classification

Figure 11. shows classification of classes in a nonlinear


Adjust kernel parameters for SVM
environment.

IV. EXPERIMENTAL RESULTS


Apply svc () module on
Eigen faces with the kernel The system displays the image of a person with its true and
parameters the predicted name. When a person comes in front of the
camera, images are captured and stored in the database. PCA
and SVM algorithms are applied on this database for
Apply predict () on test set extracting Eigenfaces and classification respectively. The
output of the system is shown below with a true name taken
directly from the database and predicted name which is
obtained by the algorithms.
Display the images in
test set with predicted
names and true names

Fig .8. Flow chart for SVM

A kernel function also called a kernel trick, is defined as a


function that uses inputs as a vector in the original space and
returns the product point vector in the feature space. This core
function is used to apply the point product between two
vectors so that each point is assigned to a larger dimension
space through multiple transformations [1], as shown in the
fig. 10.

Fig. 12. Output of the system

The model accuracy is tested based on a different number


of faces and different Eigenfaces.
A. Different number of eigenfaces
For this comparison different number of Eigenfaces are
Fig. 9. Linear classification
taken when number of faces is kept three.

TABLE 1

Number of Eigen faces Accuracy obtained


75 99
150 97
200 67
Input space feature space
Table 1 shows system accuracy with different number of
Fig. 10. Transformation for non-linear classification Eigenfaces.

978-1-7281-5374-2/20/$31.00 ©2020 IEEE 704


Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on September 02,2024 at 09:29:57 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA-2020)
IEEE Xplore Part Number: CFP20N67-ART; ISBN: 978-1-7281-5374-2

From the above two cases, it can be concluded that


desired accuracy can be maintained by keeping the count of
Eigenfaces low and have seen that the accuracy was
decreasing when the count of Eigenfaces was increasing.
Also, cases are shown when the number of faces increases
keeping the number of Eigenfaces as constant. With three
faces, Accuracy was less compared to when there were four
faces. With these results, the count of Eigenfaces plays a vital
in deciding the accuracy of the classification can be
concluded. It has to be adjusted such that it is not too low
when the classifier does not get enough faces for
Fig. 13. Graph representing the accuracy with different Eigenfaces
classification and too high when it may get confused.
V. CONCLUSION
Fig. 13 shows the system accuracy when Eigenfaces
present are 75, 150 and 200 and the obtained accuracy are 99, This system uses Haar filters for face detection which can
97 and 67 respectively. From the above Table, it is clear that properly detect a face from an image. PCA algorithm gives
the accuracy of the system decreases as the number of Eigenfaces with unique feature for each face and works with
Eigenfaces is increased because the system may get confused SVM algorithm for classification between them. Eigenfaces,
between faces when multiple Eigenfaces are present. being the dominant feature of a person gives better results
while comparing with the faces present in the dataset. SVM
B. Different number of faces performs the classification with the Eigenfaces in a nonlinear
In this section, the accuracy is compared where a different environment and predict the name of a person based on
number of faces are present. The Eigenfaces in this case are classification results. Eigenfaces play a major role in deciding
kept 75. the classifier accuracy. It has to be adjusted such that it is not
too low when the classifier does not get enough faces for
TABLE 2 classification and too high when it may get confused. The
suggested system gives better accuracy for unique
Number of faces Accuracy identification due to Eigenfaces and their classification with
2 100 SVM classifier.
3 99
REFERENCES
4 100
[1] Classification Mechanism of Support Vector Machines Chen Junli
Jiao Licheng Key Lab. for Radar Signal Processing, Xidian Univ., Xi’an
710071, China
The above table represents the accuracy of the system when
a different number of faces are present i.e. when the system has [2] Article on Applying the Haar-cascade Algorithm for Detecting Safety
Equipment in Safety Management Systems for Multiple Working
a database of three persons, accuracy is 99% and with database Environments.
of four persons, it is 100%. [3] Overfitting and Underfitting Analysis for Deep Learning Based End-to-
end Communication Systems. School of Electronics and Information
Technology, Sun Yat-sen University, Guangzhou, China.
[4] Bashar, A. (2019),”Survey On Evolving Deep Learning Neural Network
Architectures”, Journal of Artificial Intelligence, 1(02), 73-82.
[5] Jacob, I. J. (2019),”Capsule Network Based Biometric Recognition
System”. Journal of Artificial Intelligence, 1(02), 83-94.
[6] Evaluation of face recognition technique using PCA wavelets and SVM.
Istanbul university, engineering faculty, computer engineering
department, 34320, Avcilar, Istanbul, Turkey.
[7] Data Analysis Using Principal Component Analysis, 2014 International
Conference on Medical Imaging, m-Health and Emerging
Communication Systems (MedCom).
[8] Evaluation of Haar Cascade Classifiers Designed for Face Detection,
World Academy of Science, Engineering and Technology International
Journal of Computer, Electrical, Automation, Control and Information
Engineering Vol:6, No:4, 2012
[9] Face Detection and Recognition using Support Vector Machine,
International Journal of Engineering and Advanced Technology (IJEAT)
ISSN: 2249 – 8958, Volume-8 Issue-4, April, 2019.
[10] Data classification using support vector machine, Journal of Theoretical
and Applied Information Technology
Fig. 14. Graph representing accuracy when a different number of person ids [11] Face Recognition Using Principal Component Analysis Method,
are present inside the system. International Journal of Advanced Research in Computer Engineering &
Technology (IJARCET) Volume 1, Issue 9, November 2012
According to the table, accuracy with two faces is 100% [12] Real Time Face Recognition System (RTFRS), 4 th International
symposium on digital forensics and security, Little Rock AR.
as less Eigenfaces will be present for classification, hence
[13] W. Zhao, R. Chellappa, A. Krishnaswamy, Discriminant analysis of
better will be the performance of classifier. When three faces principalcomponents for face recognition, in: Third IEEE International
are present for classification, accuracy obtained is 99% and Conference onAutomatic Face and Gesture Recognition, 1998, pp. 336–
with four faces present inside the system, accuracy is 100%. 341.

978-1-7281-5374-2/20/$31.00 ©2020 IEEE 705


Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on September 02,2024 at 09:29:57 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA-2020)
IEEE Xplore Part Number: CFP20N67-ART; ISBN: 978-1-7281-5374-2

[14] T. Mantoro, M. A. Ayu and Suhendi, "Multi-Faces Recognition Process of Artificial Intelligence and Information Technology (ICAIIT),
Using Haar Cascades and Eigenface Methods," 2018 6th International Yogyakarta, Indonesia, 2019, pp. 6-9.
Conference on Multimedia Computing and Systems (ICMCS), Rabat, [16] A. Al-Anazi, I.D. Gates, A support vector machine algorithm to classify
2018, pp. 1-5, doi: 10.1109/ICMCS.2018.8525935. lithofacies and model permeability in heterogeneous reservoirs,
[15] A. Priadana and M. Habibi, "Face Detection using Haar Cascades to Engineering Geology, Volume 114, Issues 3–4, 2010, Pages 267-277,
Filter Selfie Face Image on Instagram," 2019 International Conference ISSN 0013-7952.

978-1-7281-5374-2/20/$31.00 ©2020 IEEE 706


Authorized licensed use limited to: Ramarao Adik Institute of Technology. Downloaded on September 02,2024 at 09:29:57 UTC from IEEE Xplore. Restrictions apply.

You might also like