Du Tong, Sun Tianyi, Ma Tuo, Li Zhiwei, Qing Guoche
Accepted: 2026-11-17
To address the resource-constrained deployment of goji pest detection models on edge devices, this paper proposes a lightweight detection model named LGPD-YOLO (Lightweight Goji Pest Detection-YOLO), which is specifically designed for edge deployment. The model achieves a balance between detection accuracy and computational cost through the co-design of structural lightweighting, feature compensation, and low-bit quantization. At the structural level, a half-width framework with halved channel numbers is constructed to compress the model scale, and Ghost convolutions are introduced to reduce the parameter count and computational load, while the C2f module and the residual fusion attention module R-EMA mechanism are incorporated to compensate for feature loss. At the quantization level, a mixed-precision quantization-aware training strategy for low-bit inference is designed: W8A8 is adopted as the basic quantization configuration for the backbone network, with 8-bit weight and activation quantization applied to the main convolutional operators in the network; for the residual fusion attention module R-EMA, which contains heterogeneous operators such as convolution, normalization, activation, Softmax, and matrix multiplication, operator-level differentiated integer approximation and fixed-point approximation are employed; for a few quantization-sensitive operators, including the PSA branch in C2PSA and the prediction layers at the detection head, FP32 computation is retained. Furthermore, per-channel weight quantization, asymmetric activation quantization, Conv-BN fusion, and the Hardswish activation function are utilized to reduce quantization errors, so as to accommodate the integer-only inference requirements of edge devices. Experimental results on a self-built goji pest dataset demonstrate that LGPD-YOLO has only 0.94M parameters, which is 63.7% fewer than the baseline YOLOv11n, while achieving mAP@0.5 of 88.3% and mAP@0.5:0.95 of 59.1%. After mixed-precision quantization-aware training, mAP@0.5 decreases from 88.3% to 87.4%, a drop of only 0.9 percentage points, and mAP@0.5:0.95 decreases from 59.1% to 57.7%, a drop of 1.4 percentage points. In terms of hardware-oriented theoretical cost evaluation, INT8 multiply-accumulate operations of the mixed-precision quantized model account for 95.81% of the main convolution and matrix multiplication operators; the bit-width-weighted computational cost is reduced from 1621.58GBOP under full precision to 165.00GBOP, a reduction of 89.82%; and the weight storage is compressed from 3.74MB to 1.07MB, a reduction of 71.50%. This provides an algorithm design and theoretical evaluation scheme for the low-bit deployment of the goji berry pest detection model on resource-constrained edge devices.