Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
36 views

Design and Implementation of A Face Recognition Based Door Access Security System Using Raspberry Pi

In a smart security system, automatic face recognition is the most challenging task from the past decade in computer vision. The applications of computer vision and face recognition have increased day by day with new dimensions and new positive impacts in our society. However some of the systems can’t identify and recognize any person through the blur conditions, illumination and lightings are the major problems.

Uploaded by

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

Design and Implementation of A Face Recognition Based Door Access Security System Using Raspberry Pi

In a smart security system, automatic face recognition is the most challenging task from the past decade in computer vision. The applications of computer vision and face recognition have increased day by day with new dimensions and new positive impacts in our society. However some of the systems can’t identify and recognize any person through the blur conditions, illumination and lightings are the major problems.

Uploaded by

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

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 08 Issue: 11 | Nov 2021 www.irjet.net p-ISSN: 2395-0072

DESIGN AND IMPLEMENTATION OF A FACE RECOGNITION BASED DOOR


ACCESS SECURITY SYSTEM USING RASPBERRY PI
Md. Faishal Rahaman [0000-0001-5656-1542]1*, Md. Abdullah Al Noman2, Muhammad Liakat Ali3,
Mahfuzur Rahman4
1, 4 Department of Electrical & Electronic Engineering, Southern University Bangladesh, Chittagong, Bangladesh.
2, 3School of Mechanical Engineering, Beijing Institute of Technology, Beijing, China.
----------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - In a smart security system, automatic face The face recognition system is that the hottest process of
recognition is the most challenging task from the past decade identification of a known person by his various image data.
in computer vision. The applications of computer vision and During this system, the pc will compare the person standing
face recognition have increased day by day with new before the camera with its storage image files. If the face
dimensions and new positive impacts in our society. However matched with the database files, then it'll recognize the
some of the systems can’t identify and recognize any person person by its ID or name. If it doesn't then match, then the
through the blur conditions, illumination and lightings are the person is going to be unrecognized. For creating the face
major problems. The authors have proposed a system in this detection and recognition program most people prefer to use
paper that can operate different lightings and identify faces Python because of its libraries and applications in deep
from various angles. It stored various datasets of known learning and machine learning fields.
persons to identify the compatibility of the system in different Automated face recognition is a motivating computer vision
conditions. problem with many commercial and enforcement
applications. Mugshot matching, user verification, and user
Key Words: Face recognition, Computer vision, Security access control, crowd surveillance, enhanced human-
system, LBPH, Raspberry pi. computer interaction all become possible if a good ace
recognition system may be implemented. While research
1. INTRODUCTION into this area dates back to the 1960s, it's only very recently
that acceptable results are obtained [2]. However, face
A ubiquitous property of human perception is our ability to recognition continues to be a district of active research since
tell apart between different faces even once they look similar a totally successful approach or model has not been
and recognize many different Individuals with almost no proposed to resolve the face recognition problem [3].
effort. Automated face recognition is a vicinity within
In this paper, the face recognition system has been used to
Computer Vision inspired by this ability. Biometric
identification systems specialize in extracting faces from control the access of general people in restricted areas. The
static images and video sequences and deciding whether or paper has divided into three parts, the author has described
the methods of the system at the beginning, in the system
not they belong to a database of known individuals [1].
setup it discusses circuit diagrams and at the result and
discussion part, it analyzes its results.
2. METHODOLOGY

In general, people used to lock their doors to be safe from


thieves or other people. There are various home and other
security access control systems such as keys, Barcode ID, or
another system any unauthorized person can enter there. But
within the face recognition system, the face data are stored
on Linux operating system based Raspberry pi and it'll
compare real-time with the persons are coming before the
webcam. Raspberry Pi3 has been used because it's a credit-
card sized computer that may work faster than other huge
size computers as a result the project will take a tiny low area
but work effectively. Another cause for using Raspberry Pi3,
its GPIO pins and that we have used some pins to regulate the
Door strikes.

Fig - 1: Various applications of face recognition.

© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1705
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 11 | November 2021 www.irjet.net p-ISSN: 2395-0072

2.2. Feature Extraction

The original LBP operator is defined in the window of 3*3.


Using the median pixel value as the threshold of the window,
it compares with the grey value of the adjacent 8 pixels. If
the neighbourhood pixel value is larger or equal compared to
the median pixel value, the value of pixel position is marked
as 1, otherwise marked as (0) [8]. It can be illustrated in
Figure below in figure 4.

Fig - 4: LBP Operator.

Here, 8 points in the 3x3 neighbourhood are compared to


generate 8-bit binary numbers in Figure 3. We got the
middle pixel point of the window by changing the 8-bit
binary number into the decimal and it was used to display
Fig - 2: Flow chart of the face recognition system. the texture feature of the region. Later it was noted that a
fixed neighbourhood fails to encode details varying in scale.
2.1. Face Detection The algorithm was improved to use the different numbers of
radius and neighbors, now it was known as circular LBP.
We have used Open CV which presents Haar Cascade
Classifier [3] and it is used for face detection. The system
uses the AdaBoost Algorithm to detect multiple facial (1)
features. First, it read the Image to be detected and convert
the image into a Grayscale image then load the Haar Cascade
Classifier to decide whether it contains the human face. The grey value ip of p neighbourhoods of pixel C, the radius of
which is R and ic is the grey value of the pixel C. The
algorithm makes the LBP operator no longer limited to fixed
radius and neighbourhood and can meet the needs of more
different sizes and texture features. For each pixel of an
image, it computes its LBP eigenvalues. Then these
eigenvalues can form the LBP feature spectrum and the
LBPH algorithm uses the histogram of the LBP characteristic
spectrum as the feature vector for classification. It divides a
picture into several sub-regions, then extracts the LBP
feature from each pixel of the sub-region, establishing a
statistical histogram of the LBP characteristic spectrum in
each sub-region, so that each sub-region can use a statistical
histogram to describe the whole picture through several
statistical histogram components. The advantage is to reduce
the error that the image is not fully aligned with a certain
range.
Fig - 3: Rectangular frames to detect face.
2.3. Dataset Creation
If it is, then it proceeds to examine the face features draw a
rectangular frame on the detected face otherwise test the We have designed our database with 500 images for a single
next picture. ID and the ID’s represent a person who would be recognized.

© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1706
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 11 | November 2021 www.irjet.net p-ISSN: 2395-0072

It was created based on face detection and made various


facial expirations and postures to a detected face. At the
image accusation period, the captured images are converted
into grayscale images and stored in a folder named “Dataset”
while the grayscale images are required for features
extraction normalized that images for proper recognition.
The normalization process is applied to remove noise and to
set an alignment in all images of the Dataset.
Fig - 6: Circular LBP operator.
2.4. Recognition by Raspberry pi
The algorithm works as the process below, at the beginning
of the process the temp should be 0 and I is the number of
training for each images at that time H=0, it initialize the
pattern histogram. Next step is to calculate the model levels
of LBP and keep the corresponding adding by bin1. After that
get the greatest LBP feature during each face image and
merge with the unique vector. Then it’s time to compare the
feature with the stored face images in “Dataset’.
In order to receive the feature vectors, the pattern for each
pixel is obtained and for representing all faces efficiently, the
image has to be subdivided into K2 regions [11]. A histogram
with each potential label is composed. Each bin in a
histogram gives the information about a pattern. While the
feature vectors can be obtained from the histograms. So we
can say that each regional histogram hold of P (P − 1) + 3
bins: P (P −1).

For the image (N x M), the feature vector is designed with


the help of calculating the LBP code for all pixels (Xc, Yc) with
XC є {R + 1,... ,N − R} and YC є {R + 1,. . ., M − R}. If an image is
divided into k × k regions, then the histogram for region (kx,
Fig - 5: Block diagram of the proposed system. ky), with kx є {1 ,. . ., k} and ky є {1, . . ., k},

