改进帧间差分
摘要: 群养猪行为是评估猪群对环境适应性的重要指标。猪场环境中,猪只行为识别易受不同光线和猪只粘连等因素影响,为提高群养猪只行为识别精度与效率,该研究提出一种基于改进帧间差分-深度学习的群养猪只饮食、躺卧、站立和打斗等典型行为识别方法。该研究以18只50~115日龄长白猪为研究对象,采集视频帧1 117张,经图像增强共得到4 468张图像作为数据集。首先,选取Faster R-CNN、SSD、Retinanet、Detection Transformer和YOLOv5五种典型深度学习模型进行姿态检测研究,通过对比分析,确定了最优姿态检测模型;然后,对传统帧间差分法进行了改进,改进后帧间差分法能有效提取猪只完整的活动像素特征,使检测结果接近实际运动猪只目标;最后,引入打斗活动比例(Proportion of Fighting Activities, PFA)和打斗行为比例(Proportion of Fighting Behavior, PFB)2个指标优化猪只打斗行为识别模型,并对模型进行评价,确定最优行为模型。经测试,YOLOv5对群养猪只典型姿态检测平均精度均值达93.80%,模型大小为14.40 MB,检测速度为32.00帧/s,检测速度满足姿态实时检测需求,与Faster R-CNN、SSD、Retinanet和Detection Transformer模型相比,YOLOv5平均精度均值分别提高了1.10、3.23、4.15和21.20个百分点,模型大小分别减小了87.31%、85.09%、90.15%和97.10%。同时,当两个优化指标PFA和PFB分别设置为10%和40%时,猪只典型行为识别结果最佳,识别准确率均值为94.45%。结果表明,该方法具有准确率高、模型小和识别速度快等优点。该研究为群养猪只典型行为精准高效识别提供方法参考。
关键词: 深度学习 / 识别 / 群养猪只 / 姿态检测Abstract: 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 18 Landrace pigs aged 50~115 days were selected with nine pigs per pen. 1117 video frames were collected. Then, a total of 4468 images 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.
[1] 何东健,刘冬,赵凯旋. 精准畜牧业中动物信息智能感知与行为检测研究进展[J]. 农业机械学报,2016,47(5):231-244.He Dongjian, Liu Dong, Zhao Kaixuan. 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) [2] 李丹,陈一飞,李行健,等. 计算机视觉技术在猪行为识别中应用的研究进展[J]. 中国农业科技导报,2019,21(7):59-69.Li Dan, Chen Yifei, Li Xingjian, et al. Research advance on computer vision in behavioral analysis of pigs[J]. Journal of Agricultural Science and Technology, 2019, 21(7): 59-69. (in Chinese with English abstract) [3] Chen C, Zhu W, Norton T. Behaviour recognition of pigs and cattle: Journey from computer vision to deep learning[J]. Computers and Electronics in Agriculture, 2021, 187: 106255. [4] Nilsson M, Herlin A H, Ard? H, et al. Development of automatic surveillance of animal behaviour and welfare using image analysis and machine learned segmentation technique[J]. Animal, 2015, 9(11): 1859-1865. [5] 汪开英,赵晓洋,何勇.畜禽行为及生理信息的无损监测技术研究进展[J]. 农业工程学报,2017,33(20):197-209.Wang Kaiying, Zhao Xiaoyang, He Yong. Review on noninvasive monitoring technology of poultry behavior and physiological information[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(20): 197-209. (in Chinese with English abstract) [6] 刘龙申,沈明霞,姚文,等. 基于加速度传感器的母猪产前行为特征采集与分析[J]. 农业机械学报,2013,44(3):192-196.Liu Longshen, Shen Mingxia, Yao Wen, 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. (in Chinese with English abstract) [7] 闫丽,沈明霞,姚文,等. 基于MPU6050传感器的哺乳期母猪姿态识别方法[J]. 农业机械学报,2015,46(5):279-285.Yan Li, Shen Mingxia, Yao Wen, 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) [8] 郝福明. 基于微惯性传感器的生猪异常行为监测[D]. 太原:太原理工大学,2018.Hao Fuming. Abnormal Behavior Monitoring of Pigs Based on Micro Inertial Sensor[D]. Taiyuan: Taiyuan University of Technology, 2018. (in Chinese with English abstract) [9] 张飞宇,王美丽,王正超. 引入Transformer和尺度融合的动物骨骼关键点检测模型构建[J]. 农业工程学报,2021,37(23):179-185.Zhang Feiyu, Wang Meili, Wang Zhengchao. Construction of the animal skeletons keypoint detection model based on transformer and scale fusion[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(23): 179-185. (in Chinese with English abstract) [10] 施宏,沈明霞,刘龙申,等. 基于Kinect的哺乳期母猪姿态识别算法的研究[J]. 南京农业大学学报,2019,42(1):177-183.Shi Hong, Shen Mingxia, Liu Longshen, 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) [11] 谢徵. 基于决策树支持向量机的猪只姿态分类与异常行为分析[D]. 太原:太原理工大学,2015.Xie Wei. Pig Posture Classification and Abnormal Behavior Analysis Based on Decision Tree Support Vector Machine[D]. Taiyuan: Taiyuan University of Technology, 2015. (in Chinese with English abstract) [12] 刘冬,何东健,陈晨,等. 基于ALR-GMM的群养猪攻击行为识别算法研究[J]. 农业机械学报,2021,52(1):201-208.Liu Dong, He Dongjian, Chen Chen, et al. Recognition of aggressive behaviour in group-housed pigs based on ALR-GMM[J]. Transactions of the Chinese Society for Agricultural Machinery, 2021, 52(1): 201-208. (in Chinese with English abstract) [13] Le Cun, Y, Bengio, Y, Hinton, G, et al. Deep learning[J]. Nature, 2015, 521(7553): 436-444. [14] 苍岩,罗顺元,乔玉龙. 基于深层神经网络的猪声音分类[J]. 农业工程学报,2020,36(9):195-204.Cang Yan, Luo Shunyuan, Qiao Yulong. Classification of pig sounds based on deep neural network[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(9): 195-204. (in Chinese with English abstract) [15] 康飞龙. 基于机器学习的多目标猪只状态与个体行为识别研究[D]. 呼和浩特:内蒙古农业大学,2018.Kang Feilong. Study on the Machine Learning Based Swine Herd State Monitoring and Individual Behaviour Recognition[D]. Huhhot: Inner Mongolia Agricultural University, 2018. (in Chinese with English abstract) [16] 朱勋沐. 基于计算机视觉的哺乳母猪姿态识别研究[D]. 广州:华南农业大学,2019.Zhu Xunmu. Research on Automatic Recognition of Lactating Sow Postures Based on Computer Vision[D]. Guangzhou: South China Agricultural University, 2019. (in Chinese with English abstract) [17] 薛月菊,朱勋沐,郑婵,等. 基于改进Faster R-CNN识别深度视频图像哺乳母猪姿态[J]. 农业工程学报,2018,34(9):189-196.Xue Yueju, Zhu Xunmu, Zheng Chan, 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 (Transactions of the CSAE), 2018, 34(9): 189-196. (in Chinese with English abstract) [18] 高云,陈斌,廖慧敏,等. 群养猪侵略性行为的深度学习识别方法[J]. 农业工程学报,2019,35(23):192-200.Gao Yun, Chen Bin, Liao Huimin, et al. Recognition method for aggressive behavior of group pigs based on deep learning[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(23): 192-200. (in Chinese with English abstract) [19] Zhang Y, Cai J, Xiao D, et al. Real-time sow behavior detection based on deep learning[J]. Computers and Electronics in Agriculture, 2019, 163: 104884. [20] Hu X, Liu Y, Zhao Z, et al. Real-time detection of uneaten feed pellets in underwater images for aquaculture using an improved YOLO-v4 network[J]. Computers and Electronics in Agriculture, 2021, 185: 106135. [21] Sivamani S, Choi S H, Lee D H, et al. Automatic posture detection of pigs on real-time using Yolo framework[J]. Int J Res Trends Innov, 2020, 5: 81-88. [22] Kim M J, Choi Y H, Lee J, et al. A deep learning-based approach for feeding behavior recognition of weanling pigs[J]. Journal of Animal Science and Technology, 2021, 63(6): 1453. [23] Yang Q, Xiao D, Lin S. Feeding behavior recognition for group-housed pigs with the Faster R-CNN[J]. Computers and Electronics in Agriculture, 2018, 155: 453-460. [24] McGlone J J. A quantitative ethogram of aggressive and submissive behaviors in recently regrouped pigs[J]. Journal of Animal Science, 1985, 61(3): 556-566. [25] 樊湘鹏,许燕,周建平,等. 基于迁移学习和改进 CNN 的葡萄叶部病害检测系统[J]. 农业工程学报,2021,37(6):151-159.Fan Xiangpeng, Xu Yan, Zhou Jianping, et al. Detection system for grape leaf diseases based on transfer learning and updated CNN[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(6): 151-159. (in Chinese with English abstract) [26] 龙满生,欧阳春娟,刘欢,等. 基于卷积神经网络与迁移学习的油茶病害识图像识别[J]. 农业工程学报,2018,34(18):194-201.Long Mansheng, Ouyang Chunjuan, Liu Huan, et al. Image recognition of Camellia oleifera diseases based on convolutional neural network & transfer learning[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(18): 194-201. (in Chinese with English abstract) [27] 高海壮,段先华. 基于帧差法和混合高斯的海上运动目标检测[J]. 计算机与数字工程,2019,47(5):1140-1144.Gao Haizhuang, Duan Xianhua. A method for detecting maritime moving targets based on three-frame difference method and improved hybrid Gaussian background model[J]. Computer & Digital Engineering, 2019, 47(5): 1140-1144. (in Chinese with English abstract) [28] 房俊龙,胡宇航,戴百生,等. 采用改进CenterNet模型检测群养生猪目标[J]. 农业工程学报,2021,37(16):136-144.Fang Junlong, Hu Yuhang, Dai Baisheng, et al. Detection of group-housed pigs based on improved CenterNet model[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(16): 136-144. (in Chinese with English abstract) [29] Chen C, Zhu W, Liu D, et al. Detection of aggressive behaviours in pigs using a RealSence depth sensor[J]. Computers and Electronics in Agriculture, 2019, 166: 105003. [30] Zhang Y, Cai J, Xiao D, et al. Real-time sow behavior detection based on deep learning[J]. Computers and Electronics in Agriculture, 2019, 163: 104884. [31] 季照潼,李东明,王娟,等. 基于深度学习YOLO v4的舍养育肥猪行为识别[J]. 黑龙江畜牧兽医,2021(14):39-42.Ji Zhaotong, Li Dongming, Wang Juan, et al. Behavior recognitionof fattening pigs based on deep learning YOLO v4[J]. Heilongjiang Animal Science and veterinary Medicine, 2021(14): 39-42. (in Chinese with English abstract) [32] 张苏楠,田建艳,菅垄,等. 基于帧间差分法-单点多框检测器的圈养生猪打斗行为识别方法[J]. 江苏农业学报,2021,37(2):397-404.Zhang Sunan, Tian Jianyan, Jian Long, et al. Recognition method of aggressive behaviors among pigs in pigpens based on frame difference (FD)-single shot MultiBox detector (SSD)[J]. Jiangsu Journal of Agricultural Sciences, 2021, 37(2): 397-404. (in Chinese with English abstract)相关知识
一种基于深度残差网络的宠物图像情绪识别方法与流程
宠物装备商人谈谈宠物装备的改进问题
基于深度迁移学习与XGBoost的混合鸟鸣识别方法
基于在线评论挖掘的宠物家具产品设计改进方法
运用高斯混合模型识别动物声音情绪
鸟类声音识别方法、装置、计算机设备和存储介质与流程
一种基于深度残差网络的宠物图像情绪识别方法
广州市狂犬病防治工作中存在问题与改进措施探讨.doc
一种基于深度残差网络的宠物图像情绪识别方法.pdf
一种基于注意力残差和特征融合的鸟语识别方法和系统
网址: 改进帧间差分 https://www.mcbbbk.com/newsview722810.html
上一篇: 动物行为监测的研究进展——以舍养 |
下一篇: 基于无线传感器网络的猪运动行为监 |
推荐分享

- 1我的狗老公李淑敏33——如何 5096
- 2南京宠物粮食薄荷饼宠物食品包 4363
- 3家养水獭多少钱一只正常 3825
- 4豆柴犬为什么不建议养?可爱的 3668
- 5自制狗狗辅食:棉花面纱犬的美 3615
- 6狗交配为什么会锁住?从狗狗生 3601
- 7广州哪里卖宠物猫狗的选择性多 3535
- 8湖南隆飞尔动物药业有限公司宠 3477
- 9黄金蟒的价格 3396
- 10益和 MATCHWELL 狗 3352