## 4 Experiments and Analysis
### Comparative Experiments of YOLOv8n and YOLOv8-E  
As depicted in Figure 10(a), we visually compared the loss trends between the YOLOv8-E and the YOLOv8n model trained over 300 iterations. The analysis revealed that both the baseline and the enhanced network exhibited stable training performance, with minimal fluctuations in their overall loss values. However, the loss of YOLOv8-E is notably lower than that of the YOLOv8n model, with no signs of overfitting or underfitting. The average precision curves of models are presented in Figure 10(b). During the early stages of training, YOLOv8-E intersected with YOLOv8n, but around the 15 th epoch, the improved model began to surpass the baseline model, achieving stable improvement and convergence, ultimately attaining higher detection accuracy than YOLOv8n.  
After training models, we utilized the validation set to verify the detection effectiveness of the trained YOLOv8n and YOLOv8-E models on eggplant diseases, and the obtained confusion matrix is shown in Figure 12. The confusion matrix comprises two dimensions: columns signify the categories predicted by the model, while rows denote the genuine  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Loss** & **[EMAIL_ADDRESS] (\%)** & **F1 (\%)** \\ \hline CIoU & 73.9 & 71.2 \\ WIoUv3 [27] & 74.8 & 71.7 \\ GIoU [28] & 73.5 & 70.3 \\ SloU [29] & 75 & 72.2 \\ EloU [30] & 76.3 & 73.7 \\ Focaler [31] & 76.1 & 73.4 \\ Inner-MPDIoU & 76.6 & 74 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance comparison of different loss.  
Figure 11: Loss and [EMAIL_ADDRESS] comparison of YOLOv8n and YOLOv8-E.  
annotated categories. Before the improvement, due to varying sizes and irregular shapes of disease targets, as well as complex factors such as occlusion and overlap, many disease targets were missed. Among them, the detection accuracy for fruit borer was the lowest, at only 57%. After the improvement, the model's detection performance for various diseases greatly improved. The detection accuracy for rotten fruit disease and yellow spot disease increased by 0.17 and 0.12, respectively, with the most notable improvement observed in fruit borer detection, which reached 0.23. This validates that the YOLOv8-E model significantly outperforms YOLOv8n in accurately predicting disease categories. Furthermore, YOLOv8-E effectively reduced the missed detection of various disease targets.  
Gradient-weighted class activation mapping (Grad-CAM) [32] currently plays a pivotal role in the field of computer vision, specializing in visualizing feature maps from convolutional layers in deep neural networks and transforming them into heat maps for display. Heat maps [33], as a form of image representation, utilize color mapping to intuitively convey data distribution and intensity information, where variations in color signify different levels of activation or importance, effectively revealing the model's attention to specific image regions. Specifically, brighter colors (such as red) typically indicate higher levels of activation, suggesting that the model pays more attention to these areas, while darker colors (such as blue) indicate lower levels. By observing the heat maps, we can easily gain insight into how the model focuses on areas of interest within the feature maps. In this study, we extracted Grad-CAM data from both the YOLOv8n and YOLOv8-E models and utilized the generated heat maps to evaluate their performance in the task of eggplant disease detection, as illustrated in Figure 13. Compared to the baseline model YOLOv8n, YOLOv8-E demonstrated a more pronounced focus on disease-related features, and this contrast strongly attests to the superiority of YOLOv8-E in detecting eggplant disease targets.  
Figure 12: Confusion matrix comparison of YOLOv8n and YOLOv8-E.