Comparison of KNN and CNN Algorithms for Gender Classification Based on Eye Images

Authors

  • Rizky Dwi Wicaksono Universitas Dian Nuswantoro Author
  • Guruh Fajar Shidiq Author

DOI:

https://doi.org/10.15294/sji.v11i4.13529

Keywords:

Biometrics, classification, Convolutional Neural Networks, Eye image, gender classification, K-Nearest Neighbor (K-NN)

Abstract

Purpose: This study explores gender classification using iris images and compares two methods k-nearest neighbors (KNN) and convolutional neural networks (CNN). Most research has focused on facial recognition. However, iris classification is more unique and accurate. This research addresses a gap in gender classification using iris images. It also tests the effectiveness of CNN and KNN for this task.

Methods: This study used 11,525 iris images from Kaggle. Of these, 6,323 were male and 5,202 were female. The authors split the data into training (75%) and testing (25%). Preprocessing involved normalizing and augmenting images by rotating, scaling, shifting, and reflecting the them. Pixel values were also adjusted. The study compared the KNN algorithm, using Euclidean distance and 16 neighbors, with a CNN model. The CNN had layers for convolution, pooling, and density. The authors performed evaluation using accuracy, precision, recall, F1-score, and confusion matrix.

Result: The KNN model demonstrated 81% accuracy. It identified males with 87% precision but only 70% recall. Meanwhile, the CNN model was better, achieving 93% accuracy with 94% precision and 95% recall for males. The CNN model outperformed KNN for females in precision, recall, and F1-score, indicating its superior ability to learn patterns and classify gender from iris images.

Novelty: CNN outperforms KNN in classifying gender from iris images. It effectively recognizes patterns and achieves high accuracy. The study shows CNN’s superiority in biometric tasks, suggesting that future research should balance datasets and test better models, as well as combining models for better performance.

Downloads

Article ID

13529

Published

10-12-2024

Issue

Section

Articles

How to Cite

Comparison of KNN and CNN Algorithms for Gender Classification Based on Eye Images. (2024). Scientific Journal of Informatics, 11(4), 915-924. https://doi.org/10.15294/sji.v11i4.13529