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

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<sub>50</sub>, indicating detection success with 50% overlap between the predicted and actual udder area), and 0.766 (mAP<sub>50-95</sub>, 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.

Authors

Institutions

Publication Details

Journal
Journal of Dairy Science
Published
2026-02-01
DOI
https://doi.org/10.3168/jds.2025-27683
Primary Topic
Milk Quality and Mastitis in Dairy Cows
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Lidwien A.M. Smit, Kacper Libera, Gerrit Koop, Alex Bossers et al.
Journal of Dairy Science
Milk Quality and Mastitis in Dairy Cows
article

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

Lidwien A.M. Smit, Kacper Libera, Gerrit Koop, Alex Bossers, Yvette de Geus, Maxime A.M. Pals
article en

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<sub>50</sub>, indicating detection success with 50% overlap between the predicted and actual udder area), and 0.766 (mAP<sub>50-95</sub>, 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.

Journal of Dairy Science
University of Applied Sciences Utrecht (NL), Utrecht University (NL)
Decent work and economic growth
Openalex Percentile: Top 66%
Milk Quality and Mastitis in Dairy Cows
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.