Abstract
Accurate classification of landscape features is essential for precision agriculture, supporting targeted practices such as weed control and variable-rate applications. Although machine and deep learning models show strong promise for real-time weed detection, they require large labelled datasets, which are costly and time-consuming to produce. This study develops and evaluates an automated feature-labelling workflow using eCognition (v9.5) for Unmanned Aerial Vehicle (UAV) RGB imagery. The workflow was tested on a ~ 2000 m² research field at the University of Saskatchewan using high-resolution imagery (0.088 cm). The field contained strips of kochia, wild oat, wild mustard, and false cleavers seeded between wheat rows. The workflow combines multiple spatial algorithms, including segmentation, line detection, distance mapping, convolution filtering, morphological operations, and thresholding. Vegetation indices such as the Colour Index of Vegetation and Excess Green Index effectively separated crops and weeds from soil. Using randomly distributed labelling points and a confusion matrix, the workflow achieved 87% overall accuracy (kappa = 0.81) without manual training labels. This automated workflow demonstrates strong potential for accelerating dataset creation for machine learning and deep learning applications, reducing manual effort while maintaining accuracy. Future work will focus on improving its transferability across fields, dates, and experimental conditions.
Similar content being viewed by others
Data availability
The research data supporting the results of this manuscript are available from the corresponding author upon reasonable request. The RGB imagery used in the analysis can be accessed at the following URL: https://tinyurl.com/45zeta4t.
References
Oerke, E. C., Dehne, H. W., Schönbeck, F. & Weber, A. Crop Production and Crop Protection: Estimated Losses in Major Food and Cash Crops. (2012).
Beckie, H. J. et al. Herbicide-resistant weeds in the Canadian prairies: 2012 to 2017. Weed Technol. 34, 461–474. https://doi.org/10.1017/wet.2019.128 (2020).
Geddes, C. M., Page, E. R. & Bae, J. Forging new paths to manage herbicide-resistant weeds. Can. J. Plant Sci. 105, 1–5 (2024).
Villette, S., Maillot, T., Guillemin, J. P. & Douzals, J. P. Simulation-aided study of herbicide patch spraying: influence of spraying features and weed spatial distributions. Comput. Electron. Agric. 182, 105981. https://doi.org/10.1016/j.compag.2020.105981 (2021).
Grisso, R. D., Alley, M. M., Thomason, W. E., Holshouser, D. L. & Roberson, G. T. Precision farming tools: variable-rate application. (2011).
Zanin, A. R. A. et al. Reduction of pesticide application via real-time precision spraying. Sci. Rep. 12, 1–12. https://doi.org/10.1038/s41598-022-09607-w (2022).
Islam, N. et al. Early weed detection using image processing and machine learning techniques in an Australian chilli farm. Agriculture. 11, 387. https://doi.org/10.3390/agriculture11050387 (2021).
Li, R. et al. Lightweight CNN–transformer hybrid network with contrastive learning for few-shot noxious weed recognition. Horticulturae 11, 1236 (2025).
Islam, T., Sarker, T. T., Ahmed, K. R., Rankrape, C. B. & Gage, K. WeedSwin hierarchical vision transformer with SAM-2 for multi-stage weed detection and classification. Sci. Rep. 15, 23274. https://doi.org/10.1038/s41598-025-05092-z (2025).
Chen, Z. et al. Towards end-to-end rice row detection in paddy fields exploiting two-pathway instance segmentation. Comput. Electron. Agric. 231, 109963. https://doi.org/10.1016/j.compag.2025.109963 (2025).
Su, J. et al. Spectral analysis and mapping of blackgrass weed by leveraging machine learning and UAV multispectral imagery. Comput. Electron. Agric. 192, 106621. https://doi.org/10.1016/j.compag.2021.106621 (2022).
Uddin, M. A., Mansour, A., Jeune, D. L., Ayaz, M. & Aggoune, E.-H. M. UAV-assisted dynamic clustering of wireless sensor networks for crop health monitoring. Sensors 18, 555. https://doi.org/10.3390/s18020555 (2018).
Zhang, T. et al. Phenotyping flowering in Canola (Brassica napus L.) and estimating seed yield using an unmanned aerial vehicle-based imagery. Front. Plant Sci. 12, 1178. https://doi.org/10.3389/fpls.2021.686332 (2021).
Candiago, S., Remondino, F., De Giglio, M., Dubbini, M. & Gattelli, M. Evaluating multispectral images and vegetation indices for precision farming applications from UAV images. Remote Sens. 7, 4026–4047 (2015).
Lam, O. H. Y. et al. An open source workflow for weed mapping in native grassland using unmanned aerial vehicle: using Rumex obtusifolius as a case study. Eur. J. Remote Sens. 54, 71–88. https://doi.org/10.1080/22797254.2020.1793687 (2021).
Duddu, H. S., Johnson, E. N., Willenborg, C. J. & Shirtliffe, S. J. High-throughput UAV image-based method is more precise than manual rating of herbicide tolerance. Plant. Phenomics. 2019 https://doi.org/10.34133/2019/6036453 (2019).
Esposito, M., Crimaldi, M., Cirillo, V., Sarghini, F. & Maggio, A. Drone and sensor technology for sustainable weed management: A review. Chem. Biol. Technol. Agric. 8, 1–11. https://doi.org/10.1186/s40538-021-00217-8 (2021).
Li, B. et al. The estimation of crop emergence in potatoes by UAV RGB imagery. Plant. Methods. 15, 1–13. https://doi.org/10.1186/s13007-019-0399-7 (2019).
Zou, K., Chen, X., Zhang, F., Zhou, H. & Zhang, C. A field weed density evaluation method based on UAV imaging and modified U-net. Remote Sens. 13, 310. https://doi.org/10.3390/rs13020310 (2021).
Lima, F., Blanco-Sepúlveda, R., Gómez-Moreno, M. L., Dorado, J. & Peña, J. M. Mapping tillage direction and contour farming by object-based analysis of UAV images. Comput. Electron. Agric. 187, 106281. https://doi.org/10.1016/j.compag.2021.106281 (2021).
Bah, M. D., Hafiane, A. & Canals, R. Deep learning with unsupervised data labeling for weed detection in line crops in UAV images. Remote Sens. 10, 1690. https://doi.org/10.3390/rs10111690 (2018).
De Castro, A. I. et al. An automatic random Forest-OBIA algorithm for early weed mapping between and within crop rows using UAV imagery. Remote Sens. 10, 285. https://doi.org/10.3390/rs10020285 (2018).
Islam, N. et al. In The International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery 1097–1105 (2020).
Huang, Y., Reddy, K. N., Fletcher, R. S. & Pennington, D. UAV low-altitude remote sensing for precision weed management. Weed Technol. 32, 2–6. https://doi.org/10.1017/wet.2017.89 (2018).
Pérez-Ortiz, M. et al. Selecting patterns and features for between- and within- crop-row weed mapping using UAV-imagery. Expert Syst. Appl. 47, 85–94. https://doi.org/10.1016/j.eswa.2015.10.043 (2016).
Lottes, P., Khanna, R., Pfeifer, J., Siegwart, R. & Stachniss, C. In IEEE International Conference on Robotics and Automation (ICRA) 3024–3031 (2017).
Peña, J. M., Torres-Sánchez, J., de Castro, A. I., Kelly, M. & López-Granados, F. Weed mapping in early-season maize fields using object-based analysis of unmanned aerial vehicle (UAV) images. PloS One. 8, e77151. https://doi.org/10.1371/journal.pone.0077151 (2013).
Bah, M. D., Hafiane, A. & Canals, R. In 2017 Seventh International Conference on Image Processing Theory, Tools and Applications (IPTA) 1–6 (2017).
Li, L., Fan, Y., Huang, X. & Tian, L. In 2016 ASABE Annual International Meeting 1 (ASABE, 2016).
Etienne, A. & Saraswat, D. In Autonomous Air and Ground Sensing Systems for Agricultural Optimization and Phenotyping IV Vol. 11008, 202–215 (SPIE, 2019).
Tian, L. Knowledge-based Machine Vision System for Outdoor Plant Identification (University of California, 1995).
Johnson, G. A. & Huggins, D. R. Knowledge-based decision support strategies: linking spatial and temporal components within site-specific weed management. J. Crop Prod. 2, 225–238. https://doi.org/10.1300/J144v02n01_12 (1999).
Moldvai, L., Mesterházi, P. Á., Teschner, G. & Nyéki, A. Aerial image-based crop row detection and weed pressure mapping method. Agronomy 15, 1762 (2025).
Beniaich, A., Naves Silva, M. L., Avalos, F. A. P., Menezes, M. D. & Candido, B. M. Determination of vegetation cover index under different soil management systems of cover plants by using an unmanned aerial vehicle with an onboard digital photographic camera. Semina-Ciencias Agrarias. 40, 49–66. https://doi.org/10.5433/1679-0359.2019v40n1p49 (2019).
Woebbecke, D. M., Meyer, G. E., Von Bargen, K. & Mortensen, D. A. Color indices for weed identification under various soil, residue, and lighting conditions. Trans. ASAE. 38, 259–269. https://doi.org/10.13031/2013.27838 (1995).
Mateen, A. & Zhu, Q. Weed detection in wheat crop using UAV for precision agriculture. Pak J. Agric. Sci. 56, 809–817. https://doi.org/10.21162/PAKJAS/19.8036 (2019).
Kataoka, T., Kaneko, T., Okamoto, H. & Hata, S. In Proceedings 2003 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM 2003) Vol. 2 b1079-b1083 vol. 1072 (IEEE, 2003).
Ha, T., Duddu, H., Bett, K. & Shirtliffe, S. J. A semi-automatic workflow to extract irregularly aligned plots and sub-plots: A case study on lentil breeding populations. Remote Sens. 13, 4997. https://doi.org/10.3390/rs13244997 (2021).
Ha, T., Duddu, H., Vandenberg, A. & Shirtliffe, S. A semi-automatic workflow for plot boundary extraction of irregularly sized and spaced field plots from UAV imagery. Plant. Phenome J. 5, e20039. https://doi.org/10.1002/ppj2.20039 (2022).
Congalton, R. G. A review of assessing the accuracy of classifications of remotely sensed data. Remote Sens. Environ. 37, 35–46. https://doi.org/10.1016/0034-4257(91)90048-B (1991).
Stehman, S. V. Selecting and interpreting measures of thematic classification accuracy. Remote Sens. Environ. 62, 77–89. https://doi.org/10.1016/S0034-4257(97)00083-7 (1997).
Amani, M. et al. Google Earth engine cloud computing platform for remote sensing big data applications: A comprehensive review. IEEE J. Sel. Top. Appl. Earth Observations Remote Sens. 13, 5326–5350. https://doi.org/10.1109/jstars.2020.3021052 (2020).
Asad, M. H. & Bais, A. Weed detection in canola fields using maximum likelihood classification and deep convolutional neural network. Inform. Process. Agric. 7, 535–545. https://doi.org/10.1016/j.inpa.2019.12.002 (2020).
Stroppiana, D. et al. Early season weed mapping in rice crops using multi-spectral UAV data. Int. J. Remote Sens. 39, 5432–5452. https://doi.org/10.1080/01431161.2018.1441569 (2018).
Wang, J., Qi, Z., Wang, Y. & Liu, Y. A lightweight weed detection model for cotton fields based on an improved YOLOv8n. Sci. Rep. 15, 457. https://doi.org/10.1038/s41598-024-84748-8 (2025).
Pérez-Ortiz, M. et al. A semi-supervised system for weed mapping in sunflower crops using unmanned aerial vehicles and a crop row detection method. Appl. Soft Comput. 37, 533–544. https://doi.org/10.1016/j.asoc.2015.08.027 (2015).
Acknowledgements
We acknowledge the University of Saskatchewan for providing the resources and support necessary for this study.
Funding
This research was supported by the Canada First Research Excellence Fund and Plant Phenotyping and Image Research Center (P2IRC).
Author information
Authors and Affiliations
Contributions
Conceptualization: Thuan Ha, Steve J. Shirtliffe; Methodology: Thuan Ha; Formal analysis and investigation: Thuan Ha, Kathryn Aldridge; Writing - original draft preparation: Thuan Ha; Writing - review and editing: Kathryn Aldridge, Eric Johnson, Steve J. Shirtliffe, Kwabena Nketia, Hansanee Fernando; Funding acquisition: Steve J. Shirtliffe; Resources: Kwabena Nketia; Supervision: Steve J. Shirtliffe.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Ha, T., Aldridge, K., Johnson, E. et al. Automated weed segmentation with knowledge based labeling for machine learning applications. Sci Rep (2026). https://doi.org/10.1038/s41598-026-37475-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-37475-1


