# Deep Learning Approach for Arm Fracture Detection Based on an Improved YOLOv8 Algorithm
## 4 Results and Discussion
### Evaluation Metrics  
The primary evaluation metric in YOLOv8 to evaluate the model performance is the mAP [39]. The Mean Average Precision (mAP) is computed as the mean of the Average Precision (AP) values across all object classes. Average precision is derived from the Precision-Recall curve, which plots against recall for different threshold values. Intersection  
Figure 4: Detailed illustration of the YOLOv8-HA model. The main alteration to the existing model includes the HA module in the head (indicated by the blue color outlined box). The HA module includes two attention mechanisms: Channel Attention and Spatial Attention. over union (IoU) is another important metric used in YOLOv8, and it measures the overlap between the predicted bounding box and the ground truth bounding box. A higher IoU value indicates superior localization performance, demonstrating that the predicted bounding box closely matches the ground truth [40]. YOLOv8 reports mAP@50 (where IoU is 0.5) and mAP@50-95 (averaging IoUs from 0.5 to 0.95). These metrics comprehensively assess the model's localization performance at different IoU thresholds. Precision is another metric representing the ratio of accurate positive detections to the total number of positive detections. This value can tell us how many detected objects are correct. A high precision score indicates that the model makes accurate predictions when detecting objects. Conversely, recall measures the ratio of accurate positive detections to the total number of actual objects. This metric evaluates the model's ability to find all the relevant objects within the dataset. High recall means the model can detect most objects with very few missing [41]. The F1 score is another important metric that uses precision and recall, providing a balanced measure of the model's actual performance. It is the harmonic means of precision and recall, making it helpful in balancing these two metrics' trade-offs. A high F1 score indicates that the model achieves a balanced tradeoff between precision and recall, ensuring accurate and comprehensive object detection. This study also explored the effectiveness of the Stochastic Gradient Descent (SGD) optimizer in the YOLOv8 model integrated with our HA mechanism. The HA mechanism significantly enhances feature representation, improving the model's ability to focus on relevant features and improving performance in object detection tasks. While other optimizers, such as Adam or AdamW, offer adaptive learning rates that accelerate convergence, we found that SGD consistently outperformed the alternative optimizers, as seen in Table 1.  
The SGD optimizer has a fixed learning rate and a more straightforward update mechanism that provides more controlled and stable learning dynamics, which is beneficial in tasks like dealing with the introduced complexity of the Hybrid-Attention mechanism. Adaptive optimizers that include weight decay for regularization can sometimes lead to overly aggressive updates, especially in networks with attention mechanisms that cause the model to converge too early. In contrast, the updates of SGD help prevent the model from settling into a sharp low level that corresponds to overfitting. In the training process, we utilized the pre-trained YOLOv8 models already trained on the MS COCO dataset. The MS COCO dataset is a large-scale dataset designed for object detection and segmentation, containing over 330,000 images with more than 200,000 labeled images and around 1.5 million object instances across 80 object categories [42]. It provides detailed annotations, including segmentation masks, bounding boxes, object labels, and critical points for human poses, making it a standard benchmark for evaluating computer vision algorithms. Figure 5 illustrates the results for manually labeled and predicted images, demonstrating that our model successfully identified and detected arm and leg fractures.