Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Journal of Physics: Conference

Series

PAPER • OPEN ACCESS You may also like


- Image Processing For Face Recognition
Design of Automatic Room Door Lock System Using HAAR, HOG, and SVM Algorithms
M Maria Dominic Savio, T Deepa,
Based on Face Recognition Anudeep Bonasu et al.

- Facial identification in very low-resolution


images simulating prosthetic vision
To cite this article: S Yatmono et al 2022 J. Phys.: Conf. Ser. 2406 012007 M H Chang, H S Kim, J H Shin et al.

- Facial Target Detection and Keypoints


Location Study Using MTCNN Model
Yuan Chai, Jing Liu and Yang Li
View the article online for updates and enhancements.

This content was downloaded from IP address 37.238.44.23 on 28/03/2024 at 03:17


ICE-ELINVO-2022 IOP Publishing
Journal of Physics: Conference Series 2406 (2022) 012007 doi:10.1088/1742-6596/2406/1/012007

Design of Automatic Room Door Lock System Based on Face


Recognition

S Yatmono1, AC Nugraha1, M Khairudin1, ML Hakim1, Y Pradityarahman1, FA


Mustaqim1

1
Departement of Electrical Engineering Education, Faculty of Engineering,
Universitas Negeri Yogyakarta, Yogyakarta, Indonesia

Email : s_yatmono@uny.ac.id

Abstract. Face recognition is a method for recognizing human faces using a camera. There are
various applications of facial recognition technology, one of which is Face Unlock technology
on smartphones which functions as a security feature to open smartphone access through the
user's face. In this study, the use of facial recognition technology is used to automatically open
the door of the room according to the registered face. The research method used is the waterfall
method which has 5 stages. The research stages consist of requirements analysis, design,
implementation & unit testing, integration & system testing, and operation & maintenance. This
study uses a Raspberry Pi 4 to perform an automation system. The face detection process is based
on the YuNet detection model, as well as the face recognition process using the SFace facial
recognition model.

1. Introduction
Facial recognition is an excellent technology that recognizes human faces through the camera based on
facial features. Currently, this technology is applied in electronic devices, industries, airports that
perform facial recognition instantly without human intervention. Face recognition is able to distinguish
faces directly with accuracy in terms of data collection and verification. This technology is also more
suitable for the process of detecting a person's identification, because in terms of biometric security
categories, this technology uses data that is unique to each person such as fingerprints or irises. The
camera used in this study is a webcam camera which is expected to capture human faces in real time.
The purpose of this research is to build a facial recognition system that can recognize people's faces
through the camera and unlock the door of the room. The prototype will be installed in the door and use
the camera to operate the entire system automatically.

2. Method
2.1. Development Method
In this study, a prototype dam water level controller with fuzzi logic controller will be developed. Soil
This study uses the waterfall method which has 5 stages. These stages include requirements analysis,
design, implementation & unit testing, integration & system testing, and operation & maintenance [1].

Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
ICE-ELINVO-2022 IOP Publishing
Journal of Physics: Conference Series 2406 (2022) 012007 doi:10.1088/1742-6596/2406/1/012007

Figure 1. Waterfall stages

The requirements analysis stage collects the component requirements needed to develop the system.
The components used in this study include Raspberry Pi 4, Logitech C270, Arduino Nano, 12v Adapter,
Step down, Relay, and Electric Door Lock.
Raspberry Pi 4 is used as a facial recognition processing module with input from the Logitech C270
webcam and performs serial communication with Arduino Nano. The Arduino Nano is used to receive
commands from the Raspberry Pi 4 via serial communication which will then instruct the Electric Door
Lock to open or close the lock via the Relay.

Figure 2. Electric Door Lock

The design stage is doing system design. The designs made include 2D designs for the manufacture
of acrylic boxes as component placements, as well as electronic system designs.

Figure 3. System block diagram

The implementation & unit testing stages are in the form of program code generation for each stage
of system automation. The program code made is face detection code, face recognition, face dataset

2
ICE-ELINVO-2022 IOP Publishing
Journal of Physics: Conference Series 2406 (2022) 012007 doi:10.1088/1742-6596/2406/1/012007

storage, serial communication, and automatic door lock. Each program code is tested to ensure that the
program code can run properly.
The face recognition process begins with face detection. In detecting faces, the model used is YuNet
which is available in the OpenCV library. As for recognizing faces that have been detected, the SFace
model is used [2].
The integration & system testing stage combines program units and electronic circuits that have been
created and conducts tests to determine whether the program is in accordance with its function or not.The
operation & maintenance stage is in the form of running the finished system and carrying out the
maintenance process. Maintenance includes fixing errors that have not been found before.

2.2. System Testing Mechanism


The face recognition module was tested using four values, namely True Positive (TP), False Positive
(FP), True Negative (TN), and False Negative (FN). The TP value shows the results of face
recognition according to the stored dataset. The FP value indicates the face recognition result does not
match the stored dataset. The TN value indicates that the face recognition result is not recognized
because it is not stored in the dataset. The FN value shows the results of face recognition that are not
stored in the dataset but are identified with a certain name. From these four values, accuracy can be
calculated using the following formula [3].
𝑇𝑃+𝑇𝑁
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑇𝑃+𝐹𝑃+𝑇𝑁+𝐹𝑁 𝑥 100% (1)

The accuracy value can be categorized into several predicates [4]. The division of categories can
be seen in the following table.
Table 1. Accuracy category
Accuracy
Category
percentage
0% - 20% Very low
21% - 40% Low
41% - 60% Medium
61% - 80% High
81% - 100% Very High

