# YOLOv8-GO: A Lightweight Model for Prompt Detection of Foliar Maize Diseases
## 3 Results
### Experimental Analysis
#### 3.3.2 Comparative Experiments on Attention Mechanism  
Adding an attention mechanism is a currently recognized method to improve network performance. This article selected CBAM [38], CA [39], ECA [40], the GAM, HAT [41], DAT [42], and MLCA [43]. Seven attention mechanisms were added before the SPPF layer of the network, and all were trained for 100 epochs. The results are shown in Table 4.  
The GAM (0.88) performs best in terms of Precision, significantly higher than other attention mechanisms. CBAM (0.79) performs best in terms of Recall, while the GAM (0.77) is slightly lower. The GAM (0.852) (0.642) is the highest in mAP@50 and mAP@50:90, and the detection performance under multiple IoU thresholds is more balanced. The computational complexity of CBAM, CA, ECA, HAT, and MLCA is relatively low (all 8.1 or 8.2 GFLOPs), while the GAM (9.4 GFLOPs) is slightly higher. This shows that the GAM has slightly higher computational resource requirements but provides a better performance improvement. CA and ECA are stable, performing well in terms of Precision and mAP while maintaining low computational complexity. Although CBAM performs best in terms of Recall, it is not as good as the GAM or ECA in other indicators. HAT and MLCA are slightly inferior in performance; HAT especially has a lower Recall, although it is comparable to other attention mechanisms in GFLOPs.  
The GAM performs outstandingly in terms of Precision, mAP@50, and mAP@50:90. Although its computational complexity is slightly higher, it is acceptable and does not exceed the basic capabilities of general edge computing devices. The GAM has the most superior overall performance.  
At the same time, to intuitively reflect the role of the attention mechanism, this paper compares heatmaps, as shown in Table 5. The heatmap is a visualization tool used to indicate the degree of attention of the neural network model to different areas in the input data. This paper uses the Grad-CAM method to visualize the areas that the model pays attention to when making classification decisions. From the heatmap obtained from the input position of the SPPF layer of the network, it can be seen that after adding the GAM, the model focuses more on the location of the lesions, while the attention to the  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Attention Mechanism** & **Precision** & **Recall** & **mAP@50** & **mAP@50:90** & **GFLOPs** \\ \hline YOLOv8n & 0.871 & 0.759 & 0.839 & 0.623 & 8.1 \\ CA & 0.854 & 0.779 & 0.848 & 0.637 & 8.1 \\ ECA & 0.855 & 0.778 & 0.848 & 0.633 & 8.1 \\ CBAM & 0.844 & 0.790 & 0.847 & 0.607 & 8.1 \\ GAM & 0.880 & 0.777 & 0.852 & 0.642 & 9.4 \\ HAT & 0.864 & 0.773 & 0.848 & 0.636 & 8.1 \\ DAT & 0.857 & 0.750 & 0.829 & 0.607 & 8.3 \\ MLCA & 0.855 & 0.769 & 0.842 & 0.632 & 8.2 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of attention mechanism effects.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Precision** & **Recall** & **mAP@50** & **mAP@50:90** & **GFLOPs** \\ \hline CenterNet-RT [37] & 0.823 & 0.747 & 0.781 & 0.597 & 18.2 \\ YOLOv5n & 0.854 & 0.755 & 0.828 & 0.609 & 7.1 \\ YOLOv6n & 0.845 & 0.751 & 0.817 & 0.618 & 11.8 \\ YOLOv7 tiny & 0.855 & 0.763 & 0.821 & 0.613 & 13.1 \\ YOLOv8n & 0.871 & 0.759 & 0.839 & 0.623 & 8.1 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of Baseline effects.  
background or other interference is reduced, and the pixel-level description of the lesions is more accurate. The basic model without adding the attention mechanism does not pay enough attention to the lesions of the large spot disease and is more easily disturbed by the background. It can be seen that the GAM can not only improve the performance of the model, but also accelerate the convergence of the model, strengthen the extraction of key information, and suppress irrelevant and interfering information.