基于骨架特征的生猪行为识别方法

尹朝阳 ,  叶俊华 ,  徐爱俊 ,  周素茵 ,  梁梓源

南京农业大学学报 ›› 2026, Vol. 49 ›› Issue (3) : 708 -718.

PDF (7784KB)
南京农业大学学报 ›› 2026, Vol. 49 ›› Issue (3) : 708 -718. DOI: 10.7685/jnau.202411032
智慧农业与农业工程

基于骨架特征的生猪行为识别方法

作者信息 +

Pig behavior recognition method based on skeleton features

Author information +
文章历史 +
PDF (7970K)

摘要

[目的]生猪健康状况与其行为密切相关,而生猪行为与其骨架特征直接关联,本文提出了一种基于骨架特征的生猪行为识别方法。[方法]使用 YOLOv8s-Pose 算法检测生猪关键点,提取生猪骨架特征,并将其输入图卷积网络,在图卷积网络中引入残差结构,以加速模型的训练和优化过程,再引入一种加权策略,对不同位置的关键点信息进行距离加权,在保留远邻节点信息的同时,增强了近邻节点的特征表达,提升了模型的行为识别性能。[结果]模型对生猪站、坐、躺 3 种行为识别的平均精确率达到了 87.30%,相比 YOLOv8s 模型提高了6.53 百分点,同时100 次推理时间仅有0.19s。[结论]提出的生猪行为识别方法能实现生猪日常行为的准确、快速分类,为群养生猪日常行为监测和健康评估提供了技术参考。

Abstract

[Objectives]The health status of live pigs is closely related to their behavior, and their behavior is directly related to their skeletal features. Therefore, a pig behavior recognition method based on skeletal features was proposed in this paper. [Methods]The YOLOv8s-Pose algorithm was used to detect keypoints of pigs and extract skeleton features of pigs, and then input the features into a graph convolutional network; residual structures were introduced into graph convolutional networks to accelerate the training and optimization process of the model; a weighting strategy was introduced to weight the distance of keypoint information at different locations, which further enhanced the feature expression of neighboring nodes while retaining the information of distant nodes, thereby improving the behavior recognition performance of the model. [Results]The experimental results showed that the model achieved an average accuracy of 87.30% in recognizing the behaviors of pigs standing, sitting, and lying, which was 6.53 percentage points higher than the YOLOv8s model. At the same time, the inference time for 100 times was only 0.19 seconds. [Conclusions]The pig behavior recognition method proposed in this article could achieve accurate and rapid classification of daily pig behavior, providing technical reference for monitoring and health assessment of group pigs' daily behavior.

关键词

猪 / 行为识别 / 姿态估计 / 图卷积网络 / 关键点检测

Key words

pig / behavior recognition / pose estimation / graph convolutional network / keypoint detection

引用本文

引用格式 ▾
尹朝阳,叶俊华,徐爱俊,周素茵,梁梓源. 基于骨架特征的生猪行为识别方法[J]. 南京农业大学学报, 2026, 49(3): 708-718 DOI:10.7685/jnau.202411032

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

[1]

何东健, 刘冬, 赵凯旋. 精准畜牧业中动物信息智能感知与行为检测研究进展[J]. 农业机械学报, 2016, 47(5): 231-244.

[2]

He DJ, Liu D, Zhao KX. Review of perceiving animal information and behavior in precision livestock farming[J]. Transactions of the Chinese Society for Agricultural Machinery, 2016, 47(5): 231-244(in Chinese with English abstract).

[3]

闫丽, 邵庆, 席桂清. 家畜行为智能监测系统的研究进展[J]. 家畜生态学报, 2014, 35(12): 6-10.

[4]

Yan L, Shao Q, Xi GQ. Research progress of livestock behavior intelligent monitoring system[J]. Acta Ecologiae Animalis Domastici, 2014, 35(12): 6-10(in Chinese with English abstract).

[5]

Iredale SK, Nevill CH, Lutz CK. The influence of observer presence on baboon(Papio spp.)and Rhesus macaque(Macaca mulatta)behavior[J]. Applied Animal Behaviour Science, 2010, 122(1): 53-57.

[6]

缪晓辉. 浅谈生猪规模养殖存在的问题和对策[J]. 中国动物保健, 2021, 23(11): 80-81.

[7]

Miao XH. Discussion on the problems and countermeasures of large-scale pig breeding[J]. China Animal Health, 2021, 23(11): 80-81 (in Chinese).

[8]

闫丽, 沈明霞, 姚文, 等. 基于 MPU6050 传感器的哺乳期母猪姿态识别方法[J]. 农业机械学报, 2015, 46(5): 279-285.

[9]

