Detecting Lameness in Dairy Cows Based on Gait Feature Mapping and Attention Mechanisms - Xi Kang; Junjie Liang; Qian Li; Gang Liu (Agriculture, 2025)
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.