In addition to testing the face recognition module, system function testing was also carried out.
The system function testing is carried out to determine the response of the system to the face
recognition module. The system will be tested under certain conditions and will make decisions based
on these conditions.

3. Results and Discussion


After the design is complete, then the assembly of the tool is carried out. The results of the assembly are
shown in Figure 4.

Figure 4. Automatic door lock


3
ICE-ELINVO-2022 IOP Publishing
Journal of Physics: Conference Series 2406 (2022) 012007 doi:10.1088/1742-6596/2406/1/012007

After going through several stages of making the system, the next step is testing. In testing the
face recognition module, first the face image is saved to a dataset that will be considered valid by the
application program. The number of facial datasets used is 3 people which will be considered valid, with
each dataset having 1 face frame with the face facing forward. The face dataset is needed to be compared
with face frames that are not in the dataset and the level of similarity will be calculated based on facial
feature extraction using the SFace model.

Figure 5. Face dataset

The process of testing the face recognition module uses as many as 6 facial data which is used as
testing material. From the 6 face data, face 1 to face 3 is a valid face data, while face 4 to face 6 is an
invalid face data.

Figure 6. Invalid facial data

The number of face frames used for testing is 15 face frames for each face data. The results of
these tests are in the following table.
Table 2. The results of the 1st test of the facial recognition module
Face data TP FP TN FN
face_1 15 0 0 0
face _2 14 1 0 0
face _3 15 0 0 0
face _4 0 0 15 0
face _5 0 0 15 0
face _6 0 0 15 0

Based on Table 2, the accuracy value of the facial recognition module test can be calculated using
equation (1).
𝑇𝑃 + 𝑇𝑁
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑥 100%
𝑇𝑃 + 𝐹𝑃 + 𝑇𝑁 + 𝐹𝑁
44 + 45
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑥 100%
44 + 1 + 45 + 0
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 98,88 %

In Table 2, the data for face 2 still has an FP value of 1. To increase the accuracy of face
recognition 2, the dataset for face 2 is added. The number of additional datasets is 4 face frames with
different facial positions, namely facing up, down, left, and right.

4
ICE-ELINVO-2022 IOP Publishing
Journal of Physics: Conference Series 2406 (2022) 012007 doi:10.1088/1742-6596/2406/1/012007

Figure 7. Addition of face dataset 2

The addition of this dataset has different test results as shown in the following Table 3.

Table 3. The results of the 2 facial recognition modules


Face data TP FP TN FN
face_1 15 0 0 0
face _2 15 0 0 0
face _3 15 0 0 0
face _4 0 0 15 0
face _5 0 0 15 0
face _6 0 0 15 0

The accuracy value can be calculated based on Table 3, using equation (1).
𝑇𝑃 + 𝑇𝑁
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑥 100%
𝑇𝑃 + 𝐹𝑃 + 𝑇𝑁 + 𝐹𝑁
45 + 45
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑥 100%
45 + 0 + 45 + 0
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 100 %

The next test is to test the system function to find out the response of the Electric Door Lock based
on the facial recognition module that has been made. In this test, if the system can recognize faces or is
valid, the Electric Door Lock will unlock. If the system cannot recognize faces or is invalid 3 times, the
system will freeze for 1 minute.
Table 4. System function testing
Electric Response
Face
Door Freeze time
data
Lock (second)
face_1 open - 0,29
face _2 open - 0,33
face _3 open - 0,31
closed - 0,32
face _4 closed - 0,30
closed 🗸 0,31
closed - 0,31
face _5 closed - 0,30
closed 🗸 0,31
closed - 0,30
face _6 closed - 0,32
closed 🗸 0,32

5
ICE-ELINVO-2022 IOP Publishing
Journal of Physics: Conference Series 2406 (2022) 012007 doi:10.1088/1742-6596/2406/1/012007

4. Conclusion
Based on the results of the tests that have been carried out, it can be concluded that the system runs as
expected and can be used as a facial recognition-based automatic door lock system. The results of the
facial recognition module test obtained an accuracy value of 98.88% in the 1st test and 100% in the 2nd
test. These results can be categorized as having a very high level of accuracy. From the facial recognition
module testing, it can be concluded that the more variations of the face dataset, the more accurate the
face recognition accuracy. In testing the system function, the Electric Door Lock can respond according
to the face recognition module with a response time of 0.29 - 0.33 seconds and the system can freeze
for 1 minute if the face recognition module cannot recognize faces 3 times in a row.

5. References

[1] Sommerville, I. 2011. Software Engineering (Rekayasa Perangkat Lunak). Jakarta: Erlangga.
[2] Zhong, Y. Deng, W. Hu, J. Zhao, D. Li, X. Dan Wen, D. 2021. SFace: Sigmoid-Constrained
Hypersphere Loss for Robust Face Recognition. IEEE Transactions on Image Processing vol. 30 p 2587.
[3] Wiryadinata, R. Istiyah, U. Fahrizal, R. Priswanto dan Wardoyo, S. 2017. Sistem Presensi
Menggunakan Algoritme Eigenface dengan Deteksi Aksesoris dan Ekspresi Wajah. JNTETI vol. 6. no.
2. p 223.
[4] Ghaffur, T. A. dan Nurkhamid. 2017. Analisis Kualitas Sistem Informasi Kegiatan Sekolah Berbasis
Mobile Web di SMK Negeri 2 Yogyakarta. Elinvo (Electronics, Informatics, and Vocational Education)
vol 2. no.1. pp 94-101.

You might also like