Wageningen Livestock Research, Wageningen University and Research, 6708 WD Wageningen, the Netherlands.
Agricultural Biosystems Engineering, Wageningen University and Research, 6700 AA Wageningen, the Netherlands.
J Dairy Sci. 2024 Apr;107(4):2374-2389. doi: 10.3168/jds.2023-23680. Epub 2023 Oct 19.
Lameness in dairy cattle is a costly and highly prevalent problem that affects all aspects of sustainable dairy production, including animal welfare. Automation of gait assessment would allow monitoring of locomotion in which the cows' walking patterns can be evaluated frequently and with limited labor. With the right interpretation algorithms, this could result in more timely detection of locomotion problems. This in turn would facilitate timely intervention and early treatment, which is crucial to reduce the effect of abnormal behavior and pain on animal welfare. Gait features of dairy cows can potentially be derived from key points that locate crucial anatomical points on a cow's body. The aim of this study is 2-fold: (1) to demonstrate automation of the detection of dairy cows' key points in a practical indoor setting with natural occlusions from gates and races, and (2) to propose the necessary steps to postprocess these key points to make them suitable for subsequent gait feature calculations. Both the automated detection of key points as well as the postprocessing of them are crucial prerequisites for camera-based automated locomotion monitoring in a real farm environment. Side-view video footage of 34 Holstein-Friesian dairy cows, captured when exiting the milking parlor, were used for model development. From these videos, 758 samples of 2 successive frames were extracted. A previously developed deep learning model called T-LEAP was trained to detect 17 key points on cows in our indoor farm environment with natural occlusions. To this end, the dataset of 758 samples was randomly split into a train (n = 22 cows; no. of samples = 388), validation (n = 7 cows; no. of samples = 108), and test dataset (n = 15 cows; no. of samples = 262). The performance of T-LEAP to automatically assign key points in our indoor situation was assessed using the average percentage of correctly detected key points using a threshold of 0.2 of the head length (PCKh0.2). The model's performance on the test set achieved a good result with PCKh0.2: 89% on all 17 key points together. Detecting key points on the back (n = 3 key points) of the cow had the poorest performance PCKh0.2: 59%. In addition to the indoor performance of the model, a more detailed study of the detection performance was conducted to formulate postprocessing steps necessary to use these key points for gait feature calculations and subsequent automated locomotion monitoring. This detailed study included the evaluation of the detection performance in multiple directions. This study revealed that the performance of the key points on a cows' back were the poorest in the horizontal direction. Based on this more in-depth study, we recommend the implementation of the outlined postprocessing techniques to address the following issues: (1) correcting camera distortion, (2) rectifying erroneous key point detection, and (3) establishing the necessary procedures for translating hoof key points into gait features.
奶牛跛行是一个代价高昂且普遍存在的问题,会影响可持续奶牛生产的各个方面,包括动物福利。步态评估的自动化将允许对牛的运动进行频繁监测,并且可以使用有限的劳动力进行评估。通过正确的解释算法,这可能会导致更及时地发现运动问题。这反过来又有助于及时干预和早期治疗,这对于减少异常行为和疼痛对动物福利的影响至关重要。奶牛的步态特征可能源自关键点,这些关键点定位了奶牛身体上的关键解剖点。本研究的目的有两个:(1)展示在具有来自门和跑道的自然遮挡的实际室内环境中自动检测奶牛关键点的能力;(2)提出对这些关键点进行后处理的必要步骤,使其适用于后续的步态特征计算。关键点的自动检测和后处理都是在实际农场环境中基于摄像头的自动运动监测的关键前提。使用了 34 头荷斯坦-弗里生奶牛在离开挤奶厅时拍摄的侧视视频片段来开发模型。从这些视频中提取了 758 对连续两帧的样本。先前开发的名为 T-LEAP 的深度学习模型被训练来检测我们室内农场环境中带有自然遮挡的奶牛的 17 个关键点。为此,将 758 个样本的数据集随机分为训练集(n = 22 头牛;样本数= 388)、验证集(n = 7 头牛;样本数= 108)和测试集(n = 15 头牛;样本数= 262)。使用头部长度的 0.2 阈值(PCKh0.2)评估 T-LEAP 在我们室内情况下自动分配关键点的性能。模型在测试集上的性能表现出色,PCKh0.2 达到 89%:总共 17 个关键点的准确率为 89%。检测奶牛背部(n = 3 个关键点)的关键点的性能最差,PCKh0.2:59%。除了模型的室内性能外,还进行了更详细的检测性能研究,以制定必要的后处理步骤,以便将这些关键点用于步态特征计算和随后的自动运动监测。这项详细的研究包括评估多个方向的检测性能。这项研究表明,奶牛背部关键点的性能在水平方向上最差。基于这项更深入的研究,我们建议实施概述的后处理技术来解决以下问题:(1)校正相机失真;(2)纠正错误的关键点检测;(3)建立将蹄关键点转换为步态特征的必要程序。