Agriculture (Jun 2024)

A Lightweight Rice Pest Detection Algorithm Using Improved Attention Mechanism and YOLOv8

  • Jianjun Yin,
  • Pengfei Huang,
  • Deqin Xiao,
  • Bin Zhang

DOI
https://doi.org/10.3390/agriculture14071052
Journal volume & issue
Vol. 14, no. 7
p. 1052

Abstract

Read online

Intelligent pest detection algorithms are capable of effectively detecting and recognizing agricultural pests, providing important recommendations for field pest control. However, existing recognition models have shortcomings such as poor accuracy or a large number of parameters. Therefore, this study proposes a lightweight and accurate rice pest detection algorithm based on improved YOLOv8. Firstly, a Multi-branch Convolutional Block Attention Module (M-CBAM) is constructed in the YOLOv8 network to enhance the feature extraction capability for pest targets, yielding better detection results. Secondly, the Minimum Points Distance Intersection over Union (MPDIoU) is introduced as a bounding box loss metric, enabling faster model convergence and improved detection results. Lastly, lightweight Ghost convolutional modules are utilized to significantly reduce model parameters while maintaining optimal detection performance. The experimental results demonstrate that the proposed method outperforms other detection models, with improvements observed in all evaluation metrics compared to the baseline model. On the test set, this method achieves a detection average precision of 95.8% and an F1-score of 94.6%, with a model parameter of 2.15 M, meeting the requirements of both accuracy and lightweightness. The efficacy of this approach is validated by the experimental findings, which provide specific solutions and technical references for intelligent pest detection.

Keywords