GG-YOLO: A Lightweight Dual-Path Attention Detector with Dynamic Sampling for Dense Wheat Spike Detection
Abstract
1. Introduction
- A Dual-path Attentive Ghost Mechanism (DAGM) is developed to enhance feature discrimination in densely overlapping wheat spike regions. By integrating gradient-guided attention with adaptive feature fusion, DAGM strengthens the representation of spike boundaries and suppresses feature ambiguity caused by occlusion and background interference. This design enables more accurate localization and recognition of closely adjacent wheat spikes under complex field conditions.
- A dual-mode adaptive sampling module (DSample) is introduced to improve multi-scale feature fusion and spatial detail preservation. Building upon the dynamic sampling paradigm, DSample incorporates a Low-Power (LP) mode and a Pixel-Blending (PB) mode to balance computational efficiency and boundary reconstruction capability. This design enhances localization precision while maintaining deployment flexibility across different hardware platforms.
- A lightweight detection head based on C3Ghost is constructed to reduce computational redundancy without sacrificing detection performance. By replacing the original C2f structure in the YOLOv8 detection head, the proposed design effectively decreases model complexity and computational cost while preserving the spatial semantics required for dense-object detection tasks.
- System-Level Contribution: The synergistic integration of these specific modules into GG-YOLO creates a unified framework tailored for agricultural applications, achieving a state-of-the-art mAP@50 of 96.47% at 165 FPS on the GlobalWheat2020 dataset.
2. Related Work
2.1. Convolutional Neural Networks in Wheat Ear Detection
2.2. Complex Background Dense Target Detection
2.3. Lightweight Object Detection Models
3. Proposed Method
3.1. Dsample
3.2. Dual-Path Attentive Ghost Mechanism
3.3. C3ghost
3.4. Design Analysis of GG-Yolo
4. Environment and Parameterization
4.1. Model Training Environment
4.2. Experimental Dataset Setup
4.3. Public Evaluation Indicators
4.4. Results and Analysis
4.5. Edge Deployment Performance Evaluation
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Yao, Y.; Guo, W.; Gou, J.; Hu, Z.; Liu, J.; Ma, J.; Zong, Y.; Xin, M.; Chen, W.; Li, Q.; et al. Wheat2035: Integrating pan-omics and advanced biotechnology for future wheat design. Mol. Plant 2025, 18, 272–297. [Google Scholar] [CrossRef]
- Ma, Y. Does “zero growth policy” affect environmental productivity of wheat production in China. Agriculture 2025, 15, 378. [Google Scholar] [CrossRef]
- Harfouche, A.L.; Jacobson, D.A.; Kainer, D.; Romero, J.C.; Harfouche, A.H.; Mugnozza, G.S.; Moshelion, M.; Tuskan, G.A.; Keurentjes, J.J.B.; Altman, A. Accelerating climate resilient plant breeding by applying next-generation artificial intelligence. Trends Biotechnol. 2019, 37, 1217–1235. [Google Scholar] [CrossRef]
- Zhao, J.; Dong, H.; Han, J.; Ou, J.; Chen, T.; Wang, Y.; Liu, S.; Yu, R.; Zheng, W.; Li, C.; et al. Lwrr: Landscape of wheat rust resistance towards practical breeding design. Stress Biol. 2025, 5, 25. [Google Scholar] [CrossRef] [PubMed]
- Arif, M.; Haroon, M.; Nawaz, A.F.; Abbas, H.; Xu, R.; Li, L. Enhancing wheat resilience: Biotechnological advances in combating heat stress and environmental challenges. Plant Mol. Biol. 2025, 115, 41. [Google Scholar] [CrossRef] [PubMed]
- Han, G.; Yan, H.; Li, L.; An, D. Advancing wheat breeding using rye: A key contribution to wheat breeding history. Trends Biotechnol. 2025, 43, 2170–2183. [Google Scholar] [CrossRef]
- Li, S.; Lin, D.; Zhang, Y.; Deng, M.; Chen, Y.; Lv, B.; Li, B.; Lei, Y.; Wang, Y.; Zhao, L.; et al. Genome-edited powdery mildew resistance in wheat without growth penalties. Nature 2022, 602, 455–460. [Google Scholar] [CrossRef] [PubMed]
- Liu, Q.; Zuo, S.-M.; Peng, S.; Zhang, H.; Peng, Y.; Li, W.; Xiong, Y.; Lin, R.; Feng, Z.; Li, H.; et al. Development of machine learning methods for accurate prediction of plant disease resistance. Engineering 2024, 40, 100–110. [Google Scholar] [CrossRef]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef]
- Ma, N.; Su, Y.; Yang, L.; Li, Z.; Yan, H. Wheat seed detection and counting method based on improved yolov8 model. Sensors 2024, 24, 1654. [Google Scholar] [CrossRef]
- Ali, M.L.; Zhang, Z. The yolo framework: A comprehensive review of evolution, applications, and benchmarks in object detection. Computers 2024, 13, 336. [Google Scholar] [CrossRef]
- Shobaki, W.A.; Milanova, M. A comparative study of yolo, ssd, faster r-cnn, and more for optimized eye-gaze writing. Sci 2025, 7, 47. [Google Scholar] [CrossRef]
- Hu, Y.; Jiang, H.; Feng, D.; Tian, L.; Luo, H.; Zhang, S. Performance impact and interplay of ssd parallelism through advanced commands, allocation strategy and data granularity. In ICS ‘11: International Conference on Supercomputing, Tucson, AZ, USA, 31 May–4 June 2011; Association for Computing Machinery: New York NY, USA, 2011; pp. 96–107. [Google Scholar]
- Eissa, H.F.; Hassanien, S.E.; Ramadan, A.M.; El-Shamy, M.M.; Saleh, O.M.; Shokry, A.M.; Abdelsattar, M.; Morsy, Y.B.; El-Maghraby, M.A.; Alameldin, H.F.; et al. Developing transgenic wheat to encounter rusts and powdery mildew by overexpressing barley chi26 gene for fungal resistance. Plant Methods 2017, 13, 41. [Google Scholar] [CrossRef]
- Madec, S.; Jin, X.; Lu, H.; De Solan, B.; Liu, S.; Duyme, F.; Heritier, E.; Baret, F. Ear density estimation from high resolution rgb imagery using deep learning technique. Agric. For. Meteorol. 2019, 264, 225–234. [Google Scholar] [CrossRef]
- Peng, J.; Wang, D.; Zhu, W.; Yang, T.; Liu, Z.; Rezaei, E.E.; Li, J.; Sun, Z.; Xin, X. Combination of uav and deep learning to estimate wheat yield at ripening stage: The potential of phenotypic features. Int. J. Appl. Earth Obs. Geoinf. 2023, 124, 103494. [Google Scholar] [CrossRef]
- Carlier, A.; Dandrifosse, S.; Dumont, B.; Mercatoris, B. Wheat ear segmentation based on a multisensor system and superpixel classification. Plant Phenomics 2022, 2022, 9841985. [Google Scholar] [CrossRef]
- Shen, X.; Li, S.; Qiu, F.; Yao, L. A lightweight real-time unified detection model for rice and wheat ears in complex agricultural environments. Smart Agric. Technol. 2025, 11, 101055. [Google Scholar] [CrossRef]
- Wang, D.; Zhang, D.; Yang, G.; Xu, B.; Luo, Y.; Yang, X. Ssrnet: In-field counting wheat ears using multi-stage convolutional neural network. IEEE Trans. Geosci. Remote Sens. 2021, 60, 4403311. [Google Scholar] [CrossRef]
- Yao, Z.; Liu, T.; Yang, T.; Ju, C.; Sun, C. Rapid detection of wheat ears in orthophotos from unmanned aerial vehicles in fields based on yolox. Front. Plant Sci. 2022, 13, 851245. [Google Scholar] [CrossRef]
- Guan, Y.; Pan, J.; Fan, Q.; Yang, L.; Yin, X.; Jia, W. Ctwheatnet: Accurate detection model of wheat ears in field. Comput. Electron. Agric. 2024, 225, 109272. [Google Scholar] [CrossRef]
- Wang, H.; Shi, M.; Tian, S.; Xie, Y.; Fang, Y. Research on wheat ears detection method based on improved yolov5. In Artificial Intelligence in China, Proceedings of the 4th International Conference on Artificial Intelligence in China, Changbaishan, China, 23–24 July 2022; Springer: Singapore, 2022; pp. 119–129. [Google Scholar]
- Dandrifosse, S.; Ennadifi, E.; Carlier, A.; Gosselin, B.; Dumont, B.; Mercatoris, B. Deep learning for wheat ear segmentation and ear density measurement: From heading to maturity. Comput. Electron. Agric. 2022, 199, 107161. [Google Scholar] [CrossRef]
- Zou, Z.; Chen, K.; Shi, Z.; Guo, Y.; Ye, J. Object detection in 20 years: A survey. Proc. IEEE 2023, 111, 257–276. [Google Scholar] [CrossRef]
- Tan, M.; Le, Q. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning; PMLR: Cambridge, MA, USA, 2019; pp. 6105–6114. [Google Scholar]
- Girshick, R.; Iandola, F.; Darrell, T.; Malik, J. Deformable part models are convolutional neural networks. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 437–446. [Google Scholar]
- Redmon, J.; Farhadi, A. Yolo9000: Better, faster, stronger. In Proceedings of the 30th IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 7263–7271. [Google Scholar]
- Zhao, J.; Zhang, X.; Yan, J.; Qiu, X.; Yao, X.; Tian, Y.; Zhu, Y.; Cao, W. A wheat spike detection method in uav images based on improved yolov5. Remote Sens. 2021, 13, 3095. [Google Scholar] [CrossRef]
- Meng, X.; Li, C.; Li, J.; Li, X.; Guo, F.; Xiao, Z. Yolov7-ma: Improved yolov7-based wheat head detection and counting. Remote Sens. 2023, 15, 3770. [Google Scholar] [CrossRef]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar] [CrossRef]
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y.M. Yolov4: Optimal speed and accuracy of object detection. arXiv 2020, arXiv:2004.10934. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 7464–7475. [Google Scholar]
- Zhang, H.; Li, G.; Wan, D.; Wang, Z.; Dong, J.; Lin, S.; Deng, L.; Liu, H. Ds-yolo: A dense small object detection algorithm based on inverted bottleneck and multi-scale fusion network. Biomim. Intell. Robot. 2024, 4, 100190. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Yeh, I.-H.; Liao, H.-Y.M. Yolov9: Learning what you want to learn using programmable gradient information. In Computer Vision—ECCV 2024: 18th European Conference, Milan, Italy, 29 September–4 October 2024, Proceedings, Part XXXI; Springer: Berlin/Heidelberg, Germany, 2024; pp. 1–21. [Google Scholar]
- Xie, S.; Zhou, M.; Wang, C.; Huang, S. Csspartial-yolo: A lightweight yolo-based method for typical objects detection in remote sensing images. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2023, 17, 388–399. [Google Scholar] [CrossRef]
- Qin, D.; Leichner, C.; Delakis, M.; Fornoni, M.; Luo, S.; Yang, F.; Wang, W.; Banbury, C.; Ye, C.; Akin, B.; et al. Mobilenetv4: Universal models for the mobile ecosystem. In Computer Vision—ECCV 2024: 18th European Conference, Milan, Italy, 29 September–4 October 2024, Proceedings, Part XL; Springer: Cham, Switzerland, 2024; pp. 78–96. [Google Scholar]
- Han, K.; Wang, Y.; Xu, C.; Guo, J.; Xu, C.; Wu, E.; Tian, Q. Ghostnets on heterogeneous devices via cheap operations. Int. J. Comput. Vis. 2022, 130, 1050–1069. [Google Scholar] [CrossRef]
- Cai, Z.; Shen, Q. Falconnet: Factorization for the light-weight convnets. In Neural Information Processing: 30th International Conference, ICONIP 2023, Changsha, China, 20–23 November 2023, Proceedings, Part II; Springer: Singapore, 2023; pp. 368–380. [Google Scholar]
- Hu, M.; Li, Z.; Yu, J.; Wan, X.; Tan, H.; Lin, Z. Efficient-lightweight yolo: Improving small object detection in yolo for aerial images. Sensors 2023, 23, 6423. [Google Scholar] [CrossRef] [PubMed]
- Rana, S.; Hensel, O.; Nasirahmadi, A. From vineyard to vision: Multi-domain analysis and mitigation of grape cluster detection failures in complex viticultural environments. Results Eng. 2025, 29, 108833. [Google Scholar] [CrossRef]
- Lou, M.; Zhang, S.; Zhou, H.-Y.; Yang, S.; Wu, C.; Yu, Y. Transxnet: Learning both global and local dynamics with a dual dynamic token mixer for visual recognition. IEEE Trans. Neural Netw. Learn. Syst. 2025, 36, 11534–11547. [Google Scholar] [CrossRef] [PubMed]
- Fang, C.; Yang, X. Lightweight yolov8 for wheat head detection. IEEE Access 2024, 12, 66214–66222. [Google Scholar] [CrossRef]
- Yang, B.; Zhu, Y.; Zhou, S. Accurate wheat lodging extraction from multi-channel UAV images using a lightweight network model. Sensors 2021, 21, 6826. [Google Scholar] [CrossRef]
- David, E.; Madec, S.; Sadeghi-Tehran, P.; Aasen, H.; Zheng, B.; Liu, S.; Kirchgessner, N.; Ishikawa, G.; Nagasawa, K.; Badhon, M.A.; et al. Global wheat head detection (gwhd) dataset: A large and diverse dataset of high-resolution rgb-labelled images to develop and benchmark wheat head detection methods. Plant Phenomics 2020, 2020, 3521852. [Google Scholar] [CrossRef]






