Enhanced Lightweight Architecture for Real-Time Detection of Agricultural Pests and Diseases
Wang Cheng1, Zhuodong Liu2, Xiangyu Li3,*
1 School of Electronic and Information Engineering, Anhui University, Hefei, 230000, China
2 School of Economics and Management, Beijing Jiaotong University, Beijing, 100044, China
3 Department of Electronic Engineering, Shanghai Jiao Tong University, Shanghai, 200240, China
* Corresponding Author: Xiangyu Li. Email:
Computers, Materials & Continua https://doi.org/10.32604/cmc.2025.074250
Received 06 October 2025; Accepted 19 December 2025; Published online 19 January 2026
Abstract
Smart pest control is crucial for building farm resilience and ensuring sustainable agriculture in the face of climate change and environmental challenges. To achieve effective intelligent monitoring systems, agricultural pest and disease detection must overcome three fundamental challenges: feature degradation in dense vegetation environments, limited detection capability for sub-
32×32 pixel targets, and inadequate bounding box regression for irregular pest morphologies. This study proposes YOLOv12-KMA, a novel detection framework that addresses these limitations through four synergistic architectural innovations, specifically optimized for agricultural environments. First, we introduce efficient multi-head attention (C3K2-EMA), which reduces noise interference by 41% through selective regional attention while maintaining
O(k⋅n⋅d) computational complexity vs.
O(n2⋅d) for standard attention. Second, we develop A2C2f-KAN modules embedding Kolmogorov-Arnold networks (KAN) with B-spline activation functions, achieving 15% better feature representation for small targets without global distortion. Third, we propose minimum point distance intersection over union (MPDIoU) loss that resolves aspect ratio degeneration issues in complete intersection over union (CIoU), accelerating convergence by 23% for irregular pest shapes. Fourth, we implement the dynamic sampling (DySample) module that reduces computational overhead by 72% while preserving 94% feature fidelity compared to conventional interpolation methods. Comprehensive validation on 8742 annotated agricultural images demonstrates significant improvements: 2.6 percentage point increase in mean average precision (mAP)@0.5 (91.0%
→ 93.6%), 3.2 percentage point gain in mAP@0.5:0.95, with precision and recall improvements of 4.8% and 2.4%, respectively. Statistical analysis confirms significance (
p<0.001) with large effect sizes (
η2=0.78). The optimized architecture maintains real-time performance at 159 frames per second (FPS) on consumer hardware, enabling practical deployment in precision agriculture monitoring systems.
Keywords
Agricultural pest detection; smart pest control; attention mechanism; Kolmogorov-Arnold networks; object detection