Facial Recognition System Based on YOLOv5, FaceNet, and Anti-Spoofing Mechanisms for Room Security
DOI:
https://doi.org/10.30865/jurikom.v15i5.10151Keywords:
Room Access Control, Face Recognition, Anti-Spoofing, Deep Learning, YOLOAbstract
Physical security in restricted areas requires fast, accurate access control capable of preventing presentation attacks. This study develops an intelligent room access control system integrating Deep Learning and anti-spoofing mechanisms. The system employs YOLOv5 for precise face detection, followed by feature extraction using FaceNet and dimensionality reduction via Principal Component Analysis (PCA) to 50 principal components. To prevent spoofing via printed photos or recorded videos, eye-blink detection using MediaPipe Face Mesh and Eye Aspect Ratio (EAR) is implemented. System monitoring and access logs are managed centrally via an SQLite database with automated web server notifications. The dataset comprises 50 recognized employee subjects (12 training and 3 testing photos per subject) alongside unregistered guest samples. Experimental results demonstrate that the system achieves high verification accuracy with an Euclidean distance threshold of 0.75, operating stably within a distance of 50 cm to 150 cm and under lighting conditions between 350 and 450 lux. Furthermore, the system demonstrates high resilience in mitigating photo and video presentation attacks under evaluated configurations. However, operational limitations occur at distances exceeding 200 cm or under low-light/infrared conditions (< 10 lux) with heavy facial occlusions, yielding inconsistent results. In conclusion, the proposed system successfully enhances physical security standards for restricted rooms under controlled operational conditions.
References
[1] Kanagamalliga S, Abishek R, Basam Bala Sai Krishna, and Vinayagam P, “Advancements in Real-Time Face Recognition Algorithms for Enhanced Smart Video Surveillance,” Procedia Comput. Sci., vol. 230, pp. 486–495, 2023.
[2] C. Ma and P. Yang, “Research on Classroom Teaching Behavior Analysis and Evaluation System Based on Deep Learning Face Recognition Technology,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Aug. 2021. doi: 10.1088/1742-6596/1992/3/032040.
[3] W. Y. Feng, Y. F. Zhu, J. T. Zheng, and H. Wang, “Embedded YOLO: A Real-Time Object Detector for Small Intelligent Trajectory Cars,” Math. Probl. Eng., vol. 2021, 2021, doi: 10.1155/2021/6555513.
[4] Yasir Saeed Ismael, Mohammed Y. Shakor, and Peshraw Ahmed Abdalla, “Deep Learning Based Real-Time Face Recognition System,” Front. Neurorobot., May 2022, doi: 10.14704/nq.2022.20.6.NQ22737.
[5] X. Jiang, T. Gao, Z. Zhu, and Y. Zhao, “Real-time face mask detection method based on yolov3,” Electronics (Switzerland), vol. 10, no. 7, Apr. 2021, doi: 10.3390/electronics10070837.
[6] Y. K. Rohiman, Bulkis Kanata, and L Ahmad S Irfan Akbar, “Deteksi dan Klasifikasi Kendaraan Berbasis Algoritma You Only Look Once (Yolov7),” Bulletin of Computer Science Research, vol. 5, no. 3, pp. 268–276, Apr. 2025, doi: 10.47065/bulletincsr.v5i3.509.
[7] T. Elizabeth, “Penerapan Convolutional Neural Network Untuk Klasifikasi Citra Ekspresi Wajah Manusia Pada MMA Facial Expression Dataset,” 2021. [Online]. Available: http://jurnal.mdp.ac.id
[8] P. Setiaji, W. A. Triyanto, and M. Nurhaliza, “Real-Time Traffic Density and Anomaly Monitoring Using YOLOv8, OpenCV and Pattern Recognition for Smart City Applications in Demak,” Jurnal Teknik Informatika (Jutif), vol. 6, no. 4, pp. 1769–1782, Aug. 2025, doi: 10.52436/1.jutif.2025.6.4.4867.
[9] F. Mehmood, S. Ahmad, and T. K. Whangbo, “An Efficient Optimization Technique for Training Deep Neural Networks,” Mathematics, vol. 11, no. 6, Mar. 2023, doi: 10.3390/math11061360.
[10] K. P. Mali, K. S. Oza, and K. G. Kharade, “IRJHISIC2401009 | International Research Journal of Humanities and Interdisciplinary Studies (IRJHIS)| 68 1 , kso_csd@unishivaji.ac.in 2 , kgk_csd@unishivaji.ac,” 2024. [Online]. Available: www.irjhis.com
[11] S. A. Hussein et al., “Integrating Law, Cybersecurity, and AI: Deep Learning for Securing Iris-Based Biometric Systems,” Mesopotamian Journal of CyberSecurity, vol. 5, no. 2, pp. 319–336, May 2025, doi: 10.58496/MJCS/2025/020.
[12] K. Anwar, “‘Sistem Deteksi Wajah Berbasis Deep Learning Menggunakan Convolutional Neural Network (CNN),’” Journal of Computer Science and Information Technology, vol. 1, no. 2, pp. 46–52, Aug. 2025, doi: 10.70716/jocsit.v1i2.258.
[13] M. Dandi Darojat, Y. A. Sari, and R. C. Wihandika, “Convolutional Neural Network untuk Klasifikasi Citra Makanan Khas Indonesia,” 2021. [Online]. Available: http://j-ptiik.ub.ac.id
[14] D. Wang, H. Zhu, Y. Zhao, and J. Shi, “A Method for Constructing a Loss Function for Multi-Scale Object Detection Networks,” Sensors, vol. 25, no. 6, Mar. 2025, doi: 10.3390/s25061738.
[15] S. Susandri et al., “Mitigating Overfitting in Sentiment Analysis Insights from CNN-LSTM Hybrid Models,” Teknik Informatika, dan Rekayasa Komputer, vol. 24, no. 2, pp. 297–308, 2025, doi: 10.30812/matrik.v24i1.4742.
[16] A. Y. Alin, K. Kusrini, and K. A. Yuana, “The Effect of Data Augmentation in Deep Learning with Drone Object Detection,” IJCCS (Indonesian Journal of Computing and Cybernetics Systems), vol. 17, no. 3, p. 237, Jul. 2023, doi: 10.22146/ijccs.84785.
[17] B. K. Umri and D. V. Delica, “Penerapan transfer learning pada convolutional neural networks dalam deteksi covid-19.”
[18] A. Wang et al., “YOLOv10: Real-Time End-to-End Object Detection,” Oct. 2024, [Online]. Available: http://arxiv.org/abs/2405.14458
[19] M. Yue, L. Zhang, J. Huang, and H. Zhang, “Lightweight and Efficient Tiny-Object Detection Based on Improved YOLOv8n for UAV Aerial Images,” Drones, vol. 8, no. 7, Jul. 2024, doi: 10.3390/drones8070276.
[20] J. Ding, J. Hu, J. Lin, and X. Zhang, “Lightweight enhanced YOLOv8n underwater object detection network for low light environments,” Sci. Rep., vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-79211-7.
[21] J. F. Esha, L. Habib, S. S. Nisa, and A. S. Md. M. Rahaman, “Real-Time Face Detection and Recognition for Secure Access Control Using Deep Learning,” 2026, pp. 608–622. doi: 10.2991/978-94-6239-664-7_42.
[22] I Gusti Made Ngurah Desnanjaya and I Nyoman Alit Arsana, “Home Security Monitoring System with IoT-Based Raspberry Pi,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 22, pp. 1295–1302, 2021.
[23] M. Sobhana, V. Ch, S. Raju, B. S. V. B. Vikas, and K. B. Vani, “Face Recognition in Dense Crowds Using Deep Learning from IP Camera,” 2AD.
[24] A. Putra Meldyantono and B. Satrio Waluyo Poetro, “Jurnal Rekayasa Sistem Informasi dan Teknologi Volume 2, No 3-Februari 2025 e-ISSN : 3025-888X IMPLEMENTASI SISTEM ABSENSI BERBASIS PENGENALAN WAJAH MENGGUNAKAN METODE CNN DAN MODEL FACENET,” 2024.
[25] W. Wang, Y. Li, and R. He, “Design of real-time transmission system for underwater panoramic camera based on RTSP,” PLoS One, vol. 20, no. 3 March, Mar. 2025, doi: 10.1371/journal.pone.0320000.
[26] M. Arunachalam, A. M. Patil, N. Uke, J. D. Lal, V. R. Sonawane, and R. Rajagopal, “A Real-Time 3D Video Streaming System Using SRTP AND RTSP Protocol,” IJCSNS International Journal of Computer Science and Network Security, vol. 22, no. 6, p. 620, 2022, doi: 10.22937/IJCSNS.2022.22.6.76.
[27] “SNI 03-6197-2000 Standar Nasional Indonesia Badan Standardisasi Nasional Konservasi energi pada sistem pencahayaan.”



