## 4 Experiments and Analysis
### Ablation Experiments  
In this paper, an ablation experiment was conducted based on the YOLOv8n network. The results are shown in Table 2, and the visualized outcomes are presented in Figure 7.  
As can be seen from Table 2, the introduction of the Slim-Neck structure resulted in the following significant improvements: a 1.7 percentage point increase in recall, a 0.7 percentage point boost in \(mAP\), a 6.9% reduction in the number of parameters, a 5.8% decrease in the model size, and a 0.8 GFLOPs reduction in the computational load. Not only did the model become lighter, but its precision was also enhanced, demonstrating the superiority of optimizing the neck part with the Slim-Neck structure. In addition, the introduction of the EMA attention mechanism further enhanced the recall by 0.2 percentage points and the average precision by 0.4 percentage points, indicating that the attention mechanism effectively improved the model's focus on the harmful symptoms of small targets; the model that also introduced the Slim-Neck structure and the EMA attention mechanism was further improved in all of the evaluation metrics, and, compared with the  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **P/\%** & **\(R\)/\%** & \(mAP\)/\%** & **Parameter/M** & **Model Size/MB** & **GFLOPs** \\ \hline YOLOv8n (baseline) & 95 & 91.8 & 96.5 & 3.01 & 5.98 & 8.2 \\ YOLOv8n + Slim-Neck & 94.9 & 93.5 & 97.2 & 2.8 & 5.63 & 7.4 \\ YOLOv8n + EMA & 94.6 & 92 & 96.9 & 3.02 & 6.00 & 8.2 \\ YOLOv8n + MPIoU & 93.5 & 93.1 & 97 & 2.84 & 5.98 & 8.2 \\ YOLOv8n + Slim-Neck + EMA & 96.2 & 93.4 & 97.4 & 2.8 & 5.65 & 7.4 \\ SEM-YOLOv8n & 94.8 & 94.5 & 97.6 & 2.61 & 5.3 & 6.3 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Ablation experiment results.  
Figure 7: Comparison chart of the curves before and after improvement.  
original model, it improved the precision, recall, and average precision by 1.2, 1.6, and 0.9 percentage points, and reduced the number of parameters, the model size, and the computation amount by 6.9%, 5.5%, and 9.7%, respectively. The SEM-YOLOv8n model proposed in this paper improved the recall and average precision by 2.7 and 1.1 percentage points, and reduced the number of parameters, model size, and computation by 13.2%, 11.4%, and 23.2%, respectively, compared with the original model.  
As can be seen from Figure 7, with the increase in the number of iterations, both of the models reached the convergence state. The \(mAP\) and recall of the improved model were significantly improved, indicating that the improved model effectively enhanced the detection precision and detection rate of _Brevipalpus_ spp. grape damage, and made the model's bounding box predictions more accurate.  
The confusion matrix compares the classification results with the actual results. The diagonal values show the proportion of correctly classified samples, while the off-diagonal values show the proportion of incorrectly classified samples. Figure 8 presents the confusion matrix for SEM-YOLOv8n and the original YOLOv8n.  
As shown in Figure 8, the SEM-YOLOv8n model outperforms the original model on the Grade I, Grade II, Grade IV, and Grade V categories by 1%, 1%, 2%, and 1%, respectively. Despite the slight decrease in Grade III, SEM-YOLOv8n still provides more accurate classification results in most cases, demonstrating its effectiveness and superiority in real-world applications.