Search for a command to run...
• A computer vision-aided cattle lameness detection system was developed. • The object detection model was trained on 12,182 annotated images. • YOLOv5m achieved the best performance and was selected for further study. • The system successfully identified lameness-related alterations in locomotion parameters. . Early detection of lameness in cattle is crucial to improve animal welfare and farm profitability. This paper presents a computer vision-based system for automatic lameness detection in dairy cows using video analysis and deep learning. The system records short video clips of cows walking after milking and processes the frames to detect key body parts (head, back, legs, and hooves) associated with lameness indicators. These short videos were recorded on 3 different farms in Hungary. An object detection model was trained on 12,182 annotated images extracted from 699 video clips of 699 cows, and three model architectures (Faster R-CNN, Single Shot Detector, and YOLOv5) were compared. YOLOv5m achieved the best performance, with a mean average precision (mAP@0.5) of 73.2% and real-time inference speed of approximately 14 frames/s on the test set, outperforming Faster R-CNN (56% mAP) by 26% and demonstrating particularly strong detection of small features such as hooves (73.2% AP). Individual body part detection accuracies ranged from 64.1% (leg joints) to 78.6% (whole cow). The detected body part positions are used to compute a lameness score aligned with the standard locomotion scoring (score 0: healthy, 1: moderately lame, 2: severely lame). In field validation tests, the system successfully identified lameness-related alterations in locomotion parameters, including stride length modifications, asymmetric gait patterns, and postural compensatory mechanisms, thereby enabling lameness severity classification consistent with expert visual assessments. These results indicate that the proposed vision-aided system can objectively and continuously monitor cow locomotion and detect early-phase lameness, offering a promising tool for precision livestock farming.
Published in: Smart Agricultural Technology
Volume 14, pp. 101952-101952