Detecting cotton pests and diseases using lightweight GSBS-YOLOv8
-
-
Abstract
Scale variation of disease and pest targets has caused the weak feature representation of small objects, thus limiting edge deployment in natural cotton fields. In this study, a lightweight cotton disease and pest detection model, GSBS-YOLOv8, was proposed using you only look once version 8 (YOLOv8). Detection accuracy was improved under field conditions, while substantially reducing model complexity, computational burden, and deployment cost. In the model design, GSConv and Ghost C2f modules were introduced into the backbone network and feature fusion to replace part of the conventional convolutional structure. Thereby, parameter redundancy was reduced for feature reuse, thus lowering computational overhead without weakening semantic extraction. A bidirectional feature pyramid network (BiFPN) was embedded into the neck to strengthen the bidirectional propagation and weighted fusion of shallow spatial information and deep semantic information. The fine-grained cues of small disease spots and pests were more effectively retained at different imaging distances. In addition, the Shape-IoU loss was adopted for bounding-box regression to enhance geometric matching between predicted boxes and target contours. Localization robustness was improved for small, slender, and irregular targets under complex canopy backgrounds. Experimental results showed that the improved model achieved a 1.0 percentage point increase in mean Average Precision (mAP) over the baseline YOLOv8 model, indicating that the lightweight reconstruction preserved the high recognition of multi-scale disease and pest targets. Meanwhile, the number of model parameters decreased from 3.01 to 1.19 million, with a reduction of 60.5%. While floating point operations (FLOPs) decreased from 8.2 to 4.7 G, with a reduction of 42.7%. The model size was compressed from 5.8 to 2.7 MB, thus representing a reduction of 53.4%. Storage and transmission were markedly lowered for the feasible deployment on resource-constrained hardware platforms. The accuracy and compression efficiency were improved simultaneously. The optimal architecture was enhanced to achieve feature representation efficiency to alleviate the common trade-off between lightweight design and detection performance. In the inference evaluation, the model reached 101.3 frames per second on a graphics processing unit (GPU), indicating strong real-time performance in a high-throughput computing environment. The inference speed still reached 43.7 frames per second after TensorRT acceleration on the Jetson Xavier NX platform. Efficient execution maintained under embedded conditions, fully meeting the practical requirement of real-time field monitoring. Lightweight convolution, ghost feature, bidirectional multi-scale fusion, and regression loss can effectively balance accuracy and efficiency for the small-object perception and localization performance. The substantial decline in detection was avoided with accompanying model compression. Therefore, GSBS-YOLOv8 can provide an effective, lightweight solution for intelligent edge-side monitoring of cotton diseases and pests in natural field environments. This finding can offer technical support for subsequent applications in rapid field scouting, precision prevention and control, and low-power agricultural vision.
-
-