Journal of Integrative Agriculture ›› 2026, Vol. 25 ›› Issue (5): 2028-2040.DOI: 10.1016/j.jia.2024.07.023

• • 上一篇    下一篇

基于ResNet101-ASPP网络的奶牛多尺度关键点检测和运动特征提取

  

  • 收稿日期:2024-02-06 修回日期:2024-07-19 接受日期:2024-06-01 出版日期:2026-05-20 发布日期:2026-04-11

Multi-scale keypoints detection and motion features extraction in dairy cows using ResNet101-ASPP network

Saisai Wu1, 2*, Shuqing Han1, 2*, Jing Zhang1, 2, Guodong Cheng1, 2, Yali Wang1, 2, Kai Zhang1, 2, Mingming Han3, 4, Jianzhai Wu1, 2#   

  1. 1 Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081, China

    2 Key Laboratory of Agricultural Blockchain Application, Ministry of Agriculture and Rural Affairs, Beijing 100081, China

    3 Zibo Agricultural Science Research Institute, Zibo 255020, China

    4 Zibo Institute for Digital Agriculture and Rural Research, Zibo 255051, China

  • Received:2024-02-06 Revised:2024-07-19 Accepted:2024-06-01 Online:2026-05-20 Published:2026-04-11
  • About author:Saisai Wu, E-mail: wusaisai0324@163.com; Shuqing Han, E-mail: hanshuqing@caas.cn; #Correspondence Jianzhai Wu, E-mail: wujianzhai@caas.cn * These authors contributed equally to this study.
  • Supported by:
    The work was supported by the National Natural Science Foundation of China (32102600), the Central Public-interest Scientific Institution Basal Research Fund, China (Y2023XK13, JBYW-AII-2024-28/40, and JBYW-AII-2023-33/37/42), Science and Technology Innovation Project of the Chinese Academy of Agricultural Sciences (CAAS-ASTIP-2021-AII), the Wuhu Science and Technology Bureau Two Strong One Increase Project, China (2023ly12).

摘要:

奶牛关键点检测旨在定位和跟踪身体关节点的运动轨迹,在行为分析和跛行检测等任务中具有至关重要的作用。然而,在真实的奶牛养殖场景中,由于奶牛个体尺度变化较大以及遮挡等问题,可能导致关键点检测效果不佳。因此,本研究在ResNet101的浅层网络中引入了空洞空间金字塔池化(Atrous Spatial Pyramid Pooling, ASPP)模块,旨在提高模型的多尺度特征提取能力。ASPP模块通过在并行空洞卷积层中使用不同的膨胀率来增大模型的感受野,从而增强了对不同维度大小和遮挡关键点的识别鲁棒性。此外,在检测和跟踪不同关键点运动轨迹的基础上,利用特征提取模型同步提取了7种奶牛运动特征,包括步态跟随性、步态对称性、步进姿态差异性、运动速度差异性、头部摆动幅度、头颈部斜率和背部曲率,其中部分特征为本研究首次提出的创新性提取方法和属性。利用包含2385帧图像的数据集对多个骨干网络进行关键点检测任务的训练和测试结果对比,同时对改进算法进行消融实验。实验结果显示,与ResNet50MobileNet_v2_1.0EfficientNet-b0骨干网络相比,ResNet101的训练误差和测试误差分别提高了4.04–30.12像素和3.81–28.14像素。因此,采用ResNet101作为基准模型,通过添加ASPP模块进行后续算法改进。与基准模型相比,ResNet101-ASPP网络的训练误差和测试误差分别提高了0.27像素和0.24像素,且在三个不同的奶牛目标尺度数据集上,预测置信度提高了1.65%-2.50%。此外,在不同遮挡条件下的关键点检测效果显著提高,尤其是小尺度关键点,显示了ASPP模块在多尺度特征提取方面的能力。通过分析提取的7个运动特征与奶牛健康、轻度跛行和重度跛行之间的分布关系,结果表明所有运动特征在区分不同程度的跛行方面都发挥了重要作用。本研究的多尺度关键点检测网络也可应用于奶牛或其他动物的行为分类、发情识别等任务,为精准畜牧业智能化管理以及动物信息的实时监测提供理论和技术支持。

Abstract:

Detecting keypoints in dairy cows aims to locate and track the motion trajectories of the body’s joints, which plays a crucial role in behavior analysis and lameness detection.  However, real farming scenarios, characterized by occlusions and large variations in object scale may result in poor detection results.  Therefore, we introduce the atrous spatial pyramid pooling (ASPP) module into the shallow layers network of ResNet101, designed to improve the multi-scale feature extraction capability of the model.  The ASPP module enhances the robustness of recognition for different dimensional sizes and occluded keypoints using different dilatation rates in the parallel atrous convolutional layers to expand the model’s receptive field.  Furthermore, seven types of motion features, including tracking up, gait symmetry, step height balance, motion speed variability, head swing amplitude, head-neck slope and back curvature are extracted simultaneously by monitoring and tracking the motion trajectory of distinct keypoints.  Several of these features represent innovative extraction models and attributes, first proposed in this study.  Multiple models are trained and tested on datasets containing 2,385 frames for ablation experiments.  The experiments show that, in comparison with the ResNet50, MobileNet_v2_1.0, and EfficientNet-b0 backbone networks, the training error and test error of ResNet101 are reduced by 4.04–30.12 pixels and 3.81–28.14 pixels.  Therefore, ResNet101 is used as the benchmark for subsequent model improvement by adding the ASPP module.  The training error and test error of the ResNet101-ASPP network are reduced by 0.27 and 0.24 pixels, respectively, compared to the benchmark network.  The prediction confidence improves by 1.65–2.50% at three different dairy cow object scales. In addition, the keypoints under different occlusion conditions improve considerably, especially for small-scale keypoints, demonstrating the capability of the ASPP module for multi-scale feature extraction.  By analyzing the distribution of the seven features and health, mild lameness, and severe lameness in dairy cows, it is shown that all the different features play an important role in distinguishing between different levels of lameness.

Key words: dairy cows ,  multi-scale ,  keypoints detection ,  ResNet101-ASPP network ,  motion features