Cotton aphid is one of the most major pests to significantly impact both fiber yield and quality. Accurate and timely monitoring of aphid populations is often required to effectively integrate pest prevention and control during cotton production worldwide. However, existing detection approaches have been constrained by the extremely small size of targets, high-density infestations, and serious background noise from cotton leaf textures and vein patterns. In this study, a multi-scale feature attention model, YOLO-ALST, was proposed to solve these limitations under complex field environments using deep learning. Three architectures were also integrated to overcome the challenges of aphid detection. 1) Embedded adaptive attention layer (AAL) in the network’s neck dynamically enhanced to represent aphid-dense channels, while suppressing redundant background noise, significantly identifying micro-targets from complex backgrounds. 2) Shifted window transformer (Swin Transformer) module was integrated to strengthen global semantic modeling. A hierarchical window self-attention mechanism was utilized to transcend the limitations of conventional convolutional receptive fields, effectively capturing spatial dependencies and long-range contextual information, particularly for target overlap and boundary ambiguity in high-density aphid colonies. 3) A hybrid loss function was integrated, ccomplete intersection over union (CIoU) loss with focal loss. Bounding box regression was optimized to correct localization biases for micro-targets, according to the consistency parameter of an aspect ratio. Class imbalance between positive and negative samples was reduced to enhance training stability and convergence efficiency. A large-scale multi-scenario dataset was constructed to validate the model, including 6 830 high-quality annotated images from diverse ecological environments in northern and southern Xinjiang, China. Extensive experiments were conducted on the mainstream detectors, including YOLOv5, YOLOv8, and YOLO11. The results show that YOLO-ALST achieved a mean average precision (mAP@50) of 88.89% on the overall test set, consistently outperforming the baseline and mainstream models. Notably, under high-density aphid scenarios—the most challenging conditions for current detectors—YOLO-ALST improved the mAP@50 to 78.85%, indicating a significant gain of 5.22 percentage points over the YOLO11 baseline, while maintaining superior robustness in precision and recall. Finally, a mobile was integrated with the YOLO-ALST model in a practical field. Accurate localization and counting of cotton aphids were realized to integrate with real-time image, photo detection, and offline analysis. Field experiment demonstrates that a mAP@50 of 82.56% and 71.42% were achieved in the low- and high-density scenarios, respectively. Exhibiting an average per-frame inference time of merely 42 and 53 ms for low- and high-density scenarios, respectively, the proposed mobile solution demonstrates significant superiority over traditional manual counting methods, effectively reducing the monitoring time by 13 minutes in low-density areas and 20 minutes in high-density clusters. Furthermore, the model was compressed into a footprint of only 12.8 MB, indicating efficient deployment on mobile terminals. These findings can effectively transform advanced deep learning into an efficient, practical productivity tool for large-scale monitoring in smart agriculture.
Publications
- Article type
- Year
- Co-author
Year
Issue
Transactions of the Chinese Society of Agricultural Engineering 2026, 42(13): 307-316
Published: 15 July 2026
Downloads:0
Total 1
京公网安备11010802044758号