Abstract:Rice pests critically threaten rice cultivation by inflicting direct physiological damage, spreading diseases, and potentially causing catastrophic field extinction, leading to significant agricultural losses. To address challenges such as dense pest clusters, subtle morphological variations, and frequent small-target missed detections in pest detection lamp images, an intelligent recognition method was proposed by using an enhanced YOLO v8-STSF model. Key innovations included integrating a Swin Transformer module to boost backbone network multiscale feature extraction, optimizing neck network feature fusion via distribution shift convolution (DSConv), and adopting the Focal EIoU loss function to enhance small-target localization. Validated on a 7000 image multi-species pest dataset, the improved model achieved 95.45% of precision, 90.45% of recall, and 90.03% of F1-score, surpassing the original YOLO v8 by 2.13, 0.33, and 3.09 percentage points, respectively, while operating at 32f/s for real-time PC-based monitoring. A dual-platform system (Web and Android mobile) demonstrated field performance with 1.38s average response time, 96.34% of accuracy, and 3.86% of missed detection rate. This system can provide an efficient solution for precision pest control and advance intelligent agricultural monitoring.