Documente Academic
Documente Profesional
Documente Cultură
S. M. Mohsin Raza
Mumajjed Mudassir
Dept. of Electrical and Computer Engineering
Dept. of Electrical and Computer Engineering
Air University Air University
Islamabad, Pakistan Islamabad, Pakistan
Mohsin4451@gmail.com mumajjed@mail.au.edu.pk
Abstract— Over the course of last decade, home security and resolution up to 21x21 pixels is possible [6] and is the most
automation systems have been gaining extreme popularity suitable solution for the controlled environment, which makes
because of the enhancement in the field of science and the it perfect for the guard system of our smart home.
concomitant risks of breaking in the system. This paper envisions In previous research, vast amount of work has been done to
a smart home based on the two independent and emerging make the face recognition technology more reliable and
technologies viz face recognition, for the security purposes, and
accurate. Face recognition has already been done by various
speech recognition, for the automation purposes. Moreover, the
latest work done is discussed briefly and why an offline system different techniques; Principle Component Analysis, Linear
was an urgent need to fill the gap in the recent technology Discriminant Analysis, Local Binary Pattern, Haar-Cascade
protocols introduced in the related field. Security system ensures Classifier, each having a competitive advantage over others
the working of the smart home by taking the image on the [8]. Priyanka and Namrata distinguished the spoof images
ringing of the bell and comparing it with the stored database of from genuine faces by analyzing factors i.e. reflection,
owners in a robust and reliable manner through Raspberry Pi blurriness, chromatic effects and color-density [1]. Kim, Park,
microcontroller and OpenCV. Voice control over the whole house Hong and Chung worked in adjusting the location of the
makes this system effective and efficient which could turn out to camera by the sound localization technique used on the door
be a great charity to handicapped, elder and paralyzed people in
to capture better CCTV footage [2]. To confirm the identity of
the remote areas with no access to internet by a single voice
command in the mic connected to Arduino V3 module. visitor, local communication with the owner’s phone has been
done by many means Zigbee [13], Bluetooth [15], GSM [14]
and UWB [10]. Mrutyunjaya, Chiranjiv, Abhijeet and
Keywords—Offline face detection and recognition,
Raspberry-pi, OpenCV, LBPH, Arduino V3 module. Biswajeet introduced a GSM and FPGA based system to
update the owner about the security of home and ask for the
permission of the entrance of visitors [3]. Nasimuzzaman,
I. INTRODUCTION Shiblee and Srijon used IOT (internet of things) to send the
Security is important for everyone, everywhere, in the world image of the visitor to the owner and to enable the owner to
and due to the emerging technology, risks have been raised communicate back to the visitor by sending a message back on
higher and improvement in safety measurements has become a the door screen [4].
necessity. Home automation is quite a hot debate and has a In the proposed offline system, face is detected and then
high demand due to the helping nature of the technology for recognized by matching the image taken in the real time with
handicapped, paralyzed and elder people. In this paper main the prestored database as also done in [7], without any
focus is to develop an offline smart home by making both face communication with the owner, for a faster, easy to use/install
recognition and speech recognition independent of the internet and cheap system to help technologically uneducated people
connection for the use in remote areas. Many countries are in remote areas. Raspberry-Pi microcontroller is programmed
embracing advanced security systems. Accuracy in the with Python language to work with OpenCV algorithms for
identification is the main concern and this can be achieved by offline face recognition of smart home. Bienvenido Bartido
many different topologies as biometric finger print, key studied different algorithms of OpenCV, i.e. eigenface,
passwords, sensors and facial recognition techniques [12]. fisherface and LBPH, and has discussed that pre-processing
Technology of Face Recognition is beneficial for a wide range techniques, pose and illumination, affect the accuracy of
of applications. Image Detection and recognition of a low- algorithms in hugely different manners and paper mainly
showed that pose and pose + illumination techniques highly different individuals in different lights and with different
improved the speed and threshold of LBPH compared to the angles to be more precise about each individual’s identity.
other algorithms of OpenCV [5]. LBP is used for the
improvement in the accuracy of results
.
Previously, speech recognition has been done by online
Bluetooth [18], Amazon Alexa [11] and Google Assistant [19]
for different purposes in the phones and automation systems.
Milton and Khan created an internet app and GSM network
for home automation [17] but this is quite costly and a
complex system to use/install. Personalized offline voice
recognition introduced by Google Inc happened to be 7 times
faster than the online counterpart [16]. For faster, cheap and
easy to use system; internet independency of smart home is
achieved by using Arduino V3 Module [20]. for speech-to-text
conversion and for the training of voice commands, through a
microphone, and comparison with real time voice orders to
control the working of appliances as commands are not
interpreted rather matched with the prestored commands [9].
Paper is arranged as a pattern of following section: 2)
‘Methodology’ to understand the working of smart home
through flowcharts and briefing of systems and technologies
used, section 3) ‘Results and Discussion’ to have a review of
progress and work done, section 4) ‘Conclusion’ and
‘References’.
II. METHODOLOGY
In Face recognition a real time image is given to the
system and through feature extraction process that image is Fig. 1. Block Diagram of Smart Home
checked against the database already stored in the system.
Features of test image will later be compared to the features of A. Face Recognition
database. Minimum difference in the features will help in
identification of the profile of person in the test image. In the
first phase of making a smart lock system using facial
recognition, raspberry pi 3B (the source hardware) having start
python & open-cv (open source computer vision) was used to
make this work precise and fast. Face detection was done by
using Haar cascade classifiers of open cv, that detected the camera
faces and then the detected faces were being stored by using
python commands in a database. Training was done so that the
images inside the data base were converted to yml file for Face
further use in recognition process. Finally, recognition process
detection
was done by using LBPH while keeping check on a yml file
created during training this process, if the image of the person
in front of the camera matched with the database records,
which meant that the difference of two images did not increase Face No
the given threshold, the door lock would open or else alarm detected
would activate. Face Yes Open
For automation phase, Appliances were controlled by Yes recognized door
offline speech recognition process through Arduino V3
module for speech to text and text to speech conversion and
transferring the packets by using serial communication while Face
Execute
accessing ip addresses of wifi module without internet. As recognition
described in Fig.1, in the project Face recognition technology profile
was installed on the entrance of the house to analyze if the
individual entering the house was an alien or a known entity.
Originally raspberry-pi was trained with the 100 images of 3 end
Fig. 2. Working of Face Recognition System
As shown in Fig.4 in dataset creator and training process
raspberry-pi was given the command of ‘videocapture(0)’ to
take a video and through further commands in python and
OpenCV burnt in the raspberry-pi image was extracted from
the video in which the face was detected by harr cascade
classifier to detect the face like features i.e. eyes, mouth, nose
and ears. For a detected face the ID of the person was asked.
This image was grey scaled and rectangular features of the
face were extracted. 100 images of each ID were captured and
stored under the class of an entered identity in yml file. In
trained database each ID had 100 images with the name of the
individual.
In recognition stage whenever the doorbell rang and the
camera turned on, it detected the face through harr cascade
classifier and if a face is found camera captured the video and
taken image from the video is grey scaled and rectangular
components of the image were extracted and stored in xml
file. Now those yet unrecognized image’s rectangular
components were compared to the rectangular components of
the trained images pre-stored with known IDs in yml file. If
the difference of the features were lesser than the maximum
allowed distance, the known identity of the trained image
closer to the recognized image appeared on the screen and
door opened. On the other hand, if the image did not match
any of the known images an announcement places inside the
house and image was stored for future records and door was
kept closed.