# Wheat Powdery Mildew Detection with YOLOv8 Object Detection Model
## 2 Materials and Methods
### Model Evaluation Metrics  
To evaluate model performance, the most used metrics in object detection studies were preferred [19; 52]. Precision, Recall, IoU, mAP, and F1 are shown in Formulas (1)-(5). Precision is a performance metric used in classification tasks to assess the correctness of a model's positive predictions. It represents the proportion of correctly predicted positive instances out of all positive instances predicted. Precision focuses on the quality of positive predictions, specifically the ability to avoid false positives. A higher precision  
Figure 5: YOLOv8 architecture. value indicates a model that is more precise at correctly identifying positive instances, minimizing the occurrence of false positives. Precision is particularly important when the cost or impact of false positives is high, as it ensures that the model's positive predictions are reliable and accurate. \[\text{Precision}=\frac{\text{True Positive}}{\text{True Positive}+\text{ False Positive}} \tag{1}\]  
Recall, also known as sensitivity or true positive rate, is a performance metric used in classification tasks to quantify the model's capacity to accurately detect positive instances. It quantifies the proportion of true positive instances correctly identified out of all actual positive instances in the dataset. Recall focuses on the completeness of positive predictions, emphasizing the model's ability to avoid false negatives. A higher recall value indicates a model that is more effective at capturing a larger portion of positive instances, minimizing the occurrence of false negatives. Recall is particularly important in identifying all positive instances, ensuring that the model has a low chance of missing relevant information. \[\text{Recall}=\frac{\text{True Positive}}{\text{True Positive}+\text{ False Negative}} \tag{2}\]  
IoU is a common metric used in object detection tasks to assess the accuracy of bounding box predictions. It calculates the ratio of their intersection area to their union area to measure the overlap between the predicted bounding box and the actual bounding box. A value of 1 indicates a flawless match between the predicted and ground truth bounding boxes. A higher IoU indicates greater localization precision. A commonly used IoU threshold of 0.5 is used to determine whether a predicted bounding box should be considered a true positive or a false positive. It provides a quantitative measure of the object detection model's ability to locate objects in images. \[\text{IoU}=\frac{\text{Object}\cap\text{Detected Box}}{\text{Object}\cup \text{Detected Box}} \tag{3}\]  
mAP is a performance metric used in object detection and image retrieval tasks. It assesses the precision and robustness of a model's predictions across multiple object classes or query images. It measures the trade-off between precision and recall for each class or query, representing the ability to correctly identify relevant instances while minimizing false positives. It is a useful metric for evaluating and comparing object detection or retrieval models, as a higher mAP indicates superior overall performance. The mAP50 is computed by calculating precision and recall values at various IoU thresholds and averaging them. AP50-95 is computed across a range of IoU thresholds, capturing the model's capacity to accurately detect objects with varying degrees of overlap with the ground truth bounding boxes. A greater AP50-95 value indicates superior localization and classification performance across the range of IoU thresholds. \[\text{mAP}=\frac{1}{\text{N}}\sum_{\text{i}=1}^{\text{N}}\text{AP}_{\text{i}} \tag{4}\]  
The F1 score is a commonly used metric in classification tasks to evaluate model performance considering both precision and recall. By calculating the harmonic mean of precision and recall, it provides a balance between these two measures. The F1 score ranges from 0 to 1, with 1 representing the best performance achievable.