基于改进YOLOv8的轻量化农业害虫检测算法
A Lightweight Agricultural Pest Detection Algorithm Based on Improved YOLOv8
摘要: 针对农业害虫检测任务中普遍存在的模型计算开销大、小尺度目标识别能力不足以及复杂背景干扰严重等问题,本文提出了一种名为C3Ghost-EMA YOLOv8的轻量化目标检测方法。该方法以YOLOv8为基础架构,通过引入GhostConv轻量化卷积算子及C3Ghost模块来优化网络结构,在保证特征表达能力的同时有效缩减模型参数规模并降低计算复杂度,进而实现网络结构的轻量化。在此基础上,通过在网络颈部结构中嵌入高效多尺度注意力机制(EMA),利用跨维度并行交互与多尺度特征融合策略,增强模型对小目标害虫的感知与定位能力。基于自建IP9害虫数据集的实验结果表明,所提方法在实现显著轻量化的同时保持了较高的检测精度,其参数量仅为1.91 M并使计算量降低至5.7GFLOPs,较基准YOLOv8模型分别减少约39.4%和36.0%,且mAP@0.5达到81.3%,相比原模型提升了5.9%。实验数据验证了C3Ghost-EMA YOLOv8在检测精度与推理效率之间取得了良好平衡,从而为资源受限场景下农业害虫的实时智能检测提供了一种有效且可行的解决方案。
Abstract: Targeting the prevalent issues in agricultural pest detection tasks—such as high model computational overhead, insufficient capability for small-scale object recognition, and severe interference from complex backgrounds—this paper proposes a lightweight object detection method named C3Ghost-EMA YOLOv8. Based on the YOLOv8 architecture, the proposed method introduces the GhostConv lightweight convolution operator and the C3Ghost module to optimize the network structure. This approach effectively reduces the model parameter size and computational complexity while maintaining feature expression capability, thereby achieving a lightweight network structure. Furthermore, an Efficient Multi-Scale Attention (EMA) mechanism is embedded into the network neck structure. By utilizing cross-dimensional parallel interaction and multi-scale feature fusion strategies, this mechanism enhances the model’s perception and localization capabilities for small pest targets. Experimental results on a self-constructed IP9 pest dataset demonstrate that the proposed method achieves significant lightweighting while maintaining high detection accuracy. The model’s parameter count is only 1.91 M, and the computational load is reduced to 5.7 GFLOPs, representing reductions of approximately 39.4% and 36.0%, respectively, compared to the baseline YOLOv8 model. Meanwhile, the mAP@0.5 reaches 81.3%, an improvement of 5.9% over the original model. These experimental data verify that C3Ghost-EMA YOLOv8 achieves a favorable balance between detection accuracy and inference efficiency, providing an effective and feasible solution for real-time intelligent agricultural pest detection in resource-constrained scenarios.
文章引用:李奥, 严碧波. 基于改进YOLOv8的轻量化农业害虫检测算法[J]. 建模与仿真, 2026, 15(2): 72-84. https://doi.org/10.12677/mos.2026.152035

参考文献

[1] Jiao, L., Xie, C., Chen, P., Du, J., Li, R. and Zhang, J. (2022) Adaptive Feature Fusion Pyramid Network for Multi-Classes Agricultural Pest Detection. Computers and Electronics in Agriculture, 195, Article ID: 106827. [Google Scholar] [CrossRef
[2] Parsa, S., Morse, S., Bonifacio, A., Chancellor, T.C.B., Condori, B., Crespo-Pérez, V., et al. (2014) Obstacles to Integrated Pest Management Adoption in Developing Countries. Proceedings of the National Academy of Sciences, 111, 3889-3894. [Google Scholar] [CrossRef] [PubMed]
[3] Cheng, X., Wu, Y., Zhang, Y. and Yue, Y. (2018) Image Recognition of Stored Grain Pests Based on Deep Convolutional Neural Network. Chinese Agricultural Science Bulletin, 34, 154-158.
[4] Ding, W. and Taylor, G. (2016) Automatic Moth Detection from Trap Images for Pest Management. Computers and Electronics in Agriculture, 123, 17-28. [Google Scholar] [CrossRef
[5] Shen, Y., Zhou, H., Li, J., Jian, F. and Jayas, D.S. (2018) Detection of Stored-Grain Insects Using Deep Learning. Computers and Electronics in Agriculture, 145, 319-325. [Google Scholar] [CrossRef
[6] Liu, L., Wang, R., Xie, C., Yang, P., Wang, F., Sudirman, S., et al. (2019) PestNet: An End-to-End Deep Learning Approach for Large-Scale Multi-Class Pest Detection and Classification. IEEE Access, 7, 45301-45312. [Google Scholar] [CrossRef
[7] Xu, D., Xiong, H., Liao, Y., Wang, H., Yuan, Z. and Yin, H. (2024) EMA-YOLO: A Novel Target-Detection Algorithm for Immature Yellow Peach Based on Yolov8. Sensors, 24, Article No. 3783. [Google Scholar] [CrossRef] [PubMed]
[8] Li, J., Li, J., Zhao, X., Su, X. and Wu, W. (2023) Lightweight Detection Networks for Tea Bud on Complex Agricultural Environment via Improved YOLOv4. Computers and Electronics in Agriculture, 211, Article ID: 107955. [Google Scholar] [CrossRef
[9] Zhang, Y., Cai, W., Fan, S., Song, R. and Jin, J. (2022) Object Detection Based on YOLOv5 and GhostNet for Orchard Pests. Information, 13, Article No. 548. [Google Scholar] [CrossRef