In our system, raspberry pi is the processing unit where


Open CV- Python are run in its GPIO pins and control the
system. The camera is connected with the Raspberry pi and (2)
it acquires face data in the system. While the face is
recognized it means the face is matched with the “Dataset”
images then it switches solenoid door lock by NPN transistor
and Relay. If the face doesn’t matches with the dataset then
the GPIO switches the Buzzer and it alarms the system.

3. SYSTEM SETUP
(3)
3.1. LBPH Algorithm

To perform the face recognition system here the Local


Binary Pattern Algorithm has been applied. The LBP
operator is used in local features through Local Binary
Pattern acts which shorten the local special arrangement of a
face image [10]. The LBP operator is the number of binary
ratios of pixels intensities within the pixel of center and it’s (4)
around eight pixels. It can be shown equation 1.
Now,
(5)

© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1707
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 11 | November 2021 www.irjet.net p-ISSN: 2395-0072

In equation (5), L is the label of binary I, if the condition is person was created and stored in the Dataset folder with
true then it became 1 and if not true it means not matched individual face ID, and the faces were captured and converted
with features then I (A) is 0. Then it goes to the next step. into greyscale images of 25x25. Here, only the frontal face is
marked in the Haar Cascade Face detection process, so our
3.2. Circuit Setup system saved only the rectangle part from the faces and
saved the image with id by converting that image into RGB to
Grayscale image.

Figure 1: Dataset of known user.

Through the datasets and training algorithm will be able to


identify the known face and give permission to enter the
Fig - 7: Circuit Diagram of the system. room. There is an image below which shows the system has
identified the person and given permission to enter the
In the circuit, the raspberry pi is connected with its power
room.
adapter and the camera module is connected with it.
However, we have used GPIO 2 for 5V supply and GPIO 6 for
GND. From GPIO 22 it is connected with a push Button which
works for the switch of the recognizer. If we press the
pushbutton it will start a loop in GPIO38 and GPIO27. GPIO
38 is connected with the base of the NPN transistor and on
it’s a relay is connected with its collector side, Emitter is
joined to the GND. So when we push the button it starts the
camera and it begin recognizing process with the dataset, if it
matched with it then it makes GPIO 38=1 & GPIO 27=0, so
the solenoid door lock starts via NPN transistor and relay. Figure 2: Image of a recognized person.
Over there, an additional 12V power supply is required, so
we have used 12v input power with it. Then, the faces do not 5. CONCLUSIONS
match with dataset then, GPIO 38=0 & GPIO 27=1, so the
Buzzer will buzz and alarm. The arrangement of a facial recognition system using
raspberry pi had used the Linux operating system that can
4. RESULTS & DISCUSSION make the system littler, lighter and work successfully
In this experiment, there were individual ID numbers for utilizing lower control use, so it is more convenient than the
everyone's faces at face data accusation. The first step was to PC-Windows based face recognition system. Also, it triggers
get face database and then extract the faces with the LBP the security alarm for unauthorized persons whose faces
algorithm and finally get the recognized faced information data doesn't match with the stored data inside its database.
and observe how it open the door or buzz for unknown faces. The main concern was to create a face recognition based
For testing, authors collected various face data to see how door access controlling system that would be able to identify
the system respond to different factors and it used raspberry knowing persons with their ID, then it will give access to
pi camera module v1 (1080 Px) for data accusation. The face known persons and alarm for the unknown ones.
database of ten random people with 31 images for each

© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1708
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 11 | November 2021 www.irjet.net p-ISSN: 2395-0072

ACKNOWLEDGEMENT [11] Zheng Xiang, Hengliang Tan, Wienling Ye. The


