基于 YOLOv8n 的分娩舍母猪姿态识别研究

柳荦 ,  陈金鑫 ,  沈明霞 ,  赵茹茜 ,  刘龙申

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

PDF (8853KB)
南京农业大学学报 ›› 2026, Vol. 49 ›› Issue (3) : 685 -696. DOI: 10.7685/jnau.202412031
智慧农业与农业工程

基于 YOLOv8n 的分娩舍母猪姿态识别研究

作者信息 +

Research on sow posture recognition in farrowing pens based on YOLOv8n

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

摘要

[目的]为提升分娩舍母猪行为监测的智能化水平,降低新生仔猪死亡率并优化分娩管理效率,本文提出一种基于 YOLOv8n 模型的母猪姿态识别方法。[方法]以 32 头分娩舍母猪为研究对象,采用安装于分娩栏上方的 RGB 摄像头实现全天候视频采集,构建母猪姿态数据集,并利用 YOLOv8 模型进行训练与推理,实现对母猪不同姿态的精准识别。为提升识别结果的连续性与准确性,引入滑动窗口算法对模型输出进行平滑处理,并结合时序信息对姿态占比、姿态转换频次及活动量等行为指标进行统计分析,以评估母猪的健康状态及分娩动态。[结果]YOLOv8n 模型在精确率(97.5%)、召回率(96.1%)与推理速度(0.7ms·f-1)等方面表现优异,实现了准确性与实时性的有效平衡,满足养殖现场的实时监测需求。滑动窗口方法提升了姿态识别结果的稳定性,降低了误检率。分析结果表明,不同栏位母猪的姿态占比存在差异,部分异常姿态比例较高,提示潜在健康风险,以便进行早期干预。分娩前后姿态转换频次的变化可用于辅助预测分娩时间。活动量变化规律可为环境优化提供依据。[结论]本研究提出的基于 YOLOv8n 的母猪姿态识别方法,具备高效性与准确性,能够实现分娩舍母猪的行为异常监测和辅助分娩预警,为现代化养猪场提供了智能化技术支持,具有广泛的应用前景。

Abstract

[Objectives]To enhance the level of intelligent behavior monitoring in farrowing pens, reduce piglet mortality, and optimize farrowing management efficiency, this paper proposes a sow posture recognition method based on the YOLOv8n model. [Methods]The study involved 32 sows in the farrowing pen, with 24/7 video capture achieved using RGB cameras installed above the farrowing pens. A sow posture dataset was constructed, and the YOLOv8n model was employed for training and inference to accurately recognize different sow postures. To improve the continuity and accuracy of the recognition results, a sliding window algorithm was introduced to smooth the model's output. Additionally, time-series information was used to statistically analyze behavioral metrics such as posture proportions, posture transition frequencies, and activity levels, in order to assess the sows' health status and farrowing dynamics. [Results] The YOLOv8n model demonstrated outstanding performance with precision (97.5%), recall (96.1%), and inference speed (0.7 ms·f-1), effectively balancing accuracy and real-time performance to meet the real-time monitoring requirements in farming environments. The sliding window method enhanced the stability of posture recognition results and reduced misdetection rates. Analysis indicated differences in posture proportions among sows in different pens, with a higher proportion of abnormal postures in some, suggesting potential health risks and the need for early intervention. Changes in posture transition frequency before and after farrowing could assist in predicting farrowing time. The activity level change patterns provide a basis for environmental optimization. [Conclusions] The proposed YOLOv8n-based sow posture recognition method is efficient and accurate, capable of monitoring behavioral anomalies and providing early farrowing alerts for sows in the farrowing pens. It offers intelligent technological support for modern pig farms and has broad application prospects.

关键词

分娩舍母猪 / YOLOv8n / 姿态识别 / 姿态分析 / 异常预警 / 计算机视觉技术

Key words

farrowing pen sows / YOLOv8n / posture recognition / posture analysis / anomaly warning / computer vision technology

引用本文

引用格式 ▾
柳荦,陈金鑫,沈明霞,赵茹茜,刘龙申. 基于 YOLOv8n 的分娩舍母猪姿态识别研究[J]. 南京农业大学学报, 2026, 49(3): 685-696 DOI:10.7685/jnau.202412031

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

[1]

Marchant JN, Broom DM, Corning S. The influence of sow behaviour on piglet mortality due to crushing in an open farrowing system[J]. Animal Science, 2001, 72(1): 19-28.

[2]

Wang JS, Wu MC, Chang HL, et al. Predicting parturition time through ultrasonic measurement of posture changing rate in crated Landrace sows[J]. Asian-Australasian Journal of Animal Sciences, 2007, 20(5): 682-692.

[3]

