农业机械学报2025,Vol.56Issue(10):585-595,11.DOI:10.6041/j.issn.1000-1298.2025.10.053
基于YOLO v9c和改进ByteTrack的群养羊只多目标跟踪方法
Multi-objective Tracking Method for Sheep in Flock Breeding Based on YOLO v9c and Improved ByteTrack
摘要
Abstract
Video-based group sheep tracking plays an important role in large-scale,intelligent and unmanned breeding.However,due to the severe occlusion,overlap and excessive movement speed of the flock,it is difficult to accurately track multiple sheep in complex scenes.In order to solve the above problems and improve the adaptability of tracking technology to group sheep,a multi-objective sheep tracking method was proposed based on the combination of YOLO v9c and improved ByteTrack.In terms of object detection,the behavior of sheep was divided into three states:standing,grovel and eating.In terms of multi-target tracking,two improvements were made to ByteTrack:the time and distance matching module(TDMM)was introduced,and the unmatched high-score frame and unmatched trajectory were combined according to the loss time of the lost trajectory and the Euclidean distance to form an identity association coefficient matrix,and the matching was carried out again.The ID delay allocation mechanism was introduced,and in addition to the first frame,the ID allocation module was moved to the third match and conditions were added to prevent premature ID allocation.The results showed that the HOTA was 72.051%,the MOTA was 88.326%,the IDF1 was 88.237%,and the IDSW was 8.Compared with the original ByteTrack,MOTA was increased by 0.242 percentage points,HOTA was increased by 2.21 percentage points,IDF1 was increased by 5.734 percentage points,and the number of ID hops was decreased by about 46.67%.Compared with the representative algorithms Bot-SORT and OC-SORT,the number of ID hops was significantly increased in HOTA and IDF1,and the number of ID hops was greatly reduced.The test results in the complex scenario of multiple sheep showed that the improved ByteTrack algorithm had good multi-target tracking performance,which can effectively improve the accuracy and reliability of group sheep tracking.When the algorithm was combined with the YOLO v9c object detection algorithm to track the sheep in groups and save the tracking results,the average video processing speed was 47.1 f/s,which was about 37.7%higher than that of the Bot-SORT algorithm of 34.2 f/s.The algorithm can reliably monitor sheep in real time,which can provide an effective technical means for sheep farm managers to detect abnormal sheep behavior and monitor the health status of sheep in time.关键词
群养羊只/目标跟踪/时间距离匹配模块/ID延时分配/YOLO v9c/改进ByteTrackKey words
sheep in flock breeding/target tracking/TDMM/delayed ID allocation/YOLO v9c/improved ByteTrack分类
计算机与自动化引用本文复制引用
郑芳,夏传宇,杜小勇,周勇,田芳,李国亮..基于YOLO v9c和改进ByteTrack的群养羊只多目标跟踪方法[J].农业机械学报,2025,56(10):585-595,11.基金项目
国家自然科学基金项目(31872978)和国家重点研发计划青年科学家项目(2021YFD1300800) (31872978)