An algorithm for detecting cow lameness based on ensemble learning of keypoint motion features
The list of standard abbreviations for JDS is available at adsa.org/jds-abbreviations-24. Nonstandard abbreviations are available in the Notes. Lameness has significant effects on the health, welfare, and productivity of dairy cows. Common challenges in farm environments, such as uneven lighting and...
Saved in:
| Published in | Journal of dairy science Vol. 108; no. 10; pp. 11520 - 11534 |
|---|---|
| Main Authors | , , , , |
| Format | Journal Article |
| Language | English |
| Published |
United States
Elsevier Inc
01.10.2025
Elsevier |
| Subjects | |
| Online Access | Get full text |
| ISSN | 0022-0302 1525-3198 1529-9066 1525-3198 |
| DOI | 10.3168/jds.2025-26299 |
Cover
| Summary: | The list of standard abbreviations for JDS is available at adsa.org/jds-abbreviations-24. Nonstandard abbreviations are available in the Notes.
Lameness has significant effects on the health, welfare, and productivity of dairy cows. Common challenges in farm environments, such as uneven lighting and occlusion, reduce the accuracy of keypoint detection, which in turn affects the precise extraction of motion features. Moreover, a single motion feature is often insufficient to comprehensively reflect lameness behavior. This study explores a lameness detection method for dairy cows based on the integration of keypoint-derived motion features. First, to enhance the accuracy of cow keypoint detection, improvements were made to YOLOv8-Pose—the keypoint detection module in the YOLOv8 framework—to boost performance under complex environmental conditions, and its positive effect on lameness classification was validated. Next, the improved model was used to detect keypoints on the hooves, knees, hips, and head–neck region of the cows. From these, 3 types of temporal motion features were extracted: relative displacement between fore and hind hooves, hoof movement speed, and head–neck motion trajectory. Each feature type was individually used for lameness classification using a Conv2D-LSTM structure, which combines convolutional operations with a long short-term memory (LSTM) network for temporal modeling. Finally, to achieve more robust lameness detection results, the stacking method from ensemble learning was applied to fuse the predictions based on the 3 types of features. Results show that the improved YOLOv8-Pose model can effectively detect cow keypoints, achieving a precision of 99.4%, recall of 96.9%, mAP@0.5 of 97.8%, mAP@0.75 of 88.0%, and mAP@0.5:0.95 of 79.3% (where mAP refers to mean average precision, a standard detection accuracy metric calculated at different IoU thresholds, where IoU stands for intersection over union, mAP@0.5 indicates IoU = 0.5, mAP@0.75 indicates IoU = 0.75, and mAP@0.5:0.95 represents the average over IoU from 0.5 to 0.95 in 0.05 increments). Among 141 cow samples with a lameness prevalence of 52.5%, the average classification accuracy for each of the 3 motion features exceeded 85%, whereas the integrated method based on keypoint motion features achieved an overall accuracy of 97.2%. Cross-validation further confirms the accuracy and generalization capability of the proposed algorithm, offering a feasible path for intelligent lameness monitoring in dairy cows. |
|---|---|
| Bibliography: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 23 |
| ISSN: | 0022-0302 1525-3198 1529-9066 1525-3198 |
| DOI: | 10.3168/jds.2025-26299 |