Lao F, Brown-Brandl T, Stinn JP, et al. Automatic recognition of lactating sow behaviors through depth image processing[J]. Computers and Electronics in Agriculture, 2016, 125: 56-62.

[4]

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

[5]

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).

[6]

Thompson R, Matheson SM, Plötz T, et al. Porcine liedetectors: automatic quantification of posture state and transitions in sows using inertial sensors[J]. Computers and Electronics in Agriculture, 2016, 127: 521-530.

[7]

Traulsen I, Scheel C, Auer W, et al. Using acceleration data to automatically detect the onset of farrowing in sows[J]. Sensors, 2018, 18(1): 170.

[8]

Rohan A, Rafaq MS, Hasan MJ, et al. Application of deep learning for livestock behaviour recognition: a systematic literature review[J]. Computers and Electronics in Agriculture, 2024, 224: 109115.

[9]

Porto SM C, Arcidiacono C, Anguzza U, et al. The automatic detection of dairy cow feeding and standing behaviours in free-stall barns by a computer vision-based system[J]. Biosystems Engineering, 2015, 133: 46-55.

[10]

Bhuiyan MR, Wree P. Animal behavior for chicken identification and monitoring the health condition using computer vision: a systematic review[J]. IEEE Access, 2023, 11: 126601-126610.

[11]

薛月菊, 朱勋沐, 郑婵, 等. 基于改进 Faster R-CNN 识别深度视频图像哺乳母猪姿态[J]. 农业工程学报, 2018, 34(9): 189-196.

[12]

Xue YJ, Zhu XM, Zheng C, et al. Lactating sow postures recognition from depth image of videos based on improved Faster R-CNN[J]. Transactions of the Chinese Society of Agricultural Engineering, 2018, 34(9): 189-196(in Chinese with English abstract).

[13]

薛月菊, 李诗梅, 郑婵, 等. 融合 2D-3D 卷积特征识别哺乳母猪姿态转换[J]. 农业工程学报, 2021, 37(9): 230-237.

[14]

Xue YJ, Li SM, Zheng C, et al. Posture change recognition of lactating sow by using 2D-3D convolution feature fusion[J]. Transactions of the Chinese Society of Agricultural Engineering, 2021, 37(9): 230-237(in Chinese with English abstract).

[15]

施宏, 沈明霞, 刘龙申, 等. 基于 Kinect 的哺乳期母猪姿态识别算法的研究[J]. 南京农业大学学报, 2019, 42(1): 177-183. DOI: 10.7685/jnau.201803025.

[16]

Shi H, Shen MX, Liu LS, et al. Study on recognition method of lactating sows' posture based on Kinect[J]. Journal of Nanjing Agricultural University, 2019, 42(1): 177-183(in Chinese with English abstract).

[17]

Yang XF, Zheng C, Zou CH, et al. A CNN-based posture change detection for lactating sow in untrimmed depth videos[J]. Computers and Electronics in Agriculture, 2021, 185: 106139.

[18]

Liu LS, Zhou J, Zhang B, et al. Visual detection on posture transformation characteristics of sows in late gestation based on Libra R-CNN[J]. Biosystems Engineering, 2022, 223: 219-231.

[19]

刘龙申, 舒翠霓, 李波, 等. 基于 EfficientDet 的围产期母猪姿态识别[J]. 农业机械学报, 2022, 53(4): 271-279.

[20]

Liu LS, Shu CN, Li B, et al. Recognition of perinatal sows' posture based on EfficientDet algorithm[J]. Transactions of the Chinese Society for Agricultural Machinery, 2022, 53(4): 271-279(in Chinese with English abstract).

[21]

Jocher G, Chaurasia A, Qiu J. Ultralytics YOLOv8[EB/OL]. [2026-04-03]. https://github.com/ultralytics/ultralytics.

[22]

Zhou J, Liu L, Jiang T, et al. A novel behavior detection method for sows and piglets during lactation based on an inspection robot[J]. Computers and Electronics in Agriculture, 2024, 227: 109613.

[23]

Zheng C, Zhu XM, Yang XF, et al. Automatic recognition of lactating sow postures from depth images by deep learning detector[J]. Computers and Electronics in Agriculture, 2018, 147: 51-63.

[24]

Jensen P. Observations on the maternal behaviour of free-ranging domestic pigs[J]. Applied Animal Behaviour Science, 1986, 16(2): 131-142.

[25]

Wischner D, Kemper N, Krieter J. Nest-building behaviour in sows and consequences for pig husbandry[J]. Livestock Science, 2009, 124(1): 1-8.

基金资助

江苏省现代农业项目(BE2021363)

AI Summary AI Mindmap
PDF (8853KB)

0

访问

0

被引

详细

导航
相关文章

AI思维导图

/

〈 〉