Abstract:Aiming to address the challenge of deploying deep learning models with large parameter sizes and high computational costs for rice pest and disease detection on resource-constrained agricultural edge devices, a lightweight method, YOLO 11-DG was proposed. With YOLO 11n as the baseline, an FC-C3K2 module incorporating a FlexConv dynamic channel matching mechanism was designed to resolve the channel dimension mismatch that occurred with the original C3K2 during structured pruning. A bounding box regression loss, YIoU, containing a normalized distance penalty term was introduced to alleviate the gradient vanishing problem of CIoU when predicted and ground-truth boxes were highly overlapped. On this basis, an FC-DepGraph structured pruning framework was constructed to automatically align channels across modules during pruning, significantly improving pruning efficiency and model compression. Experimental results showed that YOLO 11-DG achieved an mAP50 of 84.5%, with only 2.36×10^6 parameters and 2.6×10^9 FLOPs. Compared with the baseline YOLO 11n, the mAP50 was increased by 12.4 percentage points, the number of parameters was reduced by 21.3%, and the computational cost dropped by 49.0%. The method also outperformed YOLO v8-Corn, YOLO 11-LAMP, and SCD-YOLO 11, providing an effective lightweight solution for real-time rice pest and disease detection on edge devices.