Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Advertisement

Scientific Reports
  • View all journals
  • Search
  • My Account Login
  • Content Explore content
  • About the journal
  • Publish with us
  • Sign up for alerts
  • RSS feed
  1. nature
  2. scientific reports
  3. articles
  4. article
Automated weed segmentation with knowledge based labeling for machine learning applications
Download PDF
Download PDF
  • Article
  • Open access
  • Published: 26 January 2026

Automated weed segmentation with knowledge based labeling for machine learning applications

  • Thuan Ha1,
  • Kathryn Aldridge1,
  • Eric Johnson1,
  • Steve J. Shirtliffe1,
  • Hansanee Fernando1 &
  • …
  • Kwabena Nketia1 

Scientific Reports , Article number:  (2026) Cite this article

  • 963 Accesses

  • 1 Altmetric

  • Metrics details

We are providing an unedited version of this manuscript to give early access to its findings. Before final publication, the manuscript will undergo further editing. Please note there may be errors present which affect the content, and all legal disclaimers apply.

Subjects

  • Computational biology and bioinformatics
  • Ecology
  • Environmental sciences
  • Mathematics and computing
  • Plant sciences

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

Detection of weeds in teff crops using deep learning and UAV imagery for precision herbicide application

Article Open access 21 August 2025

Deep learning classification of INSV-associated weeds in Monterey county using a curated RGB image dataset

Article Open access 26 November 2025

Automated weed and crop recognition and classification model using deep transfer learning with optimization algorithm

Article Open access 10 August 2025

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

  1. 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).

  2. 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).

    Google Scholar 

  3. Geddes, C. M., Page, E. R. & Bae, J. Forging new paths to manage herbicide-resistant weeds. Can. J. Plant Sci. 105, 1–5 (2024).

    Google Scholar 

  4. 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).

    Google Scholar 

  5. Grisso, R. D., Alley, M. M., Thomason, W. E., Holshouser, D. L. & Roberson, G. T. Precision farming tools: variable-rate application. (2011).

  6. 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).

    Google Scholar 

  7. 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).

  8. Li, R. et al. Lightweight CNN–transformer hybrid network with contrastive learning for few-shot noxious weed recognition. Horticulturae 11, 1236 (2025).

    Google Scholar 

  9. 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).

    Google Scholar 

  10. 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).

    Google Scholar 

  11. 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).

    Google Scholar 

  12. 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).

    Google Scholar 

  13. 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).

    Google Scholar 

  14. 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).

    Google Scholar 

  15. 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).

    Google Scholar 

  16. 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).

  17. 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).

    Google Scholar 

  18. 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).

    Google Scholar 

  19. 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).

    Google Scholar 

  20. 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).

    Google Scholar 

  21. 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).

    Google Scholar 

  22. 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).

    Google Scholar 

  23. Islam, N. et al. In The International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery 1097–1105 (2020).

  24. 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).

    Google Scholar 

  25. 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).

    Google Scholar 

  26. Lottes, P., Khanna, R., Pfeifer, J., Siegwart, R. & Stachniss, C. In IEEE International Conference on Robotics and Automation (ICRA) 3024–3031 (2017).

  27. 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).

    Google Scholar 

  28. Bah, M. D., Hafiane, A. & Canals, R. In 2017 Seventh International Conference on Image Processing Theory, Tools and Applications (IPTA) 1–6 (2017).

  29. Li, L., Fan, Y., Huang, X. & Tian, L. In 2016 ASABE Annual International Meeting 1 (ASABE, 2016).

  30. Etienne, A. & Saraswat, D. In Autonomous Air and Ground Sensing Systems for Agricultural Optimization and Phenotyping IV Vol. 11008, 202–215 (SPIE, 2019).

  31. Tian, L. Knowledge-based Machine Vision System for Outdoor Plant Identification (University of California, 1995).

  32. 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).

    Google Scholar 

  33. 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).

    Google Scholar 

  34. 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).

    Google Scholar 

  35. 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).

    Google Scholar 

  36. 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).

    Google Scholar 

  37. 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).

  38. 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).

    Google Scholar 

  39. 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).

    Google Scholar 

  40. 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).

    Google Scholar 

  41. 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).

    Google Scholar 

  42. 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).

    Google Scholar 

  43. 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).

    Google Scholar 

  44. 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).

    Google Scholar 

  45. 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).

    Google Scholar 

  46. 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).

    Google Scholar 

Download references

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

  1. Department of Plant Sciences, University of Saskatchewan, Saskatoon, S7N5A8, Canada

    Thuan Ha, Kathryn Aldridge, Eric Johnson, Steve J. Shirtliffe, Hansanee Fernando & Kwabena Nketia

Authors
  1. Thuan Ha
    View author publications

    Search author on:PubMed Google Scholar

  2. Kathryn Aldridge
    View author publications

    Search author on:PubMed Google Scholar

  3. Eric Johnson
    View author publications

    Search author on:PubMed Google Scholar

  4. Steve J. Shirtliffe
    View author publications

    Search author on:PubMed Google Scholar

  5. Hansanee Fernando
    View author publications

    Search author on:PubMed Google Scholar

  6. Kwabena Nketia
    View author publications

    Search author on:PubMed Google Scholar

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

Correspondence to Thuan Ha.

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/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received: 02 July 2025

  • Accepted: 22 January 2026

  • Published: 26 January 2026

  • DOI: https://doi.org/10.1038/s41598-026-37475-1

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Keywords

  • Weed detection
  • Automated labeling
  • UAV RGB imagery
  • Precision agriculture
  • Image segmentation
  • ECognition
Download PDF

Advertisement

Explore content

  • Research articles
  • News & Comment
  • Collections
  • Subjects
  • Follow us on Facebook
  • Follow us on Twitter
  • Sign up for alerts
  • RSS feed

About the journal

  • About Scientific Reports
  • Contact
  • Journal policies
  • Guide to referees
  • Calls for Papers
  • Editor's Choice
  • Journal highlights
  • Open Access Fees and Funding

Publish with us

  • For authors
  • Language editing services
  • Open access funding
  • Submit manuscript

Search

Advanced search

Quick links

  • Explore articles by subject
  • Find a job
  • Guide to authors
  • Editorial policies

Scientific Reports (Sci Rep)

ISSN 2045-2322 (online)

nature.com sitemap

About Nature Portfolio

  • About us
  • Press releases
  • Press office
  • Contact us

Discover content

  • Journals A-Z
  • Articles by subject
  • protocols.io
  • Nature Index

Publishing policies

  • Nature portfolio policies
  • Open access

Author & Researcher services

  • Reprints & permissions
  • Research data
  • Language editing
  • Scientific editing
  • Nature Masterclasses
  • Research Solutions

Libraries & institutions

  • Librarian service & tools
  • Librarian portal
  • Open research
  • Recommend to library

Advertising & partnerships

  • Advertising
  • Partnerships & Services
  • Media kits
  • Branded content

Professional development

  • Nature Awards
  • Nature Careers
  • Nature Conferences

Regional websites

  • Nature Africa
  • Nature China
  • Nature India
  • Nature Japan
  • Nature Middle East
  • Privacy Policy
  • Use of cookies
  • Legal notice
  • Accessibility statement
  • Terms & Conditions
  • Your US state privacy rights
Springer Nature

© 2026 Springer Nature Limited

Nature Briefing Anthropocene

Sign up for the Nature Briefing: Anthropocene newsletter — what matters in anthropocene research, free to your inbox weekly.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing: Anthropocene