Yan L, Shen MX, Yao W, et al. Recognition method of lactating sows' posture based on sensor MPU6050[J]. Transactions of the Chinese Society for Agricultural Machinery, 2015, 46(5): 279-285(in Chinese with English abstract).

[10]

刘龙申,沈明霞,姚文, 基于加速度传感器的母猪产前行为特征采集与分析[J]. 农业机械学报,2013,44(3):192-196,191.

[11]

Liu LS, Shen MX, Yao W, et al. Acquisition and analysis of sows' behavior before farrowing based on acceleration sensor[J]. Transactions of the Chinese Society for Agricultural Machinery, 2013, 44(3):192-196, 191(in Chinese with English abstract).

[12]

潘芷欣, 陈荟慧, 钟委钊. 基于可穿戴设备的母猪产后行为识别[J]. 农业工程学报, 2022, 38(增刊 1): 209-217.

[13]

Pan ZX, Chen HH, Zhong WZ. Recognition of the behaviour of lactating sows using wearable devices[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(Suppl 1): 209-217(in Chinese with English abstract).

[14]

刘龙申, 柳荦, 周杰, 等. 母猪精准养殖智能感知技术研究进展[J]. 华南农业大学学报, 2024, 45(5): 635-648.

[15]

Liu LS, Liu L, Zhou J, et al. Research progress on precision breeding and intelligent sensing technologies for sows[J]. Journal of South China Agricultural University, 2024, 45(5): 635-648(in Chinese with English abstract).

[16]

贺稚非, 余思洁, 李洪军, 等. 非洲猪瘟病毒生物学特性及在猪肉生产中的防控措施研究[J]. 农业工程学报, 2019, 35(10): 299-304.

[17]

He ZF, Yu SJ, Li HJ, et al. Biological characteristics of African swine fever virus and its prevention and control measures in pork food production[J]. Transactions of the Chinese Society of Agricultural Engineering, 2019, 35(10): 299-304(in Chinese with English abstract).

[18]

杨秋妹, 肖德琴, 张根兴. 猪只饮水行为机器视觉自动识别[J]. 农业机械学报, 2018, 49(6): 232-238.

[19]

Yang QM, Xiao DQ, Zhang GX. Automatic pig drinking behavior recognition with machine vision[J]. Transactions of the Chinese Society for Agricultural Machinery, 2018, 49(6): 232-238(in Chinese with English abstract).

[20]

查文文, 潘伟豪, 陈成鹏, 等. 基于边缘计算与改进 YOLOv5 的群养生猪姿态识别及跟踪研究[J]. 东北农业大学学报, 2023, 54(3): 83-96.

[21]

Zha WW, Pan WH, Chen CP, et al. Study on pose recognition and tracking of herd-raised pigs based on edge computing and improved YOLOv5[J]. Journal of Northeast Agricultural University, 2023, 54(3): 83-96(in Chinese with English abstract).

[22]

Alameer A, Kyriazakis I, Dalton HA, et al. Automatic recognition of feeding and foraging behaviour in pigs using deep learning[J]. Biosystems Engineering, 2020, 197: 91-104.

[23]

Yang QM, Xiao DQ, Lin SC. Feeding behavior recognition for group-housed pigs with the Faster R-CNN[J]. Computers and Electronics in Agriculture, 2018, 155: 453-460.

[24]

李艳文,李菊霞,纳腾潇, 基于 YOLOX-NGS 的群养猪只攻击行为识别[J]. 农业工程学报,2023,39(24):177-184.

[25]

Li YW, Li JX, Na TX, et al. Recognizing attack behavior of herd pigs using improved YOLOX[J]. Transactions of the Chinese Society of Agricultural Engineering, 2023, 39(24):177-184(in Chinese with English abstract).

[26]

房俊龙, 胡宇航, 戴百生, 等. 采用改进 CenterNet 模型检测群养生猪目标[J]. 农业工程学报, 2021, 37(16): 136-144.

[27]

Fang JL, Hu YH, Dai BS, et al. Detection of group-housed pigs based on improved CenterNet model[J]. Transactions of the Chinese Society of Agricultural Engineering, 2021, 37(16): 136-144(in Chinese with English abstract).

[28]

肖德琴, 冯爱晶, 杨秋妹, 等. 基于视频追踪的猪只运动快速检测方法[J]. 农业机械学报, 2016, 47(10): 351-357,331.

[29]

Xiao DQ, Feng AJ, Yang QM, et al. Fast motion detection for pigs based on video tracking[J]. Transactions of the Chinese Society for Agricultural Machinery, 2016, 47(10): 351-357, 331(in Chinese with English abstract).

[30]

高云, 陈斌, 廖慧敏, 等. 群养猪侵略性行为的深度学习识别方法[J]. 农业工程学报, 2019, 35(23): 192-200.

[31]

Gao Y, Chen B, Liao HM, et al. Recognition method for aggressive behavior of group pigs based on deep learning[J]. Transactions of the Chinese Society of Agricultural Engineering, 2019, 35(23): 192-200(in Chinese with English abstract).

[32]

董力中, 孟祥宝, 潘明, 等. 基于姿态与时序特征的猪只行为识别方法[J]. 农业工程学报, 2022, 38(5): 148-157.

[33]

Dong LZ, Meng XB, Pan M, et al. Recognizing pig behavior on posture and temporal features using computer vision[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(5): 148-157(in Chinese with English abstract).

[34]

李光昌, 刘飞飞, 李嘉豪. 基于改进 OpenPose 算法的猪只行为识别方法[J]. 河南农业大学学报, 2022, 56(3): 460-470.

[35]

Li GC, Liu FF, Li JH. Pig behavior recognition method based on improved OpenPose algorithm[J]. Journal of Henan Agricultural University, 2022, 56(3): 460-470(in Chinese with English abstract).

[36]

Gan HM, Xu CG, Hou WH, et al. Spatiotemporal graph convolutional network for automated detection and analysis of social behaviours among pre-weaning piglets[J]. Biosystems Engineering, 2022, 217: 102-114.

[37]

陆舟, 沈明霞, 刘龙申, 等. 基于轻量化网络与注意力机制的育肥猪采食行为识别方法研究[J]. 南京农业大学学报, 2023, 46(4): 802-812. DOI: 10.7685/jnau.202208023.

[38]

Lu Z, Shen MX, Liu LS, et al. Study on feeding behavior recognition method of fattening pigs based on lightweight networks and attention mechanism[J]. Journal of Nanjing Agricultural University, 2023, 46(4): 802-812(in Chinese with English abstract).

[39]

Wang ZH, Zhou SY, Yin P, et al. GANPose: Pose estimation of grouped pigs using a generative adversarial network[J]. Computers and Electronics in Agriculture, 2023, 212: 108119.

[40]

Yang QM, Xiao DQ. A review of video-based pig behavior recognition[J]. Applied Animal Behaviour Science, 2020, 233: 105146.

[41]

Yan SJ, Xiong YJ, Lin DH. Spatial temporal graph convolutional networks for skeleton-based action recognition[C] // Proceedings of the AAAI Conference on Artificial Intelligence, 2018, 32(1): 7444-7452.

[42]

He KM, Zhang XY, Ren SQ, et al. Deep residual learning for image recognition[C] // 2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). June 27-30, 2016, Las Vegas, NV, USA. IEEE, 2016: 770-778.

[43]

Mathis A, Mamidanna P, Cury KM, et al. DeepLabCut: markerless pose estimation of user-defined body parts with deep learning[J]. Nature Neuroscience, 2018, 21(9): 1281-1289.

[44]

Fang HS, Li JF, Tang HY, et al. AlphaPose: whole-body regional multi-person pose estimation and tracking in real-time[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023, 45(6): 7157-7173.

[45]

Wang CY, Bochkovskiy A, Liao HM. YOLOv7: train able bag-of-freebies sets new state-of-the-art for real-time object detectors[ C] // 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR). June 17-24, 2023, Vancouver, BC, Canada. IEEE, 2023: 7464-7475.

[46]

Sun K, Xiao B, Liu D, et al. Deep high-resolution representation learning for human pose estimation[ C] // 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR). June 15-20, 2019. Long Beach, CA, USA. IEEE, 2019: 5686-5696.

[47]

Jiang T, Lu P, Zhang L, et al. RTMPose: real-time multi-person pose estimation based on MMPose[EB/OL]. 2023:arXiv:2303.07399. https://arxiv.org/abs/2303.07399v2.

[48]

Li YJ, Yang S, Liu PD, et al. SimCC: a simple coordinate classification perspective for human pose estimation[M] // Computer Vision-ECCV 2022. Cham: Springer Nature Switzerland, 2022: 89-106.

[49]

Rumelhart DE, Hinton GE, Williams RJ. Learning representations by back-propagating errors[J]. Nature, 1986, 323(6088): 533-536.

[50]

Chen TQ, Guestrin C. XGBoost: a scalable tree boosting system[ C] // Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. San Francisco California USA. ACM, 2016: 785-794.

基金资助

浙江省“领雁”研发攻关计划项目(2022C02050)

AI Summary AI Mindmap
PDF (7784KB)

0

访问

0

被引

详细

导航
相关文章

AI思维导图

/

〈 〉