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.