## 3 Results
YOLOv8 n, with fewer parameters, offers a lightweight alternative suitable for resource-constrained environments, whereas YOLOv8 x, with higher FLOPs, demands greater computational power but promises enhanced detection accuracy. The results indicate a trade-off between model complexity, speed, and detection performance. Larger models are expected to perform better due to their increased capacity. However, given the limited number of images and the inability of our configuration to handle larger batch sizes, the larger models proved inadequate for this project under the constraints we faced. Simpler models like YOLOv8n and YOLOv8s provided faster inference with high detection accuracy, whereas more complex models like YOLOv8m, YOLOv8l, and YOLOv8x while offering nuanced detection capabilities, resulted in slower inference speeds and varying detection accuracies. The YOLOv9 series introduces several advancements over its predecessors, showcasing a range of models tailored to different needs and capabilities. The YOLOv9m model, with 374 layers and 20,014,438 parameters, achieved a precision of 0.761 and a high recall of 0.899, resulting in a mean average precision (mAP) of 0.918 and a mAP across IoUs from 50% to 95% of 0.902. This model balances accuracy and efficiency, demonstrating a solid F1 score of 0.824. In comparison, the YOLOv9c model, with 384 layers and 25,320,790 parameters, exhibits slightly better precision at 0.813 and a recall of 0.936. It achieved an mAP of 0.931 and a mAP50-95 of 0.906. The YOLOv9c model's F1 score of 0.870 indicates a well-rounded performance with a good balance of precision and recall. The YOLOv9t model, featuring 917 layers and 2,005,798 parameters, demonstrates the highest precision at 0.832 but a lower recall of 0.889. It recorded a mAP of 0.938 and a mAP50-95 of 0.920, with an F1 score of 0.860, reflecting its strong precision but slightly lower recall. The YOLOv9s model, with 486 layers and 7,167,862 parameters, presents a precision of 0.831 and a recall of 0.877, achieving a mAP of 0.934 and a mAP50-95 of 0.913. This model maintains a good balance between precision and recall, with an F1 score of 0.853. The YOLOv9e model, characterized by its substantial complexity with 687 layers and 57,377,942 parameters, shows lower precision at 0.498 but an exceptionally high recall of 0.997. This results in a mAP of 0.597 and a mAP50-95 of 0.582. Despite its lower F1 score of 0.664, the YOLOv9e model highlights a trade-off between precision and recall. Overall, the YOLOv9 series demonstrates a range of trade-offs between model complexity, precision, recall, and computational demands. The YOLOv9m and YOLOv9c models offer strong performance with balanced precision and recall, while the YOLOv9t model excels in precision. The YOLOv9s model provides a good compromise, whereas the YOLOv9e model excels in recall but sacrifices precision. Each model in the YOLOv9 series caters to different use cases, balancing accuracy and computational efficiency according to specific needs. The following images (Figure 3) showcase the performance confidence curves for the YOLOv8n model, which was identified as the best-performing model in the evaluation process. YOLOv8n is generally better than YOLOv9m and YOLOv9c regarding performance metrics (\(p\), r, mAP, F1 score) and computational efficiency. YOLOv8n provides better accuracy and efficiency, making it a more suitable choice if you need a balance of high performance and lower computational demand. YOLOv9m and YOLOv9c offer adequate precision and recall but at a significantly higher computational cost. Therefore, YOLOv8n was selected as the preferable model for practical application where resource efficiency is important. Each curve represents the score for a specific class (B, C) and the overall performance across all classes. The blue line is for Class C, the orange line is for Class B, and the thick, dark blue line is for the overall score for all classes.