No more laborious stem counting: AI-powered computer vision enables identification and quantification of solid and hollow alfalfa stems at the pixel level - Brandon J. Weihs; Zhou Tang; Somshubhra Roy; Zezhong Tian; Deborah Jo Heuschele; Zhiwu Zhang; Cranos Williams; Zhou Zhang; Garett Heineck; Swayamjit Saha; Zhanyou Xu (Smart Agricultural Technology)
Traditional alfalfa stem phenotyping is labor-intensive and susceptible to bias from subjective ratings. Computer vision and machine learning present a promising solution for objectively assessing stem morphology. This study proposed an AI-driven image analysis to replace manual phenotyping methods with high efficiency and accuracy. We developed a novel pipeline that combines YOLOv8n with Otsu’s thresholding and K-means clustering to identify the medoids of internal and external polygons of the stem, thereby quantifying stem traits using pixel-based morphometric masks. The approach achieved an F1 score of 0.91 in detecting and classifying hollow or solid stems across plots and genotypes. Further analysis measured stem area and the proportions of stem tissue versus hollow regions, generating traits like hollowness score and percentage of hollowness. These stem-level metrics provide novel, objective, and quantitative phenotypic measurements, supporting ongoing chemical digestibility analyses and enabling real-time, image-based digestibility assessments through a field-deployable mobile application.