Accuracy Comparison of Support Vector Machine and K-Nearest Neighbors in Face Recognition for Library User Identification
DOI:
https://doi.org/10.31294/ji.v13i1.11424Keywords:
Machine Learning, Digital Library, Face Recognition, dlib, SVMAbstract
Traditional library book lending systems that rely on membership cards or personal IDs are prone to misuse due to human error. To address this, this study developed a web-based book lending application using face recognition enabling automatic user verification without physical cards, improving security, and reducing human errors. In this research 10 university students took roles as the application’s users. The goal is that the application is able to identify every library user who is going to borrow or return books based on their real time face image. The face recognition itself has been developed using dlib’s face detection, cropping, and feature extraction functions and Support Vector Machine (SVM) classification model. The K-Nearest Neighbors (KNN) model was also tested to for classification accuracy comparison. Model validation tests show that the dlib works well in detecting face location within an image, cropping the face area, and extracting face features while the two classification models are able to well classify student IDs too. The SVM model results in 91% accuracy, 90% precision, 91% recall, and 91% F1-score, which is however slightly better than KNN’s 89% accuracy, 89% precision, 88% recall and 88% F1-score. The SVM has been then chosen for the application. Following the completion of application development, a system test has been conducted with black box method and returns with system accuracy of 90%. This finding confirms that implementing dlib and an SVM model for user identification for an application can be a promising method.
Downloads
References
Amirgaliyev, B., Mussabek, M., Rakhimzhanova, T., & Zhumadillayeva, A. (2025). A review of machine learning and deep learning methods for person detection, tracking and identification, and face recognition with applications. Sensors, 25(5), 1410. https://doi.org/10.3390/s25051410
Cervantes, J., Garcia-Lamont, F., Rodríguez-Mazahua, L., & Lopez, A. (2020). A comprehensive survey on support vector machine classification. Neurocomputing, 408, 189–215.
https://doi.org/10.1016/j.neucom.2019.10.118
El Fadel, N. (2025). Facial recognition algorithms: A systematic literature review. Journal of Imaging, 11(2), 58. https://doi.org/10.3390/jimaging11020058
Feta, N. R. (2023). Comparison of KNN and SVM algorithms in facial image recognition using Haar wavelet feature extraction. Journal of Informatics Research, 5(3), 321–330. https://doi.org/10.34288/jri.v5i3.224
Gonzalez, A., Fang, W., & Wang, Y. (2020). Practical face recognition systems under constrained environments. IEEE Access, 8, 212345–212357. https://doi.org/10.1109/ACCESS.2020.3039124
Hartono, S., Perwitasari, A., & Sujaini, H. (2025). Comparison of nonparametric algorithms for face image classification based on ethnic groups in Indonesia. JEPIN: Journal of Education and Informatics Research. https://doi.org/10.26418/jp.v6i3.43268
Hussain, M., Akhtar, N., & Mian, A. (2023). Real-time face recognition: Challenges and solutions. Pattern Recognition, 135, 109142. https://doi.org/10.1016/j.patcog.2022.109142
Khan, M. A., Sharif, M., Akram, T., & Kadry, S. (2024). Comparative analysis of classical and deep learning classifiers for face recognition. Expert Systems with Applications, 238, 121987.
https://doi.org/10.1016/j.eswa.2023.121987
Li, Y., & Zhang, C. (2021). KNN-based classification methods for biometric recognition systems. Applied Sciences, 11(9), 4123. https://doi.org/10.3390/app11094123
Minaee, S., et al. (2023). Biometrics recognition using deep learning: A survey. Artificial Intelligence Review, 56, 123–178. https://doi.org/10.1007/s10462-022-10237-x
Murdani, H., Bella, E. L., & Fatwanto, A. (2024). Designing a face recognition-based security system for library circulation services. Daluang: Journal of Library and Information Science, 4(2), 82–96.
https://doi.org/10.21580/daluang.v4i2.2024.21976
Nguyen, T., Pham, H., & Le, D. (2023). End-to-end face recognition systems: Beyond accuracy metrics. IEEE Transactions on Information Forensics and Security, 18, 3456–3468.
https://doi.org/10.1109/TIFS.2023.3269814
Pratama, I. P., & Ningrum, N. K. (2025). Face recognition using MTCNN face detection, ResNetV1 feature embeddings, and SVM classification. Journal of Applied Informatics and Computing, 9(5), 2049–2058. https://doi.org/10.30871/jaic.v9i5.11016
Rahman, M. M., Islam, M. R., & Hasan, M. (2025). Lightweight face recognition for small-scale systems. Future Generation Computer Systems, 151, 130–142. https://doi.org/10.1016/j.future.2024.11.021
Ramadhani, Z., Safira, L., & Hartatik, H. (2024). Implementation of SVM algorithm in face recognition-based attendance system. Intechno Journal, 6(2), 88–97. https://doi.org/10.24076/intechnojournal.2022v4i2.1561
Sharma, S., Khan, M. A., & Mir, H. M. (2025). Deep learning challenges in face recognition systems. ICT Express. https://doi.org/10.1016/j.icte.2025.12.007
Sun, Z., & Liu, Z. (2025). Ensuring privacy in face recognition systems. Discover Applied Sciences, 7, 441. https://doi.org/10.1007/s42452-025-06987-2
Tariq, U., Khan, S., & Lee, S. (2024). Privacy-preserving biometric systems: A survey. Information Fusion, 98, 101863. https://doi.org/10.1016/j.inffus.2023.101863
Wang, H., Li, X., & Chen, Z. (2022). Real-time biometric systems for public services. IEEE Systems Journal, 16(4), 5432–5443. https://doi.org/10.1109/JSYST.2021.3125674
Yakub, N., Marlina, L., Iqbal, M., Siahaan, A. P. U., & Nasution, D. (2025). Comparative analysis of KNN and SVM methods for employee face recognition at Panca Budi University. INTECOMS: Journal of Information Technology and Computer Science, 8(3), 15908. https://doi.org/10.31539/intecoms.v8i3.15908
Yadav, A. K. (2023). 3D face recognition: A comprehensive survey. Computational Visual Media, 9, 657–685. https://doi.org/10.1007/s41095-022-0317-1
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Ellyza Hardianty, Mohammad Nasucha (Author)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.





