基于改进C3模块的YOLOv5三种注意力机制对水稻害虫检测性能比较
Comparative Study on Rice Pest Detection Performance Using YOLOv5 Enhanced with Three C3 Attention Modules
DOI: 10.12677/csa.2025.158196, PDF,   
作者: 沈珈毅, 冉伟豪, 黄金城*, 韩刘婧, 焦天慧:盐城工学院信息工程学院,江苏 盐城;王欣悦:盐城工学院经济管理学院,江苏 盐城;李锦怡:盐城工学院设计艺术学院,江苏 盐城;王杰文:宾夕法尼亚州立大学计算机科学与工程系,美国 斯泰特科利奇
关键词: YOLOv5SECBAMECA目标检测水稻害虫YOLOv5 SE CBAM ECA Object Detection Rice Pest
摘要: 中国是全球最大的水稻生产国,种植面积常年约占全球总量的20%。虫害是制约水稻产量和品质的主要因素之一,传统虫害检测方法主要依赖人工观察和性诱捕法,但两者均存在局限性,难以满足现代农业对虫害的精准防控需求。随着农业智能化的发展与深度学习的广泛应用,基于深度学习的农作物病虫害智能检测已成为研究热点方向。本文针对上述问题,依据实际场景采用目标检测方法对水稻害虫进行检测,对YOLOv5 (You Only Look Once version 5)检测算法进行改进,在其基础上引入三种主流注意力机制——ECA (Efficient Channel Attention)、CBAM (Convolutional Block Attention Module)和SE (Squeeze-and-Excitation),分别构建改进模块C3ECA、C3CBAM和C3SE,分别替代原主干网络中的C3模块,从而形成三种改进模型:YOLOv5s-C3ECA、YOLOv5s-C3CBAM与YOLOv5s-C3SE。通过在公开稻田害虫图像数据集上的训练与测试,实验结果表明,与原始的YOLOv5s相比,YOLOv5s-C3CBAM和YOLOv5s-C3ECA改进模型在mAP@0.5、mAP@0.5:0.95分别有不同程度的提升,其中YOLOv5s-C3CBAM在mAP@0.5、mAP@0.5:0.95上分别提升1.2%和0.3%;YOLOv5s-C3ECA在mAP@0.5、mAP@0.5:0.95上分别提升2.5%和1.1%。结果表明,所提出的改进策略在保持模型轻量化的同时提升了水稻害虫目标的检测精度与稳定性,适用于资源受限场景下的农业智能终端部署,具有良好的实际应用价值。
Abstract: China is the largest rice producer worldwide, with a planting area accounting for approximately 20% of the global total. Pest infestation is one of the primary factors limiting rice yield and quality. Traditional pest detection methods mainly rely on manual inspection and sex pheromone trapping, both of which have limitations and fail to meet the precise pest control requirements of modern agriculture. With the development of agricultural intelligence and the widespread application of deep learning, deep learning-based intelligent detection of crop pests and diseases has become a research hotspot. To address these issues, this study employs an object detection approach for rice pest identification and improves the YOLOv5 (You Only Look Once version 5) detection algorithm by introducing three mainstream attention mechanisms—ECA (Efficient Channel Attention), CBAM (Convolutional Block Attention Module), and SE (Squeeze-and-Excitation). Corresponding improved modules C3ECA, C3CBAM, and C3SE are constructed to replace the original C3 modules in the backbone network, forming three improved models: YOLOv5s-C3ECA, YOLOv5s-C3CBAM, and YOLOv5s-C3SE. Experiments conducted on a publicly available rice pest image dataset demonstrate that compared with the original YOLOv5s, the YOLOv5s-C3CBAM and YOLOv5s-C3ECA models achieve varying degrees of improvement in mAP@0.5 and mAP@0.5:0.95, with YOLOv5s-C3CBAM improving by 1.2% and 0.3%, and YOLOv5s-C3ECA improving by 2.5% and 1.1%, respectively. The results indicate that the proposed improvement strategy enhances detection accuracy and stability of rice pest targets while maintaining model lightweight characteristics, making it suitable for deployment on resource-constrained agricultural intelligent terminals and offering significant practical value.
文章引用:沈珈毅, 冉伟豪, 黄金城, 韩刘婧, 焦天慧, 王欣悦, 李锦怡, 王杰文. 基于改进C3模块的YOLOv5三种注意力机制对水稻害虫检测性能比较[J]. 计算机科学与应用, 2025, 15(8): 41-49. https://doi.org/10.12677/csa.2025.158196

参考文献

[1] Qi, L., Zhang, T., Zeng, J., et al. (2021) Analysis of the Occurrence of Main Diseases in Five Major Rice-Producing Areas in China in Recent Years. China Plant Protection Guide, 41, 37-42, 65.
[2] Ju, Z.Y., Yi, C., Zhou, Z.C., et al. (2024) YOLO-Rice: A Rice Pest Detection Method Based on YOLOv5. Control Engineering in China, 156, 124-136.
[3] Zhang, S., Wu, X., You, Z. and Zhang, L. (2017) Leaf Image Based Cucumber Disease Recognition Using Sparse Representation Classification. Computers and Electronics in Agriculture, 134, 135-141. [Google Scholar] [CrossRef
[4] Sun, Y., Jiang, Z., Zhang, L., Dong, W. and Rao, Y. (2019) SLIC_SVM Based Leaf Diseases Saliency Map Extraction of Tea Plant. Computers and Electronics in Agriculture, 157, 102-109. [Google Scholar] [CrossRef
[5] Sethy, P.K., Barpanda, N.K., Rath, A.K. and Behera, S.K. (2020) Deep Feature Based Rice Leaf Disease Identification Using Support Vector Machine. Computers and Electronics in Agriculture, 175, Article ID: 105527. [Google Scholar] [CrossRef