Conference PaperPDF Available

Integrating Face Recognition Security System with the Internet of Things

Authors:

Figures

Content may be subject to copyright.
Integrating Face Recognition Security System With
the Internet of Things
Ibrahim Mohammad Sayem
Dept. of Computer Science and
Engineering
University of Chittagong
Chittagong, Bangladesh
ibmcsecu@gmail.com
Mohammad Sanaullah
Chowdhury
Dept. of Computer Science and
Engineering
University of Chittagong
Chittagong, Bangladesh
sana1691@gmail.com
Abstract A perennial need for safety in the community depends on
country, city, and district. In some instances, feeling safe is required
on a 24/7 basis. A popular and cost-effective solution based on the
Raspberry Pi has the promise of being both user-friendly and cost-
effective. It pairs the Raspberry Pi to a camera module for face
recognition. It learns to detect those with granted access to the
specified area under protection. Such stored faces are the subject of
system training. If during operation the system recognizes the face in
the dataset, then the camera shows the matching name with a
confidence level possibly granting access, but alternatively it takes a
photo of the subject and sends it as an email notifications warning.
The proposed system can implement face recognition even from poor
quality images performing well over both known and unknown
datasets. Face recognition leverages techniques from the OpenCV
library and is written in the Python language.
Keywords Raspberry Pi, Local Binary Pattern Histograms,
OpenCV, Face Recognition, Gmail Notifications.
I. INTRODUCTION
IoT is commonly the network of interconnected things or
devices which are embedded with sensors, software,
network connectivity and essential electronics that allow
them to gather and transfer data to making them responsive.
CASAGRAS(2008) stated that IoT is defined as A global
network infrastructure, linking physical and virtual objects
through the exploitation of data capture and communication
capabilities[1]. However, Adoption of the Internet of
Things is proceeding more slowly than expected, explained
in an article by Mark Patel, Jason Shangkuan, and
Christopher Thomas(2017)[2].
During the past several years, Face Recognition becomes
extremely essential to have a dependable security system
which can secure our homes, offices, industry, and property
in the safest way possible. A conventional safety system
has a lot of problems and lacking, sometimes they are
unable to provide real-time data. Moreover, Face
Recognition is one of the various popular methods of
biometric technology which can uniquely verify and
identify a person by extracting different facial features
mathematically and uses a different algorithm to recognize
a person. When contrasted to other biometric technologies
such as pattern matching, fingerprint, voice recognition, etc.
Face Recognition achieved significant attention in security
purposes. Besides, Face Recognition based security system
is more natural than other technologies.
Many research has been taking place in this field in recent
few years. Ylber Januzaja, Artan Lumaa, Ymer Januzaja
and Vehbi Ramajb(2015) presented a system Real-time
accessed control based on face recognition using Raspberry
Pi and used OpenCV libraries and python language in order
to achieve high effectiveness[3]. Although some
researchers used machine learning and deep learning based
approach to get much better result, likewise Li Xinhua and
Yu Qian(2015) addressed a system which focused on the
face recognition problem and used deep learning method,
convolution neural network, to solve the problem along
with the Sobel operator to improve the accuracy[4].
Xiang Xu, Wanquan Liu, Ling Li(2014) developed a
system Low-Resolution Face Recognition in Surveillance
Systems that has the ability to detect and recognize known
and unknown face in quite low resolution[5]. The face
recognition can be summed to feature extraction from face
images to get the feature vector first, and put it into a
trained classifier, at last, get the class and finish the
recognition task. More specifically, in our system at first,
we have to take some human faces, then we have to train
them and lastly, we can recognize known and unknown
faces where unknown faces will send via Email. We don't
have to worry about the recordings because pi security
system will send an Email and the system is also user-
friendly.
14
2018 International Conference on Machine Learning and Data Engineering (iCMLDE)
978-1-7281-0404-1/19/$31.00 ©2019 IEEE
DOI 10.1109/iCMLDE.2018.00013
The rest of the paper is structured as follows. In Section II we
briefly describe the system requirements for our application.
In Section III we describe the system architecture and
workflow and evaluate it in Section VI. We conclude the
paper in Section V.
II. SYSTEM REQUIREMENTS
The requirements to build the system are given below:
A. Hardware Requirements:
B. Raspberry Pi 3 Model B+
The main system is installed with Raspberry Pi 3 Model B+. It
is a tiny, affordable credit card size computer which is
connecting with a computer monitor and uses keyboard and
mouse. The Raspberry Pi 3 B+ is a third generation Raspberry
Pi. It requires 2 Amperes of current to power up and can
tolerate up to 5Volts. It has 4× ARM Cortex-A53, 1.2GHz
processor, 10/100 Ethernet, 2.4GHz 802.11n wireless, and
Bluetooth 4.1 Classic. It also has 1GB LPDDR2 RAM and
Broadcom Video Core IV GPU. It has different ports like
HDMI, 3.5mm analog audio-video jack, 4 USB 2.0, Ethernet,
Display Serial Interface (DSI). In our system, we used the
Camera Serial Interface (CSI) for using the Raspberry Pi
camera. It also has Micro SD card slot for entering OS
installed memory card.
C. Raspberry Pi Camera Module V2
For our system, we have chosen the Raspberry Pi Camera
Module V2. The Raspberry Pi Camera Module v2 is an
amazing quality 8 megapixel Sony IMX219 picture sensor
custom composed add-on board for Raspberry Pi, emphasizing
a fixed focus camera. It's fitted with 3280 x 2464 pixels
motionless pictures, and further hold 1080p30, 720p60 and
640x480p90 video. It appends to Pi by means of one of the
little sockets on the board upper surface.
D. Programming Languages: Python
Python is one of the most powerful programming languages in
today's world particularly in the IoT and Machine
Learning(ML) field. Mainly, Raspberry Pi supports two
languages: C++ and Python. In our system, we use Python
because it is an object-oriented, high-level, general-purpose
programming language with dynamic semantics and it is also
interpreted. It is very simple to use, the syntax is easy to learn
and therefore it reduces the program maintenance cost.
E. Software Library: OpenCV
OpenCV (Open Source Computer Vision Library) is an open
source computer vision and machine learning software library.
OpenCV was built to provide a common infrastructure for
computer vision applications and to accelerate the use of
machine perception in the commercial products. It helps in
real-time image processing. OpenCV has C++, Java and
Python and interfaces and holds various OS like Windows,
Linux, Android etc.. It was created for computational edge and
including a robust focus on real-time use. It is Formulated in
C/C++, the library can use multi-core processing. OpenCV
3.3.0 now comes with the very new Face Recognizer class for
face recognition and in our system, we use OpenCV 3.3.0.
F. Email Server: SMTP
Simple Mail Transfer Protocol(SMTP) is a TCP/IP protocol
used for sending and receiving an email which also takes care
of the whole email sending process. But at first, it needs the
correct SMTP settings, in particular, the right SMTP
address(for instance:smtp.gmail.com:587). We use port
number 587 for Raspberry Pi.
III. SYSTEM ARCHITECTURE AND WORK FLOW
Figure 1 describes the overall system architecture of the
proposed system. Moreover, the main goal is to develop a
user-friendly smart security camera using Raspberry Pi to
recognize known and unknown faces which later sends email
alerts for unknown faces. We divided the system architecture
into different parts to show the workflow of the system.
Figure 1. Overall System Architecture
15
Step 1: Raspberry Pi camera is used to take images of people
for further use and these images are saved by giving specific
id in dataset directory. We take 30 pictures of each person.
Step 2: After capturing images there is a pre-processing step
where different operations such as image resize, grayscale
conversion and image enhancement occur. Grayscale
conversion is important because seldom the color information
doesn't help us identify important edges or other features. An
RGB image consists of 3 layers R, G, B and it's a 3-
dimensional matrix so when we convert an RGB picture to
grayscale, we need to take the RGB values for every pixel.
Furthermore, Face images may suffer from illumination,
therefore, image enhancement is necessary to improve the
quality of face image which helps face recognition system to
perform effectively and accurately[6].
Step 3: The primary purpose of face detection algorithms is to
determine whether there is any face in an image or not and it
is the process that can apply to stored images or images from a
camera. Ordinarily, face detection applications use machine
learning methods for detecting human faces within images or
videos. These images might contain any distinct objects which
are not part of images such as trees, buildings and different
parts of humans etc. are ignored from the digital image. While
the process is somewhat complex, face detection algorithms
often begin by searching for human eyes. Furthermore, once
eyes detection process is complete, the algorithm might then
attempt to detect facial regions, including eyebrows, the
mouth, nose, nostrils, and the iris.
Step 4: In this phase, we extract various facial features like as
mouth, eyes, nose, eyebrows etc. from the detected face. There
are three types of feature extraction methods: Generic
methods, Feature template-based methods and Appearance-
based methods.
Step 5: There are different types of face recognition
algorithms, for example, Eigenfaces(1991), Local Binary
Pattern Histograms(LBPH)(1996) and Fisherfaces(1997)[7].
Each method has a different approach to extract the image
information and perform the matching with the input image. In
our system we use LBPH. LBPH uses 4 parameters such as
Radius, Neighbors, Grid X and Grid Y. After that, we train the
algorithm and applying the LBP operation which marks the
pixels of a picture by thresholding the 3-by-3 neighborhood of
every pixel with the focus pixel esteem and considering the
outcome as a parallel number. Then extracting the histograms
which are followed by Face Recognition.
Step 6: Machine Learning (ML) algorithms are often
categorized as supervised or unsupervised. Machine learning
is used to detect patterns in data and adjust program actions
respectively. In our system ML, first look at pictures and find
all faces in it. Furthermore, ML is able to find out the unique
features of different people and then compare the unique
features of all the people we already know.
IV. IMPLEMENTATIONS AND EXPERIMENTAL RESULTS
We use Raspberry Pi 3 Model B as our IoT core and
Raspberry Pi camera module as the system camera also, we
installed OpenCV 3 for face recognition process and all scripts
in our system are written in Python. The implementation of
the proposed system includes the following 4 stages:
1. We capture 30 images of each person by giving them
specific id and applied face detecting process.
2. On the second stage, We train the images by considering
numeric vectors and the final values will be exported to a
YML file called trainer.yml.
3. In the third stage, we will capture a fresh face on our
camera and if this person's face trained before, our recognizer
will make a prediction returning its id and confidence level of
the system.
4. In the final stage, the system will send an email if the
system is unable to recognize the face.
Figure 2: Implementation of the Proposed system
Figure 3 is the result of stage 1 where we gathered data using
the Raspberry Pi Camera module and perform the detecting
process. Images are stored with a specific id for each person.
All images are saved in .jpg format and named as “User”. We
saved all images in the “dataset” directory and during the
image training stage we take all images from “dataset”
directory and after training process is complete we stored it in
“trainer” directory.
16
Figure 3: Dataset Gathering
After the images are being trained, the system is ready to
recognize faces and if any faces are found in the trained file it
will show the name of the person as well as show the results
with a confident label, but if it is not trained it will display
unknown and save it to the unknown directory and the image
is forward through email. Figure 4 shows the result of the Face
Recognition procedure.
Figure 4: Face Recognition
Figure 5 shows the result of email alert in our system. To send
the email we use SMTP server which is a simple mail transfer
protocol and we configure Gmail SMTP server settings to
send email from Raspberry Pi account to any Gmail account.
We send only unrecognized face through email because we
need only those people faces whose are not allowed to enter
any particular area.
Figure 5: Email Alert
V. CONCLUSION AND FUTURE WORKS
Face recognition has great potential in improving security
operatives to better carry out their duties, especially in
emerging countries where this technology is not currently
extensively used. In this paper, we developed a facial
recognition system using a raspberry pi, which is smaller,
lighter and works successfully utilizing the lower control
power with a security alert message to the authorized person
utilities. This system is more convenient than the pc-based
face recognition system. This development system is
affordable, agile, and highly secure and Raspberry Pi takes
limited power and provides enough flexibility to satisfy the
requirement of different people.
However, there is still a lot of scope for improvement. We can
also use this security system by making a required
modification to the system in an area like the banking sector to
provide more security to the lockers, based on their facial
authentication and keep a record of account holders history of
data when and who is entering the lockers.
17
R
EFERENCES
[1] CASAGRAS(2014). RFID and the Inclusive Model for the Internet of
Things. EU Project Number 216803.
[2] Mark Patel, Jason Shangkuan, and Christopher Thomas(2017). Adoption
of the Internet of Things is proceeding more slowly than expected.
Mckinsey&Company article may,2017.
[3] Ylber Januzaja, Artan Lumaa, Ymer Januzaja and Vehbi Ramajb(2015).
Real-time Accessed Control Based on Face Recognition. International
Conference on Network security & Computer Science (ICNSCS-15) June 10-
11, 2015 Antalya (Turkey).
[4] Li Xinhua and Yu Qian(2015). Face Recognition based on Deep Neural
Network. International Journal of Signal Processing, Image Processing and
Pattern Recognition Vol.8, No.10 (2015), pp.29-38.
[5] Xiang Xu, Wanquan Liu, Ling Li(2014). Low Resolution Face
Recognition inSurveillance Systems. Journal of Computer and
Communications, 2014, 2, 70-77.
[6] Rok Novosel, Blaz Meden, Ziga Emersic, Vitomir Struc and Peter
Peer(2017). Face recognition with Raspberry Pi for IoT Environments. 26th
ERK International Electrotechnical and Computer Science Conference · ERK
2017.
[7] Mrutyunjanya Sahani, Subhashree Subudhi and Mihir Narayan
Mohanty(2016). Design of Face Recognition based Embedded Home Security
System. KSII TRANSACTIONS ON INTERNET AND INFORMATION
SYSTEMS VOL. 10, NO. 4, Apr. 2016.
18
... Concerns about students' safety and security at educational institutions have grown over the past few decades. With many students on a college campus, it becomes difficult for the administration to monitor every person entering or leaving the campus manually [1]. The rise of criminal activities such as trespassing, unauthorised access, and theft has made it necessary to implement effective surveillance systems to ensure the safety of students and faculty members. ...
... The algorithms are trained to extract features from images faces and then use these features to recognize faces that match those in the database. Face recognition has many applications, including security [153,154], social media [155], and biometric identification systems [156,157]. ...
Preprint
Full-text available
One of the essential components of deep learning is the choice of the loss function and performance metrics used to train and evaluate models. This paper reviews the most prevalent loss functions and performance measurements in deep learning. We examine the benefits and limits of each technique and illustrate their application to various deep-learning problems. Our review aims to give a comprehensive picture of the different loss functions and performance indicators used in the most common deep learning tasks and help practitioners choose the best method for their specific task.
... A face detection system is a software application that can identify a face given as an image that contains a face. This forms the first step in a face recognition system [7][8]. If a face is detected, the next step is to compare it with the list of known images, if it is in the known images, he user will receive a text message with the name of the image file, otherwise a text message of unknown user is sent. ...
Conference Paper
Today the world has become smart so that the people can communicate easily even from metropolitan cities to remote areas in the world. The modern world's homes have become smarter and more automated as a result of advancements in automation. One of the major challenges is the safety and security of the house. The main objective of this paper is to develop a home automation and to create a smart home security system with the help of IOT which can be remotely accessed by any android phone. In this paper, An IoT-based gas and fire alarm system is proposed, which detects gas and fire early on, produces an automatic alarm, and alerts the remote user about the outbreak. By preventing accidents, the proposed system can assist users in improving their safety standards with immediate response. Furthermore, instead of doorbell a doormat is provided which indicates arrival of a person by using piezoelectric sensor. Also, the easiest way to identify an individual is by their face. Face recognition involves two process, the first being face detection and the second being face recognition. In this paper, face recognition is also done using the programming language, python and its popular computer vision module, Open CV. The gas and fire detection system along with piezoelectric based welcome mat will be simulated using Proteus software and the results will be analyzed. The specification of each and every component is analyzed to make it more effective and compact. The experimental set up has been implemented and the simulations results have been verified with the experimental results.
... OpenCV already has many features, including facial recognition, face tracking, face detection, Kalman filtering, and various types of AI (Artificial Intelligence) methods. It provides a variety of simple algorithms related to Computer Vision for low-level APIs [8], [9]. ...
Chapter
Every place be it a household or organization, big or small, like banks have something that needs to be secured to ensure efficient operations and management. Security is always a concern as what is being protected is valuable. Security systems based on singular or multiple biometrics such as face, voice, iris, fingerprint and palm along with things being carried in person such as RFID card or security key(s) are used along with or instead of pin, password based existing lock systems is mostly used because of the uniqueness and added layer of security provided by the aforementioned features. But the implementation of these features alone is not sufficient to thwart any malicious actions to gain access to a secure location, due to rise in technology capable of beating/bypassing said security systems. Thus, this paper proposes a robust security system that will be take care of security requirements of any location that might contain something valuable and to be retrofitted with the problems prevailing in the present systems. The proposed system is capable of detecting & recognizing a person’s face, their emotion based on facial expression, the liveliness factor of their face to determine physical presence, identifying the speaker along with a word/phrase in their speech and detecting factors in the surrounding environment that may threaten a user. The system is designed in a way such that anyone who wants to enter/access a secure location has to pass through all of these layers like password, facial recognition, facial emotion recognition, facial liveliness recognition, speaker recognition, speaker phrase detection, and environmental threat detection etc. of security working in unison, none of which can be bypassed easily. All the sensors for detecting, identifying and recognizing said biometric features are securely connected to a singular security device to ensure success of this goal.KeywordsSecurityFaceFacial expression and facial liveliness detectionRecognitionSpeaker and speaker safety phrase detectionRecognitionEnvironmental threat detectionRecognitionSmart device
Conference Paper
Full-text available
IoT has seen steady growth over recent years – smart home appliances, smart personal gear, personal assistants and many more. The same is true for the field of bio-metrics where the need for automatic and secure recognition schemes have spurred the development of fingerprint-and face-recognition mechanisms found today in most smart phones and similar hand-held devices. Devices used in the Internet of Things (IoT) are often low-powered with limited computational resources. This means that biomet-ric recognition pipelines aimed at IoT need to be streamlined and as efficient as possible. Towards this end, we describe in this paper how image-based biometrics can be leveraged in an IoT environment using a Raspberry Pi. We present a proof-of-concept web-based information system, secured by a face-recognition procedure, that gives authorized users access to potentially sensitive information .
Article
Full-text available
Home security has become the prime concern for everyone in present scenario. In this work an attempt has been made to develop a home security system which is accessible, affordable and yet effective. The proposed system is based on ‘Remote Embedded Control System’ (RECS) which works both on the web and gsm platform for authentication and monitoring. This system is therefore cost effective as it relies on existing network infrastructure. As PCA is most popular and efficient algorithm for face recognition, it has been usedin this work. Next to it an interface has been developed for communication purpose in the embedded security system through the ZigBee module. Based on this embedded system, automated control of door movement has been implemented through electromagnetic door lock technology. This helps the users to monitor the real-time activities through web services/SMS. The web service consists of either web browser command or e-mail provision. The system establishes the communication between the system and authenticated user. The e-mail received by the system from the authorized person will monitor and control the real-time operation and door lock. The entire control system is reinforced using ARM1176JZF-S microcontroller and tested for actual use in the home environment. The result shows the experimental verification of the proposed system.
Conference Paper
Full-text available
Nowadays the number of thefts and identity fraud has become a serious issue. In order to avoid these thefts and identity fraud, a face recognition system must be established. The scope of this project is to develop a security access control application based on face recognition. The haar-like features is used for face detection and PCA algorithm is used for face recognition. In order to achieve a higher accuracy and effectiveness we use OpenCV libraries and python computer language. Training and identification is done in embedded device known as Raspberry Pi. During our paper we focus on accuracy increment by controlling parameters such as background, light and number of trainings. During our paper we also explicate cost issues of our application compared with commercial applications.
Article
Full-text available
In surveillance systems, the captured facial images are often very small and different from the low-resolution images down-sampled from high-resolution facial images. They generally lead to low performance in face recognition. In this paper, we study specific scenarios of face recognition with surveillance cameras. Three important factors that influence face recognition performance are investigated: type of cameras, distance between the object and camera, and the resolution of the captured face images. Each factor is numerically investigated and analyzed in this paper. Based on these observations, a new approach is proposed for face recognition in real surveillance environment. For a raw video sequence captured by a surveillance camera, image pre-processing techniques are employed to remove the illumination variations for the enhancement of image quality. The face images are further improved through a novel face image super-resolution method. The proposed approach is proven to significantly improve the performance of face recognition as demonstrated by experiments.
Adoption of the Internet of Things is proceeding more slowly than expected
  • Mark Patel
  • Jason Shangkuan
  • Christopher Thomas
Mark Patel, Jason Shangkuan, and Christopher Thomas(2017). Adoption of the Internet of Things is proceeding more slowly than expected. Mckinsey&Company article may,2017.
RFID and the Inclusive Model for the Internet of Things
CASAGRAS(2014). RFID and the Inclusive Model for the Internet of Things. EU Project Number 216803.
Real-time Accessed Control Based on Face Recognition
  • januzaja
Adoption of the Internet of Things is proceeding more slowly than expected
  • patel