YOLO-RicePest: High-Precision Rice Pest Detection Method Based on Improved YOLOv5s
##plugins.themes.bootstrap3.article.main##
Abstract
Rice yields are threatened by diverse pests, demanding accurate field detection. Yet small object scale, high inter-class similarity, and cluttered backgrounds make recognition difficult. We present YOLO-RicePest, an improved YOLOv5s framework. Specifically, the efficient multi-scale attention (EMA) module is integrated after each C3 block in the backbone to strengthen the representation of spatial cues such as texture and shape. This enhances the model’s capacity to differentiate visually similar pest categories. In the neck, a content-aware reassembly of features (CARAFE) module is incorporated to adaptively generate reassembly kernels conditioned on input feature content, thereby retaining fine-grained details critical for small-object detection. Furthermore, we design a novel bounding-box regression loss, Inner-Focaler-EIoU, which combines linear interval map-ping with an auxiliary bounding-box mechanism. This loss alleviates the deficiencies of CIoU in handling small and occluded objects and facilitates faster convergence. To validate the proposed method, we construct a rice pest dataset (RPD) comprising 2,550 images across 18 common pest species, captured using an automated trapping system. Experimental results demonstrate that YOLO-RicePest achieves a mAP50 of 87.9%, substantially surpassing the baseline YOLOv5s model (82.4%), thereby confirming its effectiveness and robustness for rice pest detection.