You are on page 1of 6

International Journal of Scientific Research in Computer Science, Engineering and Information Technology

ISSN : 2456-3307 (www.ijsrcseit.com)


doi : https://doi.org/10.32628/CSEIT228630

Face Recognition Using Facenet Deep Learning Network for


Attendance System
Rutuja Bankar, Nikita Bargat, Isha Hanmante, Prof. Hemlata Dakore
Computer Science Engineering, G. H. Raisoni Institute of Engineering and Technology, Nagpur, Maharastra,
India
ABSTRACT
Face recognition that is technology used for recognizing human faces based on
Article Info certain patterns and re-detect faces in various conditions. Face recognition is
currently becoming popular to be applied in various ways, especially in security
Publication Issue : systems. Various methods of face recognition have been proposed in researches
Volume 8, Issue 6 and increased accuracy is the main goal in the development of face recognition
November-December-2022 methods. FaceNet is one of the new methods in face recognition technology.
This method is based on a deep convolutional network and triplet loss training
Page Number : 458-463 to carry out training data, but the training process requires complex computing
and a long time. By integrating the Tensorflow learning machine and pre-
Article History trained model, the training time needed is much shorter. This research aims to
Accepted: 20 Nov 2022 conduct surveys, test performance, and compare the accuracy of the results of
Published: 05 Dec 2022 recognizing the face of the FaceNet method with various other methods that
have been developed previously. Implementation of the FaceNet method in
research using two types of pre-trained models, namely CASIA-WebFace and
VGGFace2, and tested on various data sets of standard face images that have
been widely used before. From the results of this research experiment, FaceNet
showed excellent results and was superior to other methods. By using VGGFace2
pre-trained models, FaceNet is able to touch 100% accuracy on YALE, JAFFE,
AT & T datasets, Essex faces95, Essex grimace, 99.375% for Essex faces94 dataset
and the worst 77.67% for the faces96 dataset.
Keywords — Face Recognition, Face Detection, FaceNet, Deep Convolutional
Network, TensorFlow, Deep Learning

I. INTRODUCTION recognition methods in the last two decades shows


very rapid progress. Initially, the method was running
Face recognition is one branch of computer science is very slowly with the results of poor accuracy so that
an ability to recognize or identify the person's it cannot be applied daily life until now it can be
identity by analyzing the pattern-based facial applied in real-time by producing excellent accuracy.
contours of human faces. The development of face Currently, face recognition is used as a technology to

Copyright: © the author(s), publisher and licensee Technoscience Academy. This is an open-access article distributed 458
under the terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-
commercial use, distribution, and reproduction in any medium, provided the original work is properly cited
Rutuja Bankar et al Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol., November-December-2022, 8 (6) : 458-463

provide multiple security in various practices like consuming for taking attendance. The main purpose is
verification of identity, access authority, observation, to develop a reliable system by using deep learning.
to replace passwords and identity cards that are no The system will record the attendance of the student
longer safe. The use of face recognition has the automatically by matching from the training data-set.
benefit of verifying personal data because inhuman
faces things like irises, retinas, and faces are very II. METHODOLOGY
unique to each other. FaceNet
FaceNet was built by Google researchers using a Deep
Convolutional Neural Network (DCNN) that maps
images of a person's face into Euclidean spaces
(collections of geometrical points) which are also
called embedding.

Embedding is obtained from the level of similarity


and differences in faces, so that if the face has a
similarity the value will get closer, and if the face is
different the value will get farther.

Face Recognition has many methods in its application


