PurposeTo develop an algorithm to automate the organization of large photo databases using the Haar cascade algorithm for face and eye detection using machine learning tools in Python. DesignRetrospective study for the purposes of clinical tool development. MethodsWe developed an algorithm, termed FaceFinder, to identify front facing images in a large dataset of facial, orthodontal and miscellaneous images. FaceFinder works by detecting the presence of faces and at least two eyes using the Haar cascade. Execution time was recorded using different-sized datasets. A total of 895 images were analyzed by FaceFinder using various thresholds for face and eye detection. Precision, recall, specificity, accuracy, and F1 score were computed by comparison to ground truth labels of the images as determined by a human grader. ResultsUsing medium thresholds for face and eye detection, FaceFinder reached recall, accuracy, and F1 score of 89.3%, 91.6%, and 92.9%, respectively with an execution time per image was 0.91 seconds. Using the highest threshold for face and eye detection, FaceFinder achieved precision and specificity values of 98.3% and 99.2% respectively. ConclusionsFaceFinder is capable of sorting through a heterogenous dataset of photos of patients with craniofacial disease and identifying high-quality front-facing facial images. This capability allows for automated sorting of large databases that can facilitate and expedite data preparation for further downstream analyses involving artificial intelligence and facial landmarking.
Read full abstract