Lameness significantly compromises dairy cattle welfare and productivity. Early detection enables prompt intervention, enhancing both animal health and farm efficiency. Current computer vision approaches often rely on isolated lameness feature quantification, disregarding critical interdependencies among gait parameters. This limitation is exacerbated by the distinct kinematic patterns exhibited across lameness severity grades, ultimately reducing detection accuracy. This study presents an integrated computer vision and deep-learning framework for dairy cattle lameness detection and severity classification. The proposed system comprises (1) a Cow Lameness Feature Map (CLFM) model extracting holistic gait kinematics (hoof trajectories and dorsal contour) from walking sequences, and (2) a DenseNet-Integrated Convolutional Attention Module (DCAM) that mitigates inter-individual variability through multi-feature fusion. Experimental validation utilized 3150 annotated lameness feature maps derived from 175 Holsteins under natural walking conditions, demonstrating robust classification performance. The classification accuracy of the method for varying degrees of lameness was 92.80%, the sensitivity was 89.21%, and the specificity was 94.60%. The detection of healthy and lameness dairy cows’ accuracy was 99.05%, the sensitivity was 100%, and the specificity was 98.57%. The experimental results demonstrate the advantage of implementing lameness severity-adaptive feature weighting through hierarchical network architecture.
Lameness adversely affects the welfare and productivity of dairy cows. This study quantifies and analyzes key gait characteristics of cows with varying locomotion scores, evaluating their effectiveness for lameness detection in computer vision systems while considering individual specificity. Six key characteristics—back arch, head bob, speed, step overlap, supporting phase, and hoof step time—were analyzed to assess their distribution across different locomotion scores. Through a comparative analysis of single-parameter and multiple-parameter classification models, we quantitatively demonstrated that models using multiple characteristics significantly outperformed single-parameter models, achieving an accuracy of 84% and a Macro-F1 score of 0.81, while better accounting for individual variability. Among the characteristics, step overlap, supporting phase, and back arch showed higher relative importance in the classifiers. Back arch was a strong indicator of severe lameness, while step overlap and supporting phase were more effective for detecting mild cases. A hierarchical classification approach further improved performance by minimizing the impact of less relevant characteristics. This study highlights the importance of integrating multiple gait and posture features for robust lameness detection, providing practical insights for automated systems.
Lameness significantly compromises dairy cattle welfare and productivity. Early detection enables prompt intervention, enhancing both animal health and farm efficiency. Current computer vision approaches often rely on isolated lameness feature quantification, disregarding critical interdependencies between gait parameters. This limitation is exacerbated by the distinct kinematic patterns exhibited across lameness severity grades, ultimately reducing detection accuracy. This study presented an integrated computer vision and deep learning framework for dairy cattle lameness detection and severity classification. The proposed system comprises: (1) a Cow Lameness Feature Map (CLFM) model extracting holistic gait kinematics (hoof trajectories and dorsal contour) from walking sequences, and (2) a DenseNet-Integrated Convolutional Attention Module (DCAM) that mitigates inter-individual variability through multi-feature fusion. Experimental validation utilized 3,150 annotated lameness feature maps derived from 175 Holsteins under natural walking conditions, demonstrating robust classification performance. The classification accuracy of the method for varying degrees of lameness was 92.80%, the sensitivity was 89.21% and the specificity was 94.60%. The detection of healthy and lameness dairy cows’ accuracy was 99.05%, the sensitivity was 100% and the specificity was 98.57%. The experimental results demonstrate the advantage of implementing lameness severity-adaptive feature weighting through hierarchical network architecture.