首页|基于改进YOLO v8的牛只行为识别与跟踪方法

基于改进YOLO v8的牛只行为识别与跟踪方法

扫码查看
随着我国畜牧业的快速发展,牛只养殖由分散性养殖逐渐向精准化养殖转变.针对分散养殖中农户无法对每头牛只健康状况给予足够关注的问题,通过分析牛只行为模式结合视觉方向特征,设计了综合管理方法来准确识别和跟踪牛只行为.首先,采用改进YOLO v8算法对牛只进行目标监测,其中,在Backbone和Neck端使用C2f-faster结构,增强模型特征提取能力;引入上采样算子CARAFE,拓宽感受视野进行数据特征融合;针对牛只幼仔检测加入BiFormer注意力机制,以识别牛只小面积特征;更换动态目标检测头DyHead,融合尺度、空间和任务感知;然后,使用Focal SIoU函数,解决正负样本分配不均衡和CIoU局限性的问题.最后,将YOLO v8检测到的行为类别信息引入BoTSORT算法中,实现在复杂场景下牛只多目标行为识别跟踪.实验结果表明,提出的FBCD-YOLO v8n(FasterNet、BiFormer、CARAFE、DyHead)模型在牛只行为数据集上,相比较 YOLO v5n、YOLO v7tiny 和原 YOLO v8n模型的mAP@0.5分别提升3.4、3.1、2.4个百分点,尤其牛只回舔行为识别平均精度提高7.4个百分点.跟踪方面,BoTSORT 算法的 MOTA 为 96.1%,MOTP 为 78.6%,IDF1 为 98.0%,HOTA 为 78.9%;与 ByteTrack、StrongSORT算法比,MOTA和IDF1显著提升,跟踪效果良好.研究表明,在牛舍养殖环境下,本研究构建的多目标牛只行为识别跟踪系统,可有效帮助农户监测牛只行为,为牛只的自动化精准养殖提供技术支持.
Method for Cattle Behavior Recognition and Tracking Based on Improved YOLO v8
With the rapid development of animal husbandry in China,the transition from farmers'dispersed cattle breeding to precision husbandry has become increasingly important.Efficient management of breeding,behavior monitoring,disease prevention,and health assurance pose significant challenges.Traditionally,farmers have struggled to provide adequate attention to each cow.To address these challenges,a comprehensive approach was developed that accurately identified and tracked cattle behavior by analyzing behavior patterns and visual characteristics.Firstly,the improved YOLO v8 algorithm was employed for cattle target detection.The model's feature extraction capabilities were enhanced by incorporating the C2f-faster structure into the Backbone and Neck.The upsampling operator CARAFE was introduced to expand the perception field for data feature fusion.To identify small area characteristics of young cattle,the BiFormer attention mechanism was integrated into the detection process,replacing the dynamic target detection head DyHead.This allowed to effectively integrate scale,space,and task perception.Furthermore,the issue of the uneven distribution of positive and negative samples and the limitations of CIoU was addressed by utilizing the Focal SIoU function.Finally,the behavior category information detected by YOLO v8 was incorporated into the BoTSORT algorithm to enable multi-target behavior recognition and tracking in complicated situations.The experiments demonstrated significant performance improvements.The proposed FBCD-YOLO v8n model outperformed both the YOLO v5n,YOLO v7tiny,and the original YOLO v8n models,with an increase of 3.4 percentage points,3.1 percentage points,and 2.4 percentage points in mAP@0.5,respectively,on the bovine behavior dataset.Notably,the accuracy of bovine back licking behavior recognition was increased by 7.4 percentage points.Regarding tracking,the BoTSORT algorithm achieved an MOTA of 96.1%,MOTP of 78.6%,HOTA of 78.9%,and IDF1 of 98.0%.Compared with ByteTrack and StrongSORT algorithms,the proposed method of MOTA and IDF1 scores demonstrated significant tracking improvements.This research demonstrated that the multi-objective cattle behavior recognition and tracking system developed can provide effective assistance to farmers in monitoring cattle behavior within the cattle barn environment.It offered crucial technical support for automated and precise cattle breeding.

cattleobject detectionbehavior recognitionmulti-object trackingYOLO v8BoTSORT

付辰伏、任力生、王芳

展开 >

河北农业大学信息科学与技术学院,保定 071001

河北省农业大数据重点实验室,保定 071001

牛只 目标监测 行为识别 多目标跟踪 YOLO v8 BoTSORT

河北省省级科技计划

19220119D

2024

农业机械学报
中国农业机械学会 中国农业机械化科学研究院

农业机械学报

CSTPCD北大核心
影响因子:1.904
ISSN:1000-1298
年,卷(期):2024.55(5)
  • 6