Face Recognition Model using k-Nearest Neighbors Algorithm
DOI:
https://doi.org/10.51179/ilka.v3i2.80Keywords:
Face recognition, K-Nearest Neighbors, HOG, biometric classification, image processingAbstract
This study explores the development of a face recognition model using the K-Nearest Neighbors (KNN) algorithm as a classification method in biometric systems. The dataset consists of 1,000 grayscale facial images sized 128x128 pixels, collected from 10 individuals with 100 images each. Feature extraction was conducted using the Histogram of Oriented Gradients (HOG) technique to capture distinctive facial characteristics. The experimental results show that the optimal k value is 4, producing a validation accuracy of 75.37%. Further testing achieved an accuracy of 81.37% with an average F1-score of 0.81, demonstrating reliable recognition performance. Live recognition tests confirmed that the system can still identify faces under real-world conditions, such as varied orientations and partial occlusions. These results indicate that KNN is an effective and efficient algorithm for small to medium-scale face recognition tasks, offering fast training time and practical applicability for biometric identification systems.
Downloads
References
[1] A. Pathak and S. Bhardwaj, “A systematic literature review on the fusion of face recognition and neuro-marketing,” SN Business & Economics, vol. 6, no. 5, p. 129, 2026.
[2] P. Dharnasi, “ATM access using card scanner and face recognition with AIML,” International Journal of Research Publications in Engineering, Technology and Management (IJRPETM), vol. 9, no. 1, pp. 113–118, 2026.
[3] R. Saputra, I. Muslem, and R. Fajri, “ Klasifikasi Spesies Ikan Koi Berdasarkan Citra Menggunakan Metode YOLOv3-Tiny Dan OpenCV ,” Jurnal Ilmu Komputer Aceh, vol. 3, no. 1, pp. 182–188, Feb. 2026.
[4] V. Shakila, I. Muslem, and S. Sriwinar, “Prototipe Kamera Pengawasan Berbasis YOLOv5 untuk Deteksi Benda Tajam Secara Real-Time dengan Notifikasi Telegram,” Jurnal Ilmu Komputer Aceh, vol. 3, no. 1, pp. 90–95, Feb. 2026.
[5] J. S. Jeyanathan, C. T. A. Wise, O. A. Tom, C. Yogeswar, G. Sankeerth, and Y. D. Kumar, “Real-Time Intrusion Detection and Cloud-based Facial Recognition for Smart Home Security Systems,” in Emerging Perspectives and Applications of Computational Intelligence and Smart Systems, CRC Press, 2026, pp. 174–178.
[6] S. Ben Chaabane, R. Harrabi, and H. Seddik, “Home security system with hybrid face recognition approach using convolutional neural Networks, fuzzy Logic, and SVM classifier,” Multimed. Tools Appl., vol. 85, no. 2, p. 125, 2026.
[7] S. Jothimani, K. Lavanya Devi, M. Madhumithra, R. Mahalakshmi, and N. Surya, “Advanced Secure Platform for Identity Recognition,” Proceedings Copyright, vol. 782, p. 788.
[8] J. Liu, X. Wang, and J. Liu, “The origin of cognitive modules for face processing: A computational evolutionary perspective,” Cognition, vol. 266, p. 106341, 2026.
[9] A. Agustiyar, R. R. Isnanto, and C. E. Widodo, “Face Recognition for Attendance Systems: A Bibliometric Review of Research Trends and Opportunities,” Jurnal Sisfokom (Sistem Informasi dan Komputer), vol. 15, no. 01, pp. 8–13, 2026.
[10] R. Kute, V. Vyas, and A. Anuse, “Transfer learning for face recognition using fingerprint biometrics,” Journal of King Saud University–Engineering Sciences, vol. 38, no. 2, p. 16, 2026.
[11] J. W. Hwang and A. B. J. Teoh, “Face Conditioning Periocular Recognition based on Asymmetrical Progressive Masked AutoEncoder,” Expert Syst. Appl., p. 131196, 2026.
[12] J. Vijaya, S. Chandrakar, and P. Shrivastava, “A Comprehensive Review Concerning the Involvement of Artificial Intelligence Techniques in Face Recognition System,” Practical Applications of Smart Human-Computer Interaction, pp. 69–110, 2026.
[13] L. V. Nguyen, “PCA-Based Face Recognition Using Eigenfaces For Cheating Detection,” Data Science and Applications: Proceedings of ICDSA 2025, Volume 2, vol. 2, p. 282, 2026.
[14] M. Jaumitbaeva, S. Beknazarova, L. Mukhtarzhanovna, Q. Axmedov, and A. Abdukhalilov, “Algorithm for recognizing geometric objects in video images using the Haar Cascade method,” in Fifth International Conference on Optics, Computer Applications, and Materials Science (CMSD-V 2025), SPIE, 2026, pp. 166–172.
[15] I. R. Muslem and T. M. Johan, “KLIK: Kajian Ilmiah Informatika dan Komputer Klasifikasi Citra Ikan Menggunakan Algoritma Convolutional Neural Network dengan Arsitektur VGG-16,” Media Online), vol. 4, no. 2, pp. 978–985, 2023, doi: 10.30865/klik.v4i2.1209.
[16] L. Luthfi, R. Imam Muslem, D. Armiady, S. Sriwinar, R. Fajri, and I. Iqbal, “Analysis of CNN Method for Image Classification of Coconut Ripeness Levels,” in 2023 Eighth International Conference on Informatics and Computing (ICIC), IEEE, Dec. 2023, pp. 1–6. doi: 10.1109/ICIC60109.2023.10381964.
[17] J. R. Velázquez-González and ..., “Unsupervised Outlier detection algorithm based on k-NN and fuzzy logic,” … Autumn Meeting on …, 2019, [Online]. Available: https://ieeexplore.ieee.org/abstract/document/9057029/
[18] K. L. Davies, H. Ugail, and D. G. Stork, “Reassessing Anne Boleyn and other Boleyn women in Holbein drawings using facial recognition,” npj Heritage Science, vol. 14, no. 1, p. 175, 2026.
[19] F. Ahmed, “Hog-cnn: Integrating histogram of oriented gradients with convolutional neural networks for retinal image classification,” Journal of Imaging Informatics in Medicine, pp. 1–16, 2026.
[20] R. Melani, S. Sriwinar, D. Azmi, I. Muslem, and M. Amin, “Klasifikasi Kematangan Cabai Berdasarkan Citra Digital Menggunakan Algoritma K-Nearest Neighbor,” NOVAKOMPUTA: Jurnal Ilmu Komputer dan Informatika, vol. 1, no. 1, pp. 30–42, 2026.
[21] D. Fahmi, D. Azmi, I. Muslem, and P. B. N. Simangunsong, “Sistem Pendeteksi Dan Klasifikasi Jenis Hewan Ternak Menggunakan Metode You Only Look Once (YOLO),” NOVAKOMPUTA: Jurnal Ilmu Komputer dan Informatika, vol. 1, no. 1, pp. 43–51, 2026.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Aceh Journal of Computer Science

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
This journal is an open access journal that provides direct, barrier-free national access to the full text of all published articles without any cost to readers or their institutions. Readers are entitled to read, download, copy, distribute, print, search, or link to the full text of all articles in the ILKA Journal. This journal provides open access to its content on the principle that making research freely available to the public supports greater global knowledge exchange.
