In the modern era, face recognition is one of the important technologies used in various security and data analysis applications. This paper aims to use Python to implement the K-Nearest Neighbors (KNN) algorithm to detect gender and age through face recognition. The main problem faced is the accuracy in classifying gender and estimating age from various facial images with lighting, pose, and expression. This study uses various steps to collect facial data, use image processing techniques to extract features, and use the KNN algorithm for classification. The results show that applying KNN can detect gender and age from faces with sufficient accuracy, although there are some problems with extreme lighting and pose conditions. These findings indicate that the KNN algorithm can be used in facial recognition applications to detect gender and age. By fixing parameters and improving data quality, further improvements can be achieved.
Copyrights © 2024