AI-Based Teat Shape and Skin Condition Prediction for Dairy Management

Yuexing Hao, Tiancheng Yuan, Yuting Yang · 2024

Read AI-Based Teat Shape and Skin Condition Prediction for Dairy Management by Yuexing Hao, Tiancheng Yuan, Yuting Yang (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2412-17142.txt.

Introduction

Yuexing Hao and co-authors adapt vision AI to check cow teat shape and skin health on dairy farms, in work from twenty twenty-four. Dairy owners spend much effort and money keeping animals healthy. Vision tools could cut that cost, but farm settings resist clean lab tools. The team builds a full data and model pipeline for teat checks. Tasks cover finding teats, sorting their shape, and grading skin state.

Existing vision models are retuned for the farm data rather than built fresh. The shape model and skin model both score well on precision tests. Scores land close to each other, with skin grading a touch higher. Per-animal records let owners track teat health for each cow over time. That tracking supports early care before small flaws grow worse. The work shows AI can fit daily dairy management with care.

Catalog record

CREATORYuexing Hao, Tiancheng Yuan, Yuting Yang
YEAR2024
COLLECTIONPAPERS
FORMATTXT
FILE SIZE31 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2412-17142

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

AI-Based Teat Shape and Skin Condition Prediction for Dairy Management Yuexing Hao, Tiancheng Yuan, Yuting Yang Abstract Dairy owners spend significant effort to keep their animals healthy. There is good reason to hope that technologies such as computer vision and artificial intelligence (AI) could reduce these costs, yet obstacles arise when adapting advanced tools to farming environments. In this work, we adapt AI tools to dairy cow teat localization, teat shape, and teat skin condition classifications. We also curate a data collection and analysis methodology for a Machine Learning (ML) pipeline. The resulting teat shape prediction model achieves a mean Average Precision (mAP) of 0.783, and the teat skin condition model achieves a mean average precision of 0.828. Our work leverages existing ML vision models to facilitate the individualized identification of teat health and skin conditions, applying AI to the dairy management industry. Ithaca NY, USA {yh727, ty373, yy354, ag2288, mjw248, psb92, kpb3}@cornell.edu Keywords Digital Agriculture, Machine Learning, Computer Vision, Decision Support Under Uncertainty, Applications Introduction Traditionally, dairy cow teat health assessment requires close examination by a trained professional. Although veterinarians routinely perform this task as part of dairy clinical practice, dairy workers in small farms find the task time-consuming, reducing the accessibility of a valuable predictive tool. On large farms, individualized teat health assessments are impractical: thousands of cows might be managed by a few dozen workers. Yet daily examination of cow teat health could help identify changes that might be early precursors of animal health issues. Our work focuses on dairy cow teat health assessment through the 1) automated and accurate teat shape assessment, and 2) creation and deployment of computer vision. There has been limited research on machine-learning techniques for solving this problem even in rotary milking parlors with excellent lighting, good animal separation, and high-quality animal identification. One widely cited effort studied cow teat condition classification from a veterinary perspective ( Mein et al. 2001 ) , but focused on clinical settings and did not consider the use of machine learning models for identifying teat shape. Our project provides a more comprehensive machine learning solution for use in milking parlors. Here we report on data collection, preparation of training data sets labeled with domain-expert knowledge, development of fully-trained ML models, and assessment of its performance using data from commercial farms. A well-known concern about ML is that training models can be prohibitively expensive. Unusually, our approach avoids the need to undertake model training from the ground up. We evaluated a variety of preexisting open-source computer-vision models, identifying one model that had good baseline performance. We then performed fine-tuning of its model parameters and conducted additional training with our labeled data, obtaining a refined open-source model that can perform cow teat localization, teat shape, and skin condition classification with high accuracy and yet at low cost. Accordingly, this paper focuses on three questions: 1. Can we obtain high quality still images ( keyframes ) from fixed video cameras in a rotary milking parlor? 2. Given a choice of images for one cow, can we select the image that best visualizes the stall-id and the cow’s teats? 3. Can we accurately classify teat shape and skin condition? Answering these questions will contribute to dairy science in several ways. In a practical sense, our work is a step towards routine monitoring of teat shape and teat skin condition in a medium-size dairy farm, enabling us to study the actual value of this sort of information. We hypothesize that deploying our ML models could improve dairy herd management, pinpoint issues that arise, and enable timely intervention to head off mastitis or prevent the spread of potentially contagious pathogens, but follow-up studies of deployed solutions will be needed to validate or refute this belief. Our approach additionally yields data suitable for inclusion into repositories that could be used to develop follow-on machine-intelligent solutions (such as for evaluating animal gait and to sense evidence of discomfort), even as we also use to further refine our models. We also hope to extract a variety of metrics for dairy productivity, which would be valuable when optimizing farm performance. Production deployment of our ML solution still lies in the future: this paper is focused on the ML tools themselves. As noted, our approach can be carried out on standard laptops because we based our solutions on existing open-source, off-the-shelf AI vision tools. This contrasts with past approaches that required data-center scale computing resources and were environmentally problematic. Moreover, we expose trade-offs that other researchers with similar goals might encounter by identifying and resolving the practical problems that arise when deploying ML solutions into a rotary milking parlor. As an example, we find that there are only a few locations at which cameras can conveniently be placed, and identify timing constraints that would arise if an immediate response to a teat condition (such as spraying a medicinal solution) should occur before the animal leaves the parlor. For each identified question, we discuss our proposed solutions, lowering the bar to further work in this domain. Scientific Background Dairy Cow Teat Health Metrics Dairy cow teat condition is widely used as a predictor of animal health and anticipated milk quality ( A J Seykora 1985 ; Wieland et al. 2018 ; Seykora and McDaniel 1985b ) . Poor or gradually degrading teat health is recognized as a risk of mastitis: one of the most important dairy diseases due to its harmful consequences for farm productivity ( Ruegg 2003 ) . Mastitis prevention strategies typically focus on two approaches: minimizing bacterial presence at the teat end and enhancing the cow’s natural resistance to these pathogens ( Hogeveen et al. 2011 ) . Studies have shown that teat-end shape is correlated with a cow’s resistance to developing mastitis ( Lojda and Matouskova. 1976 ) , somatic cell count and milkability ( Seykora and McDaniel 1985a ; Wieland, Nydam, and Virkler 2017 ) . To create a ground-truth data set for teat condition classification, our team works with veterinarians and veterinary assistants, who supervise certain milking sessions, manually scoring each cow’s teats with respect to shape and skin condition. The scoring metrics used for teat shape assessment are based on Seykora and Daniel ( A J Seykora 1985 ) guidelines, wherein teat shape is scored as [1: pointed, 3: flat, 7: round-flat, 8: round-ring]. For skin condition assessment, the veterinary team employed Neijenhuis ( Mein et al. 2001 ) guidelines, scored as: [1: normal skin, 3: teat with open lesion]. In a clinical setting, visual teat analysis would be supplemented by tactile assessments. There are other condition scoring dimensions that could be performed, including evidence of hyperkeratosis ( Hillerton 2005 ) , presence of hock lesions ( Kielland et al. 2009 ) , quality of lower leg hygiene, quality of udder hygiene ( Schreiner and Ruegg 2003 ; Cook and Reinemann 2007 ) , and presence of skin-open lesions. All of these are important in clinical mastitis risk health assessment, and our future work will need to explore, although physical manipulation of the teats would not be practical in our setting, hence we would need to explore other traits that track the evolution of teat condition over time, such as redness/swelling

Read the complete text