# Wheat Powdery Mildew Detection with YOLOv8 Object Detection Model
## 3 Results and Discussion  
The results of our study on the training dataset are displayed in Table 1. According to the findings, YOLOv8 is an effective model for detecting wheat powdery mildew. The YOLOv8n model is ideally suited to applications where fast inference speed is essential, whereas the YOLOv8m model achieves a balance between accuracy and inference speed, making it an excellent option for applications where both factors are essential. These results support that YOLO models are suitable for disease detection [54; 55]. Object detection models must detect objects in real time for spraying applications. At the same time, the size of the model should be small enough to work in mobile applications [56; 57]. Recent studies have also highlighted the effectiveness of deep learning models at detecting plant diseases. For example, a study on powdery mildew detection in strawberries using RGB images demonstrated the potential of deep learning to reduce unnecessary chemical applications [4]. Another study on agricultural object detection with YOLO models emphasized the rapid advancements and multidisciplinary nature of these applications. These findings are consistent with our results, underscoring the importance of real-time detection and model efficiency [31]. There are studies on disease detection with images captured in the laboratory environment. However, models trained with images in a controlled laboratory environment cannot provide successful results under variable illumination and background heterogeneity under real production conditions [56; 58; 59]. Since the images we used in model training were captured in an outdoor production environment, our model is robust against this variance. Spectral and hyperspectral imaging was used in most powdery mildew detection studies [60; 61]. Although these methods have advantages such as extending image inspection beyond human perception [62], they create disadvantages for the end user in terms of price and ease of access. Therefore, a mobile and cost-effective application is needed [63]. The transfer learning approach made it possible to achieve high accuracy rates with a dataset of 896 images in 100 training epochs. These results show the benefit of the transfer learning approach [4; 64]. High precision shows that most of the model's predictions are correct; however, lower recall shows that the model misses some diseased areas for detection. Increasing dataset size and more hyperparameter tuning can help increase model performance in future studies. High precision, recall, and F1 scores demonstrated accurate detection of the majority of ground truth objects. In addition, the mAP50 being 0.81 and the mAP50-95 being 0.41 indicates that it is an ideal object detector (Figure 6). The detector estimates the bounding box coordinates based on their respective confidence scores. Figure 7 shows that as the confidence score increases, the precision score increases and recall decreases. This inverse relationship between precision and recall is \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **Inference** & **Model** & \multirow{2}{*}{**mAP50**} & \multirow{2}{*}{**Precision**} & \multirow{2}{*}{**Recall**} & \multirow{2}{*}{**F1 Score**} \\  & **Speed** & **Size** & & & & \\  & **(ms)** & **(MB)** & & & & \\ \hline YOLOv8n & 0.5 & 6.2 & 0.76 & 0.95 & 0.74 & 0.82 \\ \hline YOLOv8s & 1.1 & 22.5 & 0.77 & 0.98 & 0.77 & 0.85 \\ \hline YOLOv8m & 2.3 & 52.0 & 0.81 & 0.98 & 0.77 & 0.87 \\ \hline YOLOv8l & 3.4 & 87.6 & 0.81 & 0.98 & 0.77 & 0.87 \\ \hline YOLOv8x & 5.8 & 136.7 & 0.81 & 0.98 & 0.79 & 0.87 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training results of object detection models. used to optimize the object detector. F1 is the harmonic mean of scoring precision and recall. Models with high confidence scores are preferred as object detectors. For this, the confidence score, which provides the optimum value between precision and recall, was found using the graphs below.