excellent properties of dense gird-based HOG features
The authors are grateful to all those people who have on face recognition compare to gabor and LBP, 2018
supported them throughout this work. A special mention volume issue 99.
must go to Fahmida Sharmin Jui, Assistant Professor of [12] Zhao and R. Chellappa “Robust face recognition using
Southern University Bangladesh who supported the authors symmetric shape from-shading” Technical Report,
with her knowledge, experience and suggestion to write the Center for Automation Research, University of
report. Only her inspiration has made this report easy and Maryland, 1999.
interesting. The authors are also indebted to Mr Jewel Dey [13] XueMei Zhao, ChengBing Wei, A Real-time Face
for his support at in various stages during the information Recognition System Based on the Improved LBPH
and cooperation to take his picture for this piece of work. Algorithm, 2017 IEEE 2nd International Conference on
Signal and Image Processing.
REFERENCES [14] Aftab Ahmed, Jiandong Gou, Fayaz Ali, Farha Deeba,
Awais Ahmed. LBPH Based Improved Face
[1] Pouli T (2007) IMPLEMENTATION AND Recognition At Low Resolution, 2018 International
COMPARISON OF FACE RECOGNITION ALGORITHMS. Conference on Artificial Intelligence and Big Data.
BSc, University of Bath.
[2] Veeramanikandan, K., R. Ezhilarasi, and R. Brindha. BIOGRAPHIES
"An FPGA based real time face detection and
recognition system across illumination." International Md. Faishal Rahaman received his BSc
Journal of Engineering Science and Engineering 1.5 degree in Electrical & Electronic
(2013): 66-68. Engineering from Southern University
[3] W. ZHAO, R. CHELLAPPA. Face Recognition: A Bangladesh. He is currently working
Literature Survey. ACM Computing Surveys, Vol. 35, towards his masters. His research interests
No. 4, December 2003, pp. 399–458. include image processing, computer vision,
[4] Varun Garg, Kritika Garg, Face Recognition Using machine learning and deep learning.
Haar Cascade Classifier, Journal of Emerging
Technologies and Innovative Research (JETIR) ,
December 2016, Volume 3, Issue 12. Md. Abdullah Al Noman received his BSc
[5] Swati Sahu, Prof. Vijay Sharma. Internet of Things degree in Electrical & Electronic
Approach for Face Detection & Face Recognition. Engineering from Southern University.
IJSRD - International Journal for Scientific Research & Currently, he is perusing his Masters in
Development| Vol. 5, Issue 10, 2017 | ISSN (online): Mechanical Engineering from the Beijing
2321-0613. Institute of Technology. His research
[6] Anjali Patel, Ashok Verma. IOT based Facial interests include autonomous vehicles,
Recognition Door Access Control Home Security computer vision, machine learning and
System. International Journal of Computer deep learning, etc.
Applications (0975 – 8887) Volume 172 – No.7,
August 2017. Muhammad Liakat Ali is perusing his
[7] Swati Sahu, Prof. Vijay Sharma. Internet of Things Masters in Mechanical Engineering from
Approach for Face Detection & Face Recognition. the Beijing Institute of Technology. He has
IJSRD - International Journal for Scientific Research & completed his BSc degree in Electrical &
Development| Vol. 5, Issue 10, 2017 | ISSN (online): Electronic Engineering from Southern
2321-0613. University. His research interest in
[8] Prof. Sandeep V, Guru PrasadHegde. Face Detection autonomous vehicles, computer vision,
based Locker Security System using Raspberry Pi. machine learning and deep learning, etc.
International Journal of Scientific & Engineering
Research, Volume 7, Issue 5, May-2016. ISSN 2229- Mahfuzur Rahman completed his BSc
5518. degree in Electrical & Electronic
[9] LocalBinaryPatternsHistograms,OpenCV,https://docs Engineering from Southern University
.opencv.org/2.4/modules/contrib/doc/facerec/facer Bangladesh. His research interests include
ec_tutorial.html#local-binary-patterns-histograms. image processing, filter designing,
[10] R. Manjunatha, Dr. R. Nagaraja. Home Security System automation and robotics.
and Door Access Control Based on Face Recognition.
International Research Journal of Engineering and
Technology (IRJET). Volume: 04 Issue: 03. Mar -2017.
E-ISSN: 2395 -0056.

© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1709

You might also like