Automated detection of asymmetrical udders in dairy goats using a camera and deep-learning model YOLOv12

Read full text
Authors: Kacper Libera, Maxime Adriane Marie Pals, Yvette de Geus, Gerrit Koop, Lidwien A.M. Smit, Alex Bossers
Cited by: 0
References: 28

Abstract

Udder asymmetry is a clinical sign in dairy goats frequently linked to udder inflammation (mastitis). Therefore, goats identified with udder asymmetry should be examined and specifically checked for (past) mastitis. Ideally, all goats should be routinely monitored for udder asymmetry during milking. However, in many countries, dairy goat herds consist of hundreds to thousands of animals, which makes it practically impossible and too labor intensive to regularly examine all animals. Therefore, new automated solutions, including computer vision models, are highly desirable. In this study, we trained and validated a custom computer vision model to detect udder asymmetry in goats. To develop the model, 4,321 annotated goat backside udder images and 373 background images were collected during milking sessions on a dairy goat farm on 3 different days. The 3 ground truth labels for the goat udders—symmetrical, left asymmetry, and right asymmetry—were provided by 2 independent dairy goat veterinarians. The dataset was randomly split in 60% training, 20% validation, and 20% unseen test subsets. The model was trained for 300 epoch cycles including hyperparameter optimization for 300 iterations. The performance of our model (Udder_Asymmetry_Model) on the test dataset was satisfactory, with a mean average precision of 0.891 (mAP 50 , indicating detection success with 50% overlap between the predicted and actual udder area), and 0.766 (mAP 50–95 , the average performance across stricter localization requirements). Ninety-five percent CI were 0.869–0.912 and 0.747–0.789, respectively. In conclusion, the detection of udder asymmetry in dairy goats can be automated using a simple camera and our computer vision model. This solution can facilitate better udder health monitoring, ultimately leading to improvements in animal health, animal welfare, and milk quality.

Fields of Study & Subjects

Smart Agriculture and AI Advanced Neural Network Applications Milk Quality and Mastitis in Dairy Cows

Publication details

Journal / source
Journal of Dairy Science
Volume
109
Issue
4
Pages
4285–4295
Publication date
4 February 2026
Language
EN