Abstract:
Pig tracking has been one of the most important steps in precision livestock farming. Especially, some challenges are still remained on the multi-object tracking of pigs. Various factors also included the varying feeding environment, the rapid movements of pigs, and frequent occlusions among them. In this study, a UKFTrack algorithm was proposed using the Byte framework. An advanced unscented kalman filter (UKF) was also introduced to enhance the tracking accuracy and robustness. A multi-stage matching strategy was obtained in complex farming environments. A comprehensive dataset was constructed with the sufficient training data, in order to verify the effectiveness of the UKFTrack algorithm. Oriented bounding boxes (OBB) was then used to annotate the dataset. Diverse patterns of pig motion were observed in different feeding scenarios and densities. These scenarios were ranged from the rapid movements in the high-density farming to the sudden directional changes and nighttime feeding behaviors. The dataset with the considerable size also exceeded the quality, temporal length, and diversity of existing public datasets. Consequently, the robust data support was provided for the research on the multi-object tracking in complex environments of pig farming. A broad range of critical challenges was captured to test the tracking algorithms, such as the occlusions, lighting changes, and interactions between pigs. In terms of UKFTrack algorithm design, an improved version of the UKF was introduced to specifically tailor for the tracking tasks with the OBB annotations. The traditional state vector was extended into the new parameters, such as the angle and angular velocity. A residual function was designed to handle these angular variables. The relatively errors were effectively avoided to significantly improve the tracking accuracy. The errors were typically arisen from directly subtracting angles. Particularly, these errors often occurred when tracking pigs' irregular and abrupt movements in complex environments. Furthermore, the multi-stage matching strategy also confirmed the stable tracking performance, even in the severe occlusions or rapid movements of pigs. Trajectory association and supplementary matching were incorporated to prevent the target loss for the continuous tracking of individual pigs, even under the high levels of occlusion and disturbances. The experimental results demonstrated that the outstanding performance of the UKFTrack algorithm was achieved in the 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. There were the 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%, respectively. The UKFTrack also shared the remarkable improvements, with the HOTA increasing by 21, 17.1, 5.5, and 5.5 percentage points in the respective scenarios, while the IDF1 increasing by 4.7, 9.1, 5.8, and 5.0 percentage points, compared with the baseline ByteTrack algorithm. Especially, the high accurate and robust tracking were obtained in the high-density farming, frequent occlusions, and complex pig movements. In conclusion, the UKFTrack algorithm was effectively realized the multi-object tracking in complex farming environments. A reliable tool was also offered for the real-world applications in the pig behavior monitoring and health assessment. The superior performance of UKFTrack was greatly contributed to the smart farming technologies. Looking ahead, the scalability of this UKFTrack algorithm can also be expected to extended into the larger datasets in the potential application, particularly for tracking other animals under multi-object scenarios. The UKFTrack algorithm can also hold the promise to significantly advance the precision of livestock monitoring in the challenging environments for the more efficient and effective smart farming.