Abstract:Aiming to address the issues of low detection accuracy and slow speed in the task of detecting rice field pests under insect pest monitoring and control lamps, including small pest target size, morphological diversity, and stacked and overlapping pest clusters, a recognition method based on improved YOLO v10n (named YOLO-FRP, short for YOLO-five rice pest) was proposed. The bi-directional feature pyramid network (BiFPN) was introduced to improve the original feature pyramid network (FPN), reducing parameters for easier deployment while leveraging bidirectional feature propagation to enhance the model’s fusion of low-level and high-level features. Meanwhile, a P2 small-target layer was further integrated into the BiFPN to strengthen multi-scale feature fusion, boosting stronger contextual awareness of diverse target sizes. A lightweight enhancement module, C2f_Star, was designed to replace the shallow C2f modules in the backbone network to improve multi-scale detection accuracy and computational efficiency. Concurrently, the C2fCIB module from YOLO v10s was transplanted into the backbone to replace the deep C2f modules to reduce computational complexity while enhancing precision. The experimental results demonstrated that the improved model achieved mAP@0.5 of 82.1% and recall rate of 79.5%, with parameter count of 1.64×106 and model size of 4.3MB. To further achieve high real-time detection and lightweight deployment of the model, a joint distillation-pruning strategy was adopted. The improved YOLO v10s model, which was enhanced with the EMA attention mechanism and the C2f_DySnakeConv dynamic snake-shaped convolution module, was used as the teacher model. L2 regularization distillation was applied to enhance the performance of the YOLO-FRP model, and a layer-adaptive magnitude-based pruning strategy was further adopted to reduce the model’s parameter count. Compared with the YOLO v10n model, the pruned and distilled model achieved 2.6 percentage points higher mAP@0.5 and 2.7 percentage points higher recall rate, and its frame rate was raised by 158f/s;its parameter count and model size were decreased by 65.64% and 56.36% respectively. Comparative experiments on the self-built dataset confirmed the effectiveness of the proposed improvements. The YOLO-FRP model exhibited superior detection accuracy and speed for five rice pest species under insect-attracting lamps, which validated that the distillation-pruning strategy could further compress the model size without accuracy loss and significantly improve the inference speed, providing technical reference for balancing accuracy and speed in real-time agricultural pest monitoring.