摘要
群养猪行为是评估猪群对环境适应性的重要指标。猪场环境中,猪只行为识别易受不同光线和猪只粘连等因素影响,为提高群养猪只行为识别精度与效率,该研究提出一种基于改进帧间差分-深度学习的群养猪只饮食、躺卧、站立和打斗等典型行为识别方法。该研究以18只50~115日龄长白猪为研究对象,采集视频帧1117张,经图像增强共得到4468张图像作为数据集。首先,选取Faster R-CNN、SSD、Retinanet、Detection Transformer和YOLOv5五种典型深度学习模型进行姿态检测研究,通过对比分析,确定了最优姿态检测模型;然后,对传统帧间差分法进行了改进,改进后帧间差分法能有效提取猪只完整的活动像素特征,使检测结果接近实际运动猪只目标;最后,引入打斗活动比例(Proportion of Fighting Activities,PFA)和打斗行为比例(Proportion of Fighting Behavior,PFB)2个指标优化猪只打斗行为识别模型,并对模型进行评价,确定最优行为模型。经测试,YOLOv5对群养猪只典型姿态检测平均精度均值达93.80%,模型大小为14.40MB,检测速度为32.00帧/s,检测速度满足姿态实时检测需求,与FasterR-CNN、SSD、Retinanet和DetectionTransformer模型相比,YOLOv5平均精度均值分别提高了1.10、3.23、4.15和21.20个百分点,模型大小分别减小了87.31%、85.09%、90.15%和97.10%。同时,当两个优化指标PFA和PFB分别设置为10%和40%时,猪只典型行为识别结果最佳,识别准确率均值为94.45%。结果表明,该方法具有准确率高、模型小和识别速度快等优点。该研究为群养猪只典型行为精准高效识别提供方法参考。
Typical behavior of herd pigs is one of the most important indicators to evaluate the adaptability of pigs to the environment.This study aims to improve the accuracy and efficiency of herd behavior recognition.A novel recognition system was proposed for the typical behavior of herd pigs(such as eating,lying,standing,and fighting)using an improved frame differential-deep learning.The video image data was collected from two pens of group-fed Landrace pigs.A total of 18Landrace pigs aged 50~115 days were selected with nine pigs per pen.1117 video frames were collected.Then,a total of 4468images were obtained after image enhancement as the dataset.Firstly,five models of typical deep learning(including Faster-RNN,SSD,Retinanet,Detection Transformer,and YOLOv5)were selected for posture detection.An optimal model of posture was determined after the comparative analysis.Secondly,a pixel feature extraction was implemented on the pig activity to promote the traditional frame differential approach,such as,the slow motion pigs were easy to miss the detection,and more holes were detected in the pigs.Finally,the Proportion of Fighting Activities(PFA)and Proportion of Fighting Behavior(PFB)were used to optimize the pig fighting behavior in the recognition model.An optimal behavior model was determined during this time.The result showed that the average accuracy of YOLOv5 reached 93.80%for the typical posture detection of group-reared pigs.Among them,the model size was 14.40 MB,and the detection speed was 32.00 f/s,indicating that the detection speed fully met the demand for real-time posture detection.Once the Intersection over Union(IoU)threshold was set as 0.50,the mean average accuracy of YOLOv5 increased by 1.10,3.23,4.15,and 21.20 percentage points,respectively,and the model size was reduced by 87.31%,85.09%,90.15%,and 97.10%,respectively,compared with the Faster-RNN,SSD,Retinanet,and Detection Transformer models.Meanwhile,the original frame difference was expanded from the frame difference of 2,to 4 after experimental analysis.The improved frame difference was utilized to effectively eliminate the fine holes that were produced by the slow-moving pigs and background interference,such as lighting,as well as the outstandingly retained pixel characteristics of vigorous movement activities,when the pigs were fighting.The better performance of detection was achieved close to the actual movement targets.The pig eating,lying,and standing behaviors were directly discriminated by the single-frame posture images of pigs.Furthermore,100 video frames containing fighting behavior(frame speed of 30 f/s,duration of 5~60s)and video frames without fighting behavior were selected to verify the accuracy of the pig fighting behavior recognition.The reason was that the pig fighting behavior was a continuous process.The test results showed that the best average value of typical behavior recognition accuracy was 94.45%,when the two optimized indexes of PFA and PFB were set as 10%and 40%,respectively.Therefore,the high accuracy,small model size,and fast recognition can provide technical support and strong reference for the accurate and efficient identification of typical behaviors of herd pigs in group breeding.
作者
曾繁国
朱君
王海峰
贾楠
赵宇亮
赵文文
李斌
Zeng Fanguo;Zhu Jun;Wang Haifeng;Jia Nan;Zhao Yuliang;Zhao Wenwen;Li Bin(Intelligent Equipment Research Center,Beijing Academy of Agriculture and Forestry Sciences,Beijing 100097,China;National Research Center of Intelligent Equipment for Agriculture,Beijing 100097,China)
出处
《农业工程学报》
EI
CAS
CSCD
北大核心
2022年第15期170-178,共9页
Transactions of the Chinese Society of Agricultural Engineering
基金
国家科技创新2030-“新一代人工智能”重大项目课题(2021ZD0113804)
北京农业智能装备技术研究中心开放课题(KFZN2020W011)
北京市农林科学院改革与发展项目。
关键词
深度学习
识别
群养猪只
姿态检测
deep learning
recognition
herd pigs
posture detection