Generalized Focal Loss WheatNet (GFLWheatNet): Accurate Application of a Wheat Ear Detection Model in Field Yield Prediction
Abstract
:1. Introduction
- (1)
- Diversity of wheat ears: Wheat ears exhibit different appearances in various regions, growth stages, and varieties.
- (2)
- Variability in ear shapes: Wheat ear shapes in images vary due to factors such as camera angles, the posture of ear growth, and lighting conditions, resulting in overlapping, occlusion, and backlighting.
- (3)
- Similar background: Wheat ears at different growth stages closely resemble stem and leaf backgrounds of the same color, leading to potential issues like false positives and missed detections.
- (1)
- The problem of false positives and redundant detections in cases of dense and highly overlapping wheat ears;
- (2)
- Occurrences of missed detections and false positives for a large number of small wheat ears from various angles;
- (3)
- Issues related to the weak robustness and generalization of the detection model in unstructured field environments.
2. Materials and Methods
2.1. Dataset
- (1)
- Inconsistent shape and size of wheat ear targets: due to differences in growth environments, varieties, and growth stages, wheat ear targets have significant variations in shape and size, including many small wheat ear targets.
- (2)
- Occlusion and overlap of wheat ear targets: wheat ear targets are not only easily occluded by wheat leaves or other plant parts but also exhibit dense growth and high-density overlap.
- (3)
- Lighting conditions and complex backgrounds: wheat images contain a large number of disturbances, such as lighting conditions during photography and weeds. Some of these disturbances have similar shapes and colors to wheat ear targets.
2.2. GFLWheatNet
2.2.1. Feature Extraction
2.2.2. Feature Reinforce
2.2.3. Detection Head
2.2.4. Generalized Focal Loss
3. Results
3.1. Experimental Environment and Parameter Configuration
3.2. Model Training and Performance Analysis
3.3. Ablation Study
4. Conclusions
5. Discussion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Food and Agriculture Organization of the United Nations. Available online: https://www.fao.org/documents/card/en/c/cc2211en (accessed on 24 March 2024).
- Tester, M.; Langridge, P. Breeding technologies to increase crop production in a changing world. Science 2010, 327, 818–822. [Google Scholar] [CrossRef] [PubMed]
- Xu, K.; Shu, L.; Xie, Q.; Song, M.; Zhu, Y.; Cao, W.; Ni, J. Precision weed detection in wheat fields for agriculture 4.0: A survey of enabling technologies, methods, and research challenges. Comput. Electron. Agric. 2023, 212, 108106. [Google Scholar] [CrossRef]
- Li, Y.; Zhan, X.; Liu, S.; Lu, H.; Jiang, R.; Guo, W.; Chapman, S.; Ge, Y.; Solan, B.; Ding, Y.; et al. Self-Supervised Plant Phenotyping by Combining Domain Adaptation with 3D Plant Model Simulations: Application to Wheat Leaf Counting at Seedling Stage. Plant Phenomics 2023, 5, 0041. [Google Scholar] [CrossRef] [PubMed]
- Zhu, Y.; Cao, Z.; Lu, H.; Li, Y.; Xiao, Y. In-field automatic observation of wheat heading stage using computer vision. Biosyst. Eng. 2016, 143, 28–41. [Google Scholar] [CrossRef]
- Xu, X.; Li, H.; Yin, F.; Xi, L.; Qiao, H.; Ma, Z.; Shen, S.; Jiang, B.; Ma, X. Wheat ear counting using K-means clustering segmentation and convolutional neural network. Plant Methods 2020, 16, 1–13. [Google Scholar] [CrossRef] [PubMed]
- Tesfaye, A.A.; Osgood, D.; Aweke, B.G. Combining machine learning, space-time cloud restoration and phenology for farm-level wheat yield prediction. Artif. Intell. Agric. 2021, 5, 208–222. [Google Scholar] [CrossRef]
- Zhao, F.W.K.; Yuan, Y. Study on Wheat Ear Identification Based on Color Features and AdaBoost Algorithm; Hebei Agricultural University: Baoding, China, 2015. [Google Scholar]
- Liu, C.; Wang, K.; Lu, H.; Cao, Z. Dynamic color transform networks for wheat head detection. Plant Phenomics 2022, 2022, 9818452. [Google Scholar] [CrossRef] [PubMed]
- Fernandez-Gallego, J.A.; Kefauver, S.C.; Gutiérrez, N.A.; Nieto-Taladriz, M.T.; Araus, J.L. Wheat ear counting in-field conditions: High throughput and low-cost approach using RGB images. Plant Methods 2018, 14, 1–12. [Google Scholar] [CrossRef] [PubMed]
- Liu, Z.; Huang, W.; Wang, L. Field wheat ear counting automatically based on improved K-means clustering algorithm. Trans. Chin. Soc. Agric. Eng. (Transactions Csae) 2019, 35, 174–181. [Google Scholar]
- Zhou, J.; Tardieu, F.; Pridmore, T.; Doonan, J.; Reynolds, D.; Hall, N.; Griffiths, S.; Cheng, T.; Zhu, Y.; Jiang, D.J. Plant phenomics: History, present status and challenges. J. Nanjing Agric. Univ. 2018, 41, 580–588. [Google Scholar]
- Jia, W.; Sun, M.; Lian, J.; Hou, S.J.C.; Systems, I. Feature dimensionality reduction: A review. Complex Intell. Syst. 2022, 8, 2663–2693. [Google Scholar] [CrossRef]
- Ball, J.E.; Anderson, D.T.; Chan, C.S. Comprehensive survey of deep learning in remote sensing: Theories, tools, and challenges for the community. J. Appl. Remote Sens. 2017, 11, 042609. [Google Scholar] [CrossRef]
- Chen, Z.; Zheng, Y.; Gee, J.C. TransMatch: A transformer-based multilevel dual-stream feature matching network for unsupervised deformable image registration. IEEE Trans. Med. Imaging 2023, 43, 15–27. [Google Scholar] [CrossRef] [PubMed]
- Zheng, Y.; Yang, Y.; Che, T.; Hou, S.; Huang, W.; Gao, Y.; Tan, P. Image matting with deep gaussian process. IEEE Trans. Neural Netw. Learn. Syst. 2022, 34, 8879–8893. [Google Scholar] [CrossRef] [PubMed]
- Xu, B.; Wan, X.; Yang, H.; Feng, H.; Fu, Y.; Cen, H.; Wang, B.; Zhang, Z.; Li, S.; Zhao, C.; et al. TIPS: A three-dimensional phenotypic measurement system for individual maize tassel based on TreeQSM. Comput. Electron. Agric. 2023, 212, 108150. [Google Scholar] [CrossRef]
- Wu, J.; Yang, G.; Yang, H.; Zhu, Y.; Li, Z.; Lei, L.; Zhao, C. Extracting apple tree crown information from remote imagery using deep learning. Comput. Electron. Agric. 2020, 174, 105504. [Google Scholar] [CrossRef]
- Xie, P.; Du, R.; Ma, Z.; Cen, H. Generating 3D multispectral point clouds of plants with fusion of snapshot spectral and RGB-D images. Plant Phenomics 2023, 5, 0040. [Google Scholar] [CrossRef] [PubMed]
- Abdalla, A.; Cen, H.; El-manawy, A.; He, Y. Infield oilseed rape images segmentation via improved unsupervised learning models combined with supreme color features. Comput. Electron. Agric. 2019, 162, 1057–1068. [Google Scholar] [CrossRef]
- Ji, F.; Meng, J.; Cheng, Z.; Fang, H.; Wang, Y. Crop yield estimation at field scales by assimilating time series of Sentinel-2 data into a modified CASA-WOFOST coupled model. IEEE Trans. Geosci. Remote Sens. 2021, 60, 1–14. [Google Scholar] [CrossRef]
- Jia, W.; Tian, Y.; Luo, R.; Zhang, Z.; Lian, J.; Zheng, Y. Detection and segmentation of overlapped fruits based on optimized mask R-CNN application in apple harvesting robot. Comput. Electron. Agric. 2020, 172, 105380. [Google Scholar] [CrossRef]
- 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]
- Bao, W.; Lin, Z.; Hu, G.; Liang, D.; Huang, L.; Zhang, X. Method for wheat ear counting based on frequency domain decomposition of MSVF-ISCT. Inf. Process. Agric. 2023, 10, 240–255. [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, 1–11. [Google Scholar] [CrossRef]
- Jubair, S.; Tremblay-Savard, O.; Domaratzki, M. Gxenet: Novel fully connected neural network based approaches to incorporate gxe for predicting wheat yield. Artif. Intell. Agric. 2023, 8, 60–76. [Google Scholar] [CrossRef]
- Hasan, M.M.; Chopin, J.P.; Laga, H.; Miklavcic, S.J. Detection and analysis of wheat spikes using convolutional neural networks. Plant Methods 2018, 14, 1–13. [Google Scholar] [CrossRef] [PubMed]
- 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. 2016, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
- 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]
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Li, J.; Li, C.; Fei, S.; Ma, C.; Chen, W.; Ding, F.; Wang, Y.; Li, Y.; Shi, J.; Xiao, Z.J.S. Wheat ear recognition based on RetinaNet and transfer learning. Sensors 2021, 21, 4845. [Google Scholar] [CrossRef] [PubMed]
- Lin, T.-Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
- Chen, Q.; Wang, Y.; Yang, T.; Zhang, X.; Cheng, J.; Sun, J. You only look one-level feature. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 13039–13048. [Google Scholar]
- Yang, S.; Wang, S.; Wang, P. Detecting wheat ears per unit area using an improved YOLOX. Trans. Chin. Soc. Agric. Eng. 2022, 38, 143–149. [Google Scholar]
- Yu, Z.; Ye, J.; Li, C.; Zhou, H.; Li, X. TasselLFANet: A novel lightweight multi-branch feature aggregation neural network for high-throughput image-based maize tassels detection and counting. Front. Plant Sci. 2023, 14, 1158940. [Google Scholar] [CrossRef]
- Wang, B.; Yang, G.; Yang, H.; Gu, J.; Zhao, D.; Xu, S.; Xu, B. UAV images for detecting maize tassel based on YOLO_X and transfer learning. Trans. Chin. Soc. Agric. Eng. 2022, 38, 53–62. [Google Scholar]
- Mahaur, B.; Mishra, K.K. Small-object detection based on YOLOv5 in autonomous driving systems. Pattern Recognit. Lett. 2023, 168, 115–122. [Google Scholar] [CrossRef]
- Wang, X.; Liu, J. Vegetable disease detection using an improved YOLOv8 algorithm in the greenhouse plant environment. Sci. Rep. 2024, 14, 4261. [Google Scholar] [CrossRef]
- Solimani, F.; Cardellicchio, A.; Dimauro, G.; Petrozza, A.; Summerer, S.; Cellini, F.; Renò, V. Optimizing tomato plant phenotyping detection: Boosting YOLOv8 architecture to tackle data complexity. Comput. Electron. Agric. 2024, 218, 108728. [Google Scholar] [CrossRef]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
- David, E.; Serouart, M.; Smith, D.; Madec, S.; Velumani, K.; Liu, S.; Wang, X.; Pinto, F.; Shafiee, S.; Tahir, I.S. Global wheat head detection 2021: An improved dataset for benchmarking wheat head detection methods. Plant Phenomics 2021. [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.J.P.P. 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. [Google Scholar] [CrossRef]
- Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; pp. 213–229. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- He, Y.; Zhu, C.; Wang, J.; Savvides, M.; Zhang, X. Bounding box regression with uncertainty for accurate object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 2888–2897. [Google Scholar]
- Li, X.; Wang, W.; Hu, X.; Li, J.; Tang, J.; Yang, J. Generalized focal loss v2: Learning reliable localization quality estimation for dense object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 11632–11641. [Google Scholar]
- Tian, Z.; Shen, C.; Chen, H.; He, T. FCOS: Fully convolutional one-stage object detection. arXiv 1904, arXiv:1904.01355. [Google Scholar]
- Kong, T.; Sun, F.; Liu, H.; Jiang, Y.; Li, L.; Shi, J. Foveabox: Beyound anchor-based object detection. IEEE Trans. Image Process. 2020, 29, 7389–7398. [Google Scholar] [CrossRef]
- Yang, Z.; Liu, S.; Hu, H.; Wang, L.; Lin, S. Reppoints: Point set representation for object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 9657–9666. [Google Scholar]
- Zhang, S.; Chi, C.; Yao, Y.; Lei, Z.; Li, S.Z. Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 9759–9768. [Google Scholar]
- Reis, D.; Kupec, J.; Hong, J.; Daoudi, A. Real-time flying object detection with YOLOv8. arXiv 2023, arXiv:2305.09972. [Google Scholar]
Model | mAP (%) | (%) | (%) | (%) | (%) | (%) | FPS |
---|---|---|---|---|---|---|---|
Anchor-based one-stage: | |||||||
RetinaNet | 41.3 | 91.1 | 26.7 | 21.9 | 41.1 | 47.7 | 21.4 |
GFLV2 | 41.9 | 92.6 | 27.7 | 24.2 | 41.6 | 48.3 | 24.4 |
Anchor-based multi-stage: | |||||||
Faster R-CNN | 40.2 | 91.3 | 24.3 | 20.0 | 40.3 | 45.7 | 23.1 |
Anchor-free one-stage: | |||||||
FCOS | 39.8 | 90.7 | 23.9 | 20.2 | 40.2 | 47.6 | 17.9 |
FoveaBox | 38.2 | 90.0 | 17.0 | 23.4 | 34.4 | 33.5 | 19.1 |
Anchor-free key-point: | |||||||
RepPoints | 42.0 | 91.7 | 27.8 | 22.4 | 42.1 | 47.9 | 15.2 |
ATSS | 41.8 | 91.4 | 25.8 | 24.3 | 42.1 | 48.1 | 14.6 |
single-stage: | |||||||
YOLOv8n | 43.6 | 93.5 | 28.0 | 23.2 | 43.6 | 51.0 | 32.5 |
Ours | 43.3 | 93.7 | 30.2 | 25.6 | 43.4 | 50.7 | 26.4 |
Attention Mechanism | (%) | FPS | |
---|---|---|---|
SE | 93.42 | 24.57 | 25.48 |
GAM | 93.86 | 25.82 | 17.65 |
CBAM | 93.70 | 25.62 | 26.40 |
Models | CBAM | Reinforce Layer | (%) | (%) | FPS |
---|---|---|---|---|---|
GFLV2 | × | × | 92.6 | 24.20 | 24.40 |
GFLWheatNet | √ | × | 93.3 | 25.5 | 24.3 |
× | √ | 91.6 | 24.0 | 26.3 | |
√ | √ | 93.7 | 25.6 | 26.4 |
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. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Guan, Y.; Pan, J.; Fan, Q.; Yang, L.; Xu, L.; Jia, W. Generalized Focal Loss WheatNet (GFLWheatNet): Accurate Application of a Wheat Ear Detection Model in Field Yield Prediction. Agriculture 2024, 14, 899. https://doi.org/10.3390/agriculture14060899
Guan Y, Pan J, Fan Q, Yang L, Xu L, Jia W. Generalized Focal Loss WheatNet (GFLWheatNet): Accurate Application of a Wheat Ear Detection Model in Field Yield Prediction. Agriculture. 2024; 14(6):899. https://doi.org/10.3390/agriculture14060899
Chicago/Turabian StyleGuan, Yujie, Jiaqi Pan, Qingqi Fan, Liangliang Yang, Li Xu, and Weikuan Jia. 2024. "Generalized Focal Loss WheatNet (GFLWheatNet): Accurate Application of a Wheat Ear Detection Model in Field Yield Prediction" Agriculture 14, no. 6: 899. https://doi.org/10.3390/agriculture14060899
APA StyleGuan, Y., Pan, J., Fan, Q., Yang, L., Xu, L., & Jia, W. (2024). Generalized Focal Loss WheatNet (GFLWheatNet): Accurate Application of a Wheat Ear Detection Model in Field Yield Prediction. Agriculture, 14(6), 899. https://doi.org/10.3390/agriculture14060899