| Method | Ghost Feature Generation | Dynamic Sampling | Attention Mechanism | Lightweight Head | Agricultural-Oriented Design | Key Difference |
|---|---|---|---|---|---|---|
| GhostNet | ✓ | × | × | ✓ | × | Cheap feature generation |
| DySample | × | ✓ | × | × | × | Dynamic upsampling |
| YOLOv8s | × | × | × | × | × | Baseline detector |
| YOLOv9 | × | × | ✓ | × | × | Programmable gradient learning |
| YOLOv11 | × | × | ✓ | ✓ | × | Lightweight optimization |
| GG-YOLO | ✓ | ✓ | ✓ | ✓ | ✓ | Gradient-guided attention + Dual-mode sampling + C3Ghost integration |
| Dataset | GlobalWheat2020 Dataset | HNKJXYwheat |
|---|---|---|
| P% | 94.35 ± 0.11 | 90.85 ± 0.16 |
| R% | 91.93 ± 0.14 | 87.23 ± 0.22 |
| mAP@50% | 96.47 ± 0.09 | 89.25 ± 0.17 |
| mAP@50-90% | 60.78 ± 0.18 | 57.28 ± 0.24 |
| Parameters (M) | 7.89 | 7.89 |
| Model | P% ↑ | R% ↑ | mAP@50% ↑ | mAP@50-90% ↑ | Parameters (M) ↓ | GFLOPs ↓ | FPS ↑ |
|---|---|---|---|---|---|---|---|
| YOLOv8s | 92.75 ± 0.12 | 87.54 ± 0.18 | 93.87 ± 0.15 | 55.54 ± 0.20 | 11.44 | 28.7 | 145 |
| YOLOv9 | 92.83 ± 0.14 | 88.72 ± 0.21 | 94.19 ± 0.13 | 56.37 ± 0.22 | 16.87 | 32.0 | 138 |
| YOLOv11 | 92.61 ± 0.16 | 89.38 ± 0.19 | 94.76 ± 0.11 | 56.80 ± 0.23 | 25.8 | 26.4 | 142 |
| Rtdetr-r18 | 94.08 ± 0.10 | 91.54 ± 0.14 | 96.32 ± 0.09 | 61.70 ± 0.17 | 20.18 | 58.3 | 110 |
| Rtdetr-l | 92.90 ± 0.13 | 91.67 ± 0.18 | 95.13 ± 0.12 | 58.07 ± 0.21 | 32.0 | 63.0 | 98 |
| Faster R-CNN | 92.43 ± 0.15 | 90.63 ± 0.20 | 93.27 ± 0.14 | 60.75 ± 0.24 | 38.7 | 68.0 | 85 |
| FFCA-YOLO | 91.82 ± 0.18 | 89.02 ± 0.17 | 94.50 ± 0.16 | 56.64 ± 0.22 | 18.4 | 24.8 | 152 |
| YOLO-word | 93.20 ± 0.14 | 90.10 ± 0.15 | 95.20 ± 0.11 | 52.30 ± 0.19 | 28.5 | 35.2 | 132 |
| Keras-retinanet | 91.50 ± 0.21 | 88.30 ± 0.24 | 92.80 ± 0.18 | 48.60 ± 0.25 | 36.2 | 72.1 | 76 |
| BorderDet | 93.80 ± 0.12 | 91.20 ± 0.16 | 96.00 ± 0.13 | 54.20 ± 0.20 | 22.7 | 45.6 | 120 |
| GG-YOLO | 94.35 ± 0.09 | 91.93 ± 0.12 | 96.47 ± 0.08 | 60.78 ± 0.15 | 7.89 | 20.4 | 165 |
| YOLOv8s | DSample | DAGM | C3Ghost | Recall% ↑ | mAP50-90% ↑ | mAP50% ↑ | Parameters (M) ↓ | GFLOPs ↓ | FPS ↑ |
|---|---|---|---|---|---|---|---|---|---|
| ✓ | 87.54 ± 0.18 | 55.54 ± 0.22 | 93.87 ± 0.14 | 11.14 | 28.7 | 145 | |||
| ✓ | ✓ | 89.38 ± 0.21 | 57.31 ± 0.19 | 95.47 ± 0.12 | 11.16 | 30.7 | 115 | ||
| ✓ | ✓ | ✓ | 90.24 ± 0.17 | 57.76 ± 0.24 | 95.96 ± 0.15 | 14.3 | 30.1 | 95 | |
| ✓ | ✓ | ✓ | ✓ | 91.93 ± 0.13 | 60.78 ± 0.16 | 96.47 ± 0.09 | 7.89 | 20.4 | 165 |
| Model | Model Size (MB) | Peak Memory (MB) | Latency (ms) | FPS |
|---|---|---|---|---|
| YOLOv8s | 22.9 | 265 | 23.2 | 43 |
| GG-YOLO | 15.8 | 190 | 15.6 | 64 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Gao, G.; Zhou, F.; Xu, L.; Zhang, J.; Li, X. GG-YOLO: A Lightweight Dual-Path Attention Detector with Dynamic Sampling for Dense Wheat Spike Detection. Agronomy 2026, 16, 1156. https://doi.org/10.3390/agronomy16121156
Gao G, Zhou F, Xu L, Zhang J, Li X. GG-YOLO: A Lightweight Dual-Path Attention Detector with Dynamic Sampling for Dense Wheat Spike Detection. Agronomy. 2026; 16(12):1156. https://doi.org/10.3390/agronomy16121156
Chicago/Turabian StyleGao, Guohong, Fucheng Zhou, Lijun Xu, Jiaxin Zhang, and Xueyong Li. 2026. "GG-YOLO: A Lightweight Dual-Path Attention Detector with Dynamic Sampling for Dense Wheat Spike Detection" Agronomy 16, no. 12: 1156. https://doi.org/10.3390/agronomy16121156
APA StyleGao, G., Zhou, F., Xu, L., Zhang, J., & Li, X. (2026). GG-YOLO: A Lightweight Dual-Path Attention Detector with Dynamic Sampling for Dense Wheat Spike Detection. Agronomy, 16(12), 1156. https://doi.org/10.3390/agronomy16121156