FaceNet is a method that uses deep convolutional
today. For Ex: FaceNet, OpenFace, etc. FaceNet is one
networks to optimize its embedding, compared to
of the uses of face recognition based on Deep
using intermediate bottleneck layers as a test of
Learning. That is a one-shot learning method using
previous deep learning approaches. This method is
Euclidean space to calculate the similarity distance for
called one-shot learning. In more detail, this method
each face. FaceNet is a fairly new method, introduced
can use a small sample of face images to produce the
by Google researches in 2015, using Deep
initial model, and when there are new models, the
Convolutional Network method. In the early 1990s,
initial model can be used without retraining. FaceNet
traditional face recognition systems were not stable
directly trains the face using the Euclidean space
and still did not appear deep learning and had several
where the distance consists of similarities between
errors in real time applications. Nowadays, deep
facial models. When the results of similarities
learning appears and it is especially good for
between face models are obtained, it will be easy to
recognition and detection. Deep learning acts like a
carry out face recognition and classification using
human brain, learning by itself. In deep neural
FaceNet attached become feature vectors.
network architecture, when we create a neural
network, the more the hidden layers (neurons), the
In the training process, FaceNet applies triplets by
better the accuracy. In this paper, FaceNet is used for
matching face to face with the online novel triplet
extracting features from faces. Support vector
mining method. Of course, this triplet consists of a
machine is used for classification. To train the model,
collection of anchor images, where each image
‘triplet loss’ is a loss function. The purpose of the
consists of positive and negative images. Fig. 1 shows
system is to easily know which students are in the
the structural model used in FaceNet. FaceNet
classroom in a short time by implementing an
consists of batch layers as input and deep architecture
automated attendance management system by using
which is deep CNN followed by L2 normalization,
face recognition techniques and to save time
that become the result of face embedding FaceNet

Volume 8, Issue 6, November-December-2022 | http://ijsrcseit.com 459


Rutuja Bankar et al Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol., November-December-2022, 8 (6) : 458-463

also pursued by the triplet loss when the training inputs for face detection and recognition and as well
process. creates multiple copies of the proposed images.
The second neural network, R-Net, is known as the
refine network. It feeds on the proposed image inputs
from P-Net and refines by filtering the false candidate
inputs from the true candidates.
Triplet loss training methods have three main
The third and last neural network, O-Net, does the
elements namely anchor, positive and negative. This
rest of the job. It concludes the operation by finding
triplet loss works by minimizing the distance between
five facial landmarks among the candidate image
anchors positively and maximizing the distance
inputs. A facial landmark contains key features of the
between anchors negatively. Where this positive has
human face.
the same identity as the anchor and negative has a
different identity from the anchor.

FaceNet trains its output directly into concise 128-


dimensional embedding by apply triplet based loss
method depend on LMNN. It formed by two
thumbnails of compared faces and thumbnails that do
not match and the loss aim to distinguish between
Tensorflow
positive and negative pairs using a range of limit.
Using TensorFlow to build face recognition and
Thumbnails were cut tightly on the face field, it
detection models might require effort, but it is worth
didn’t need 2D or 3D adjustment, apart from the ratio
it in the end. As mentioned, TensorFlow is the most
and translation implemented.
used Deep Learning framework and it has pre-trained
models that easily help with image classification. In
Preprocessing
most cases, to generate a model means the
At the preprocessing stage, three processes were
classification of the images only needs to provide a
carried out, namely, detection, resizing, and cropping
similar image which is the positive image. The image
faces using the library's help from Multi-Task
is then trained and retrained through a process
Cascaded Convolutional Neural (MTCNN). Detection
known as anchoring or Transfer Learning. Years back,
was used to determine the position of the face in a
finding that model for training and retraining was
given image which was then realized in the form of a
difficult. Now, TensorFlow has simplified the process.
bounding box. Then implemented the cropping based
Thanks to its huge open-source community, no one
on the bounding box. After obtaining a face image
has to go through the task of generating a model once
would be scaled (resize) according to the input size of
another developer from the other end of the world
the model. The MTCNN algorithm works through the
had done it for all to use.
three neural networks (P-Net, R-Net, and O-Net)
connected to a single cascading neural network that is
Classification
unique to each one of them.
Face recognition classification in this system uses
SVM because it has good performance and is widely
The first neural network, P-Net, is known as the
used in face recognition . SVM works by giving
proposal network. It proposes the candidate image
dividing boundaries to 2 adjacent classes. Margin is
the closest point between Hyperplane and the closest

Volume 8, Issue 6, November-December-2022 | http://ijsrcseit.com 460


