Gong Caili, Zhang Yong, Wei Yongfeng, Du Xinyu, Su Lide, Weng Zhi
College of Mechanical and Electrical Engineering, Inner Mongolia Agricultural University, Hohhot, China.
School of Electronic Information Engineering, Inner Mongolia University, Hohhot, China.
PLoS One. 2022 Jun 3;17(6):e0269259. doi: 10.1371/journal.pone.0269259. eCollection 2022.
Automatic estimation of the poses of dairy cows over a long period can provide relevant information regarding their status and well-being in precision farming. Due to appearance similarity, cow pose estimation is challenging. To monitor the health of dairy cows in actual farm environments, a multicow pose estimation algorithm was proposed in this study. First, a monitoring system was established at a dairy cow breeding site, and 175 surveillance videos of 10 different cows were used as raw data to construct object detection and pose estimation data sets. To achieve the detection of multiple cows, the You Only Look Once (YOLO)v4 model based on CSPDarkNet53 was built and fine-tuned to output the bounding box for further pose estimation. On the test set of 400 images including single and multiple cows throughout the whole day, the average precision (AP) reached 94.58%. Second, the keypoint heatmaps and part affinity field (PAF) were extracted to match the keypoints of the same cow based on the real-time multiperson 2D pose detection model. To verify the performance of the algorithm, 200 single-object images and 200 dual-object images with occlusions were tested under different light conditions. The test results showed that the AP of leg keypoints was the highest, reaching 91.6%, regardless of day or night and single cows or double cows. This was followed by the AP values of the back, neck and head, sequentially. The AP of single cow pose estimation was 85% during the day and 78.1% at night, compared to double cows with occlusion, for which the values were 74.3% and 71.6%, respectively. The keypoint detection rate decreased when the occlusion was severe. However, in actual cow breeding sites, cows are seldom strongly occluded. Finally, a pose classification network was built to estimate the three typical poses (standing, walking and lying) of cows based on the extracted cow skeleton in the bounding box, achieving precision of 91.67%, 92.97% and 99.23%, respectively. The results showed that the algorithm proposed in this study exhibited a relatively high detection rate. Therefore, the proposed method can provide a theoretical reference for animal pose estimation in large-scale precision livestock farming.
长期自动估计奶牛的姿势可以为精准农业中奶牛的状态和健康状况提供相关信息。由于外观相似,奶牛姿势估计具有挑战性。为了在实际农场环境中监测奶牛的健康状况,本研究提出了一种多奶牛姿势估计算法。首先,在奶牛养殖场地建立了一个监测系统,并使用10头不同奶牛的175个监控视频作为原始数据来构建目标检测和姿势估计数据集。为了实现对多头奶牛的检测,基于CSPDarkNet53构建并微调了You Only Look Once(YOLO)v4模型,以输出边界框用于进一步的姿势估计。在包含全天单头和多头奶牛的400张图像的测试集上,平均精度(AP)达到了94.58%。其次,基于实时多人二维姿势检测模型提取关键点热图和部分亲和场(PAF),以匹配同一头奶牛的关键点。为了验证算法的性能,在不同光照条件下对200张单目标图像和200张有遮挡的双目标图像进行了测试。测试结果表明,无论白天还是黑夜,单头奶牛还是双头奶牛,腿部关键点的AP最高,达到91.6%。其次是背部、颈部和头部的AP值。白天单头奶牛姿势估计的AP为85%,夜间为78.1%,相比之下,有遮挡的双头奶牛的AP值分别为74.3%和71.6%。当遮挡严重时,关键点检测率会下降。然而,在实际奶牛养殖场地,奶牛很少被严重遮挡。最后,基于边界框中提取的奶牛骨架构建了一个姿势分类网络,以估计奶牛的三种典型姿势(站立、行走和躺卧),精度分别达到91.67%、92.97%和99.23%。结果表明,本研究提出的算法具有较高的检测率。因此,该方法可为大规模精准畜牧养殖中的动物姿势估计提供理论参考。