基于Byte的生猪多目标跟踪算法

    A Multi-Object tracking algorithm for pigs based on byte

    • 摘要: 多目标跟踪技术对猪只精细化养殖具有重要意义。针对饲养环境差异、猪只的快速移动以及群猪之间的频繁遮挡带来的多目标跟踪挑战,该研究提出了一种基于Byte的生猪多目标跟踪算法UKFTrack。首先,构建了一个采用定向边界框(oriented bounding box, OBB)标注的多样化数据集,涵盖了猪只多种运动模式以及不同饲养场景和猪群密度;其次,引入了无迹卡尔曼滤波以更好的适配OBB标注,并对传统的状态向量进行了扩展,新增了角度和角速度参数,设计了残差函数处理角度变量以避免直接相减所造成的误差。最后,提出了一种多阶段匹配策略,通过多次轨迹关联和补充匹配机制,确保在遮挡严重或剧烈运动的情况下,仍能保持对目标的持续跟踪。试验结果表明,在白天重度密集、白天极度密集、夜间重度密集和夜间极度密集4种复杂场景下,UKFTrack的高阶跟踪精度(higher order tracking accuracy,HOTA)分别为96.10%、83.10%、76.50%和84.00%,IDF1得分(identification F1 score)分别为95.70%、78.20%、70.10%和77.60%。相较于ByteTrack,UKFTrack的HOTA分别提高了21.0、17.1、5.5和5.5个百分点,IDF1分别提高了4.7、9.1、5.8和5.0个百分点。因此,该研究提出的跟踪算法能实现复杂环境下群体生猪的准确跟踪,且展现出较强的鲁棒性,能为实际应用中猪只行为与健康监测提供可靠的技术支持。

       

      Abstract: In addressing the challenges encountered in precision livestock farming, especially in the multi-object tracking of pigs, a novel algorithm, UKFTrack, was proposed in this study. The difficulties in tracking pigs stem from various factors, including variations in the feeding environment, the rapid movements of pigs, and frequent occlusions between them. To tackle these challenges, the UKFTrack algorithm was developed based on the Byte framework. The primary objective of this algorithm was to enhance tracking accuracy and robustness in complex farming environments by introducing an advanced Unscented Kalman Filter (UKF) technique and a multi-stage matching strategy. To verify the effectiveness of the UKFTrack algorithm and provide it with sufficient training data, a comprehensive dataset was constructed. This dataset was annotated with Oriented Bounding Boxes (OBB) and includes diverse pig motion patterns observed in different feeding scenarios and densities. These scenarios range from rapid movements in high-density farming conditions to sudden directional changes and nighttime feeding behaviors. Not only is the dataset of considerable size, but it also exceeds the quality, temporal length, and diversity of existing public datasets. Consequently, this dataset provides robust data support for research on multi-object tracking in complex pig farming environments. It captures a broad range of critical challenges for developing and testing tracking algorithms, such as occlusions, lighting changes, and interactions between pigs.In terms of algorithm design, UKFTrack introduced an improved version of the UKF, tailored specifically for tracking tasks that use OBB annotations. The traditional state vector was extended to include new parameters, such as angle and angular velocity, and a residual function was designed to handle these angular variables. This innovation helped the algorithm effectively avoid errors that would typically arise from directly subtracting angles, leading to significant improvements in tracking accuracy. This was particularly evident when tracking pigs' irregular and abrupt movements in complex environments. Furthermore, the inclusion of a multi-stage matching strategy ensured stable tracking performance, even in situations involving severe occlusions or rapid movements of pigs. This strategy incorporated several levels of trajectory association and supplementary matching mechanisms, which helped prevent target loss and maintain continuous tracking of individual pigs, even under high levels of occlusion and other disturbances.The experimental results demonstrated the outstanding performance of the UKFTrack algorithm across four challenging scenarios: dense pig farming during the day, extremely dense pig farming during the day, dense pig farming at night, and extremely dense pig farming at night. In these settings, UKFTrack achieved impressive HOTA (higher order tracking accuracy) scores of 96.10%, 83.10%, 76.50%, and 84.00%, respectively, along with IDF1 (Identity F1 Score) scores of 95.70%, 78.20%, 70.10%, and 77.60%. When compared to the baseline ByteTrack algorithm, UKFTrack showed remarkable improvements, with HOTA increasing by 21, 17.1, 5.5, and 5.5 percentage points in the respective scenarios, and IDF1 increasing by 4.7, 9.1, 5.8, and 5.0 percentage points. These results underline the superior ability of UKFTrack to maintain accurate and robust tracking, especially in scenarios involving high-density farming, frequent occlusions, and complex pig movements.In conclusion, the UKFTrack algorithm effectively addresses the challenges of multi-object tracking in complex farming environments. It exhibits high levels of robustness and accuracy, making it a reliable tool for real-world applications in pig behavior monitoring and health assessment. The findings from this study contribute to the development of smart farming technologies. Looking ahead, future research could explore the scalability of this algorithm with larger datasets and investigate its potential application in tracking other animals in multi-object scenarios. The UKFTrack algorithm holds promise for significantly advancing the precision of livestock monitoring in challenging environments, paving the way for more efficient and effective smart farming solutions.

       

    /

    返回文章
    返回