Rutuja Bankar et al Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol., November-December-2022, 8 (6) : 458-463

point of each class which is then called the Support


Vector Machine Linear Support Vector Machine
(SVM) is very effective and widely used when
separating face embedding vectors.

By adjusting linear SVM to training data and setting


'kernel' attribute to 'linear'. In making predictions,
will use the probability used to set it to be true. In
classifying the data is divided into 80% training data After collecting the required dataset, we pass it for
and 20% test data. The two groups of data will be the face detection purpose. For face detection, here
processed by training and save the SVM classification we are using MTCNN (Multi-Task Convolutional
model in a file. Classification performance will be Neural Network). MTCNN does both face detection
evaluated using a confusion matrix. and face alignment and the process consists of three
stages of convolutional networks that are able to
III. PROPOSED SYSTEM recognize faces and landmark location such as eyes,
nose and mouth. The MTCNN will detect the faces
The purpose of this work is to implement a system from the given images and extract the features from
that can automatically mark the attendance of the the faces and convert them into unique arrays. Then
students present in a classroom without the those extracted features will be stored in separate files
involvement of the teacher. Here we are introducing for each students with their name as file name. Then
an automatic attendance marking system by face FaceNet model should be loaded into the system and
recognition using FaceNet. The ultimate objective of it will be trained with the extracted features of each
the system is to improve and organize the class students. Get two images from each student’s dataset
attendance system and to decrease the number of for testing and test those images with the FaceNet
errors occurred in the manual process and to provide model. The FaceNet has an accuracy of about 99.63 %,
attendance reports periodically For this proposed which makes this system more accurate. FaceNet
system, initially we have to collect the required takes an image of the person’s face as input and
dataset from the students, which the photos of the outputs a vector of 128 numbers which represent the
students and store them in the database. The students most important features of a face which is called as an
must provide pictures based on the sample pictures. embedding. The FaceNet transforms the face image
The sample should have ten images from different into 128-dimensional vectors and place it in the
angles. These ten images of each student will be Euclidean space and the model thus created is trained
stored in the database with their name/roll no as the for triplet loss to capture the similarities and
file name. These 10 images will be stored in a folder differences on the image dataset provided. Finally the
with their name/roll no. The operations like blurring, SVM (Support Vector Machine Classifier) algorithm is
contrast/brightness, rotation will be applied for each used for the classification of each trained model.
of the images. From the above mentioned ten images
eight images will be taken for the training purpose
and two images will be taken for the testing purpose.
The system can be divided into two phases testing
phase and prediction phase.

Volume 8, Issue 6, November-December-2022 | http://ijsrcseit.com 461


Rutuja Bankar et al Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol., November-December-2022, 8 (6) : 458-463

Thus, it proved to be a more time-saving and secure


system than traditional attendance systems.
We can extend the work in order to implement a
fully-featured attendance system using facial
recognition and marking the attendance in order to
provide a more real-time analysis of attendance data.

V. REFERENCES

[1]. Edwin Jose, Greeshma M., Mithun Haridas T.


