Decoding Facial Recognition: Analyzing Standalone Euclidean and KNN Distance Metrics - Kshetri, Sunil Raut (Journal of Science and Technology, 2024)
This study compares the performance of K-Nearest Neighbors (KNN) using different distance metrics—Euclidean, Manhattan, and Minkowski—as well as the standalone Euclidean distance metric in facial recognition tasks. Our objective was to compare these methods in terms of accuracy and computational efficiency across diverse datasets, including Celebrity Faces, Color FERET, Family Faces with and without occlusions, and Yale Faces. Utilizing Dlib’s face detection tools, we performed a thorough analysis of each metric’s effectiveness. The evaluation involved multiple iterations to ensure robust results. Our results reveal that the Manhattan distance metric generally offers superior computational efficiency, with the lowest average computation time of 0.588 milliseconds, compared to Euclidean and Minkowski metrics. While the Euclidean metric provides high accuracy, particularly in controlled Environments like the Yale Faces dataset the Manhattan metric offers a more balanced tradeoff between accuracy and computational time. The Minkowski distance metric, while versatile, generally falls between the Euclidean and Manhattan metrics in terms of efficiency and accuracy. In scenarios with occlusions, such as those found in the Family Faces dataset, the Manhattan distance metric maintains a competitive edge in both accuracy and efficiency compared to other metrics. For applications that demand both high accuracy and minimal computational overhead, especially in real-world environments with potential occlusions, the Manhattan distance metric is particularly recommended. Conversely, when computational efficiency is less of a concern, the Euclidean metric remains a reliable choice. These insights provide valuable guidance for optimizing facial recognition systems to meet diverse application requirements and computational constraints.