# YOLO-OHFD: A YOLO-Based Oriented Hair Follicle Detection Method for Robotic Hair Transplantation
###### Abstract  
Hair loss affects over 30% of the global population, impacting psychological well-being and social interactions. Robotic hair transplantation has emerged as a pivotal solution, requiring precise hair follicle detection for effective treatment. Traditional methods utilizing horizontal bounding boxes (HBBs) often misclassify due to the follicles' elongated shapes and varied orientations. This study introduces YOLO-OHFD, a novel YOLO-based method using oriented bounding boxes (OBBs) for improved hair follicle detection in dermoscopic images, addressing the limitations of traditional HBB approaches by enhancing detection accuracy and computational efficiency. YOLO-OHFD incorporates the ECA-Res2 Block in its feature extraction network to manage occlusions and hair follicle orientation variations effectively. A Feature Alignment Module (FAM) is embedded within the feature fusion network to ensure precise multi-scale feature integration. We utilize angle classification over regression for robust angle prediction. The method was validated using a custom dataset comprising 500 dermoscopic images with detailed annotations of hair follicle orientations and classifications. The proposed YOLO-OHFD method outperformed existing techniques, achieving a mean average precision (mAP) of 87.01% and operating at 43.67 frames per second (FPS). These metrics attest to its efficacy and real-time application potential. The angle classification component particularly enhanced the stability and precision of orientation predictions, critical for the accurate positioning required in robotic procedures. YOLO-OHFD represents a significant advancement in robotic hair transplantation, providing a robust framework for precise, efficient, and real-time hair follicle detection. Future work will focus on refining computational efficiency and testing in dynamic surgical environments to broaden the clinical applicability of this technology. h air follicle detection; deep learning; oriented object detection; hair transplantation 2024  
7 March 2025  
9 March 20259  
and automatic digital image analysis for segmenting hairs, enabling the calculation of parameters like hair diameter and density. [PERSON] et al. [5] developed a method combining color space transformation with a difference of Gaussian filtering for counting and measuring hair lengths. [PERSON] [6] introduced preprocessing techniques such as segmental linear contrast stretching and multi-scale detection methods for hair segmentation. Despite their contributions, these methods are sensitive to parameter configurations and often struggle with background interference during hair segmentation. Deep learning approaches have shown promising improvements in hair follicle detection and classification by leveraging diverse image features. [PERSON] [7] improved segmentation accuracy using RetinaNet and SegNet algorithms to identify preoperative hair follicles, hair locations, and postoperative scar marks. [PERSON] [8] applied a multi-task deep learning method based on Mask R-CNN [9] to detect hair follicles and evaluate hair loss severity. Further, [PERSON] et al. [10] explored the performance of EfficientDet [11], YOLOv4 [12], and DetectoRS [13] in identifying and classifying different hair follicle types. Additionally, [PERSON] et al. [14] implemented Faster R-CNN [15] and SSD [16] for detailed scalp health analysis, while [PERSON] et al. [17] employed DenseNet121 [18] and U-Net [19] for automated hair counting. Existing methods for hair follicle detection primarily utilize horizontal bounding boxes (HBBs) for localization. However, the elongated and arbitrarily oriented nature of hair follicles in dermoscopic images poses challenges for HBB-based approaches. These methods often include excessive background information, leading to overlapping bounding boxes and increased instances of misdetections or omissions. In contrast, oriented bounding boxes (OBBs) can more accurately represent the shape, size, and direction of hair follicles, minimizing background interference.