A camera will be placed in the classroom, which will P., Supriya M. H, “Face Recognition based
capture an image that containing all the students that Surveillance System Using FaceNet and
present in the classroom, in a regular interval. From MTCNN on Jetson TX2” in 2019 5th
the captured image, faces of each student will be International Conference on Advanced
extracted and then they are encoded with the Computing & Communication Systems
FaceNet model. The result will be passed to the (ICACCS).
trained model for comparison and determining the [2]. Mingjie He, Jie Zhang, Shiguang Shan, Meina
corresponding student. Then we get the names/roll.no Kan, Xilin Chen, “Deformable Face Net for Pose
of the corresponding students as the output for Invariant Face Recognition” in Pattern
marking attendance, which will help us to mark the Recognition.
attendance of the students. The recorded attendance [3]. Timmy Schenkel, Oliver Ringhage, Nicklas
will be stored in the database, which the teacher can Brandin,. “A COMPARATIVE STUDY OF
later access by logging in through the website which FACIAL RECOGNITION TECHNIQUES”
will be available asexcel sheet. Bachelor Degree Project in Information
Technology , Basic level 30 ECTS ,Spring term
2019.
[4]. Ghaith Bouallegue, Ridha Djemal, “EEG person
identification using Facenet, LSTM-RNN and
SVM” in 2020 17th International Multi-
Conference on Systems, Signals & Devices
(SSD'20).
[5]. Kyle Heath, Leonidas Guibas, “FACENET:
TRACKING PEOPLE AND ACQUIRING
CANONICAL FACE IMAGES IN A WIRELESS
IV. CONCLUSION CAMERA SENSOR NETWORK” .
[6]. Augusto F. S. Moura1, Silas S. L. Pereira1 ,
Face Recognition based Attendance System Using Mario W. L. Moreira ́, and Joel J. P. C.
FaceNet and MTCNN was successfully implemented. Rodrigues,”Video Monitoring System using
As a result of this standalone system, the person in Facial Recognition: A Facenet-based Approach”
the dataset was detected and an excel sheet of the in 2020 EEE.
current students was created with an accuracy of

Volume 8, Issue 6, November-December-2022 | http://ijsrcseit.com 462


Rutuja Bankar et al Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol., November-December-2022, 8 (6) : 458-463

[7]. Thida Nyein, Aung Nway Oo, “University posteriori model adaptation. IEEE Transactions
Classroom Attendance System Using FaceNet on Pattern Analysis and Machine Intelligence,
and Support Vector Machine”. 29(4):743–748, April 2007.
[8]. Florian Schroff, Dmitry Kalenichenko, James
Philbin, “FaceNet: A Unified Embedding for Cite this article as :
Face Recognition and Clustering”, CVPR2015.
[9]. S. S. Thomas, S. Gupta and V. K. Subramanian, Rutuja Bankar, Nikita Bargat, Isha Hanmante, Prof.
"Smart surveillance based on video Hemlata Dakore, "Face Recognition Using Facenet
summarization," 2017 IEEE Region 10 Deep Learning Network for Attendance System",
Symposium (TENSYMP), Cochin, 2017, pp. 1-5. International Journal of Scientific Research in
doi: 10.1109/TENCONSpring.2017.8070003 Computer Science, Engineering and Information
[10]. Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li: Technology (IJSRCSEIT), ISSN : 2456-3307, Volume 8
“Joint Face Detection and Alignment using Issue 6, pp. 458-463, November-December 2022.
Multi-task Cascaded Convolutional Networks”, Available at doi :
2016; [http://arxiv.org/abs/1604.02878 https://doi.org/10.32628/CSEIT228630
arXiv:1604.02878]. DOI: Journal URL : https://ijsrcseit.com/CSEIT228630
[https://dx.doi.org/10.1109/LSP.2016.260334210
.1109/LSP.2016.2603342].
[11]. S. D. Shendre, “An Efficient way to Trace
Human by Implementing Face Recognition
Technique using TensorFlow and FaceNet API,”
International Journal for Research in Applied
Science and Engineering Technology, vol. 6, no.
4, pp. 605–608, 2018.
[12]. Z. He, M. Kan, J. Zhang, X. Chen, S. Shan, A
fully end-to-end cascaded cnn for facial
landmark detection, in: IEEE International
Conference on Automatic Face Gesture
Recognition (FG), 2017, pp. 200–207.
[13]. I. Masi, S. Rawls, G. Medioni, P. Natarajan,
Pose-aware face recognition in the wild, in:
IEEE Conference on Computer Vision and
Pattern Recognition (CVPR), 2016, pp. 4838–
4846.
[14]. Gary B. Huang, Manu Ramesh, Tamara Berg,
and Erik Learned- Miller. Labeled Faces in the
Wild: A Database for Studying Face
Recognition in Unconstrained Environments.
University of Massachusetts, Amherst,
Technical Report 07-49, October, 2007.
[15]. S. Marcel, J. R. Mill ́an. Person authentication
using brainwaves (EEG) and maximum a

Volume 8, Issue 6, November-December-2022 | http://ijsrcseit.com 463

You might also like