首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于YOLOX-NGS的群养猪只攻击行为识别
引用本文:李艳文,李菊霞,纳腾潇,智晴宇,段磊,张朋鹏.基于YOLOX-NGS的群养猪只攻击行为识别[J].农业工程学报,2023,39(24):177-184.
作者姓名:李艳文  李菊霞  纳腾潇  智晴宇  段磊  张朋鹏
作者单位:山西农业大学信息科学与工程学院, 太谷 030801
基金项目:山西省基础研究青年项目(202103021223141)
摘    要:为解决复杂猪舍环境下猪只堆叠和粘连导致群养猪只攻击行为识别准确率低和有效性差的问题,该研究提出一种改进的YOLOX模型,引入攻击活动比例(PAA)和攻击行为比例(PAB)2个优化指标,对群养猪只的撞击、咬耳和咬尾等典型攻击行为进行识别。首先,为提高模型特征提取能力添加归一化注意力模块获取YOLOX颈部的全局信息;其次,将YOLOX中的IoU损失函数替换为GIoU损失函数,以提升识别精度;最后,为保证模型的实时性将空间金字塔池化结构SPP轻量化为SPPF,增强检测效率。试验结果表明,改进的YOLOX模型平均精度达97.57%,比YOLOX模型提高6.8个百分点。此外,当PAAPAB阈值分别为0.2和0.4时,识别准确率达98.55%,有效解决因猪只攻击行为动作连续导致单帧图像行为识别可信度低的问题。研究结果表明,改进的YOLOX模型融合PAAPAB能够实现高精度的猪只攻击行为识别,为群养生猪智能化监测提供有效参考和技术支持。

关 键 词:  行为识别  检测  攻击行为  注意力模块  损失函数  特征金字塔
收稿时间:2023/8/16 0:00:00
修稿时间:2023/11/22 0:00:00

Recognizing attack behavior of herd pigs using improved YOLOX
LI Yanwen,LI Juxi,NA Tengxiao,ZHI Qingyu,DUAN Lei,ZHANG Pengpeng.Recognizing attack behavior of herd pigs using improved YOLOX[J].Transactions of the Chinese Society of Agricultural Engineering,2023,39(24):177-184.
Authors:LI Yanwen  LI Juxi  NA Tengxiao  ZHI Qingyu  DUAN Lei  ZHANG Pengpeng
Institution:College of Information Science and Engineering, Shanxi Agricultural University, Taigu 030801
Abstract:Image data was collected at the Pig Breeding Base in Fenxi County, Linfen City, Shanxi Province in July 2020. Nine 5-month-old fattening pigs were selected to raise in a closed pig house. Hikvision DS-2CD3345D-I model camera was used in a downward tilt angle of 60 degrees to collect data under incandescent light. This angle was utilized to obtain the rich behavioral features of pigs, in order to avoid large-scale occlusion, compared with the head-up and overhead views. In the process of data collection, the daily behavior videos of pigs were first repeatedly observed, and 185 video clips of pigs with aggressive behavior were extracted; Inter frame difference method was used to extract the key frames from these video clips. Slow pig movement and long rest time were removed as well. An improved YOLOX model was proposed to identify the typical attack behaviors of herd pigs, such as impact, ear biting, and tail biting. The high accuracy and effectiveness were achieved to reduce pig stacking and adhesion in complex pen environments. Firstly, a Normalization based Attention Module (NAM) was added to obtain the global information about the YOLOX neck; Secondly, the loss function IoU Loss in the YOLOX was replaced with the GIoU to improve the recognition accuracy; Finally, the real-time performance of the model was realized to enhance feature extraction and detection efficiency. Feature pyramid structure SPP was lightweight to SPPF. The experiment showed that the integrated NAM modules, GIoU Loss replacing, and SPPF feature pyramid structures in the original backbone network improved the average accuracy of the model by 2.5, 2.12, and 0.98 percentage points, respectively. The model with SPP feature pyramid structure reduced the parameter by 0.1 MB and improved the accuracy by 0.98 percentage points, indicating the minimum impact of the model parameter after the integrated NAM module. The average accuracy of the improved model increased from 90.77% to 97.57%, with an increase of 6.8 percentage points; The parameter quantity decreased from the highest 34.7 to 34.5 MB with a decrease of 0.2 MB. In addition, there was the continuous attack behavior of pigs in the low credibility of single-frame images. Two optimization indicators (namely attack behavior ratio ((PAA) and attack activity ratio (PAB))were introduced to further confirm whether the attack behavior occurred. When the PAA and PAB thresholds were 0.2 and 0.4, respectively, the recognition accuracy (Accuracy) reached 98.55%. Video segments with frequent attacks were selected to verify the effectiveness of the optimization. Usually, PAA and PAB posed a significant impact on the recognition of pig aggressive behavior; If the threshold set was too small, it was easy to misjudge frames without attack behavior as having occurred; If the threshold set was too large, the frame without the attack was assumed as the occurrence. The experimental results show that the improved YOLOX model was achieved in the high-precision recognition of pig attack behavior by the integrated PAA and PAB. The finding can provide effective reference and technical support for the intelligent monitoring of herd health pigs.
Keywords:pig  behavior recognition  detection  attack behavior  attention mechanism  loss function  feature pyramid
点击此处可从《农业工程学报》浏览原始摘要信息
点击此处可从《农业工程学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号