Skip to main content
ARS Home » Midwest Area » St. Paul, Minnesota » Plant Science Research » Research » Publications at this Location » Publication #426110

Research Project: Expanding Resiliency and Utility of Alfalfa in Agroecosystems

Location: Plant Science Research

Title: No more laborious stem counting: AI-powered computer vision enables identification and quantification of solid and hollow alfalfa stems at the pixel level

Author
item Weihs, Brandon
item TANG, ZHOU - University Of Florida
item ROY, SOMSHUBHRA - North Carolina State University
item TIAN, ZEZHONG - University Of Wisconsin
item Heuschele, Deborah
item ZHANG, ZHIWU - Washington State University
item WILLIAMS, CRANOS - North Carolina State University
item ZHANG, ZHOU - University Of Wisconsin
item Heineck, Garett
item SAHA, SWAYAMJIT - Mississippi State University
item Xu, Zhanyou

Submitted to: Smart Agricultural Technology
Publication Type: Peer Reviewed Journal
Publication Acceptance Date: 11/1/2025
Publication Date: 12/1/2025
Citation: Weihs, B.J., Tang, Z., Roy, S., Tian, Z., Heuschele, D.J., Zhang, Z., Williams, C., Zhang, Z., Heineck, G.C., Saha, S., Xu, Z. 2025. No more laborious stem counting: AI-powered computer vision enables identification and quantification of solid and hollow alfalfa stems at the pixel level. Smart Agricultural Technology. 12. Article 101278. https://doi.org/10.1016/j.atech.2025.101278.
DOI: https://doi.org/10.1016/j.atech.2025.101278

Interpretive Summary: The quality of harvested alfalfa is largely determined by its ability to be digested by the animal its fed to. For cattle and other ruminant animals, alfalfa is the highest protein and most nutritious feed available. However, the digestibility of alfalfa is limited by its lignin content because lignin is resistant to digestion. Therefore, targeted breeding of alfalfa for reduced lignin has the potential to increase producer outputs such as milk production or stocker cattle weights via higher quality feed. Because alfalfa stems contain much larger concentrations of lignin and are less nutritious than the leaves, targeting the stems to reduce lignin will increase harvested alfalfa quality of new cultivars from our breeding efforts. One way we've accomplished this is by taking images of alfalfa stems in the field, then using artificial intelligence (AI) methods to analyze the stems, which are more or less nutritious based on their form (solid stems are more nutritious; hollow stems are less nutritious). In these AI models, stems are counted and measured for traits related to digestibility (solid, hollow) and the end result is a list of the most digestible plants based on their stem image analyses. A major accomplishment of this study is its high accuracy metrics (~91%) and ability to identify, count, and measure individual alfalfa stems, which is also a replacement for one of our now-antiquated standard operating procedures (SOP) and field methods used to gather this data. In short, this replacement SOP is highly-efficient and much faster than the manual method it replaces. We've also created a mobile application (App) that will allow us (and other stakeholders) to use this new tool in future seasons to collect data and help answer questions about stand relative feed value and quality, which is a completely new method, and state of the art technology meant for researchers, producers, and other relevant stakeholders.

Technical Abstract: This study investigated the leveraging of AI-driven image analyses on alfalfa stem cross section data to improve and replace traditional manual sampling techniques. Stem cross section image data was analyzed with a novel pipeline of methods that employs YOLOv8n, a state-of-the-art computer vision-based model for object detection as well as machine learning-based Otsu’s thresholding algorithm and K-means clustering to remove noise and quantify stem traits via morphometric masks (pixels). Results indicate that the YOLOv8n model performs with a high F1 score (0.91) to identify and classify individual hollow or solid stems within a plot or genotype. Additionally, the machine learning-driven hollowness quantification pipeline that runs in-series with YOLOv8n uses the detected stem outputs from YOLOv8n to measure both the stem area and the portions that constitute stem tissue or hollow regions within it, quantifying traits such as “hollowness score” or percentage of hollowness for each genotype in the experiment. These plot- and stem-level data will be combined with ongoing digestibility (chemical) analyses to investigate the possibility of real-time image-based digestibility analyses from the field in a novel mobile application.