Method for the automatic calculation of newborn lambs activity using ByteTrack algorithm enhanced by state vector
-
Graphical Abstract
-
Abstract
The activity level of newborn lambs is one of the most important indicators to assess the vitality of the lambs and the reproductive capacity of ewes. In this study, a novel multi-object tracking (named state vector-enhanced ByteTrack) was proposed to automatically calculate the vitality of newborn lambs. This innovative approach integrates advanced tracking algorithms to analyze lamb movement with high precision detection. According to the activity of lambs, the breeding performance of ewes was evaluated, and the lambs with low vitality were detected in time. Traditional multi-object tracking (i.e., ByteTrack) tends to cause identity switching, when the occlusions occurred. Furthermore, the state vectors that only contained the position and shape information were not sufficient to accurately distinguish between occluding and occluded lambs. Specifically, the higher confidence scores were received in the lambs that were occluding, while the occluded lambs received the lower confidence scores. The confidence information was used to better distinguish between overlapping newborn lambs, thereby improving tracking accuracy. Once the tracking target was lost, the linear Kalman filter was led to accumulate the errors in the predicted trajectory. The cubic spline interpolation was used to reconstruct the virtual trajectory during the target loss period. The state vector of the lost target's trajectory was then re-updated, according to the reconstructed virtual trajectory. The accuracy of the trajectory state vector was improved, and the cumulative error in the predicted trajectory is corrected. The state vector-enhanced ByteTrack was used to track the activities of newborn lambs, thereby obtaining the movement trajectory for each lamb. According to the movement trajectory, the displacement between adjacent frames was calculated for each lamb, and then summed to represent the activity level of the lamb. The performance of the state vector-enhanced ByteTrack was tested on the video dataset of lamb activity collected at the Jiangsu Haimen Goat Research and Development Center. The extensive testing phase ensured the reliability and accuracy of the tracking system under various conditions. The experimental results show that the proposed multi-target tracking achieved the remarkable performance on several key indexes. Specifically, the high-order tracking accuracy (HOTA) was 80.8%, the multi-target tracking accuracy (MOTA) was 86.1%, the multi-target tracking precision (MOTP) was 84.5%, and the recognition F1 score (IDF1) was 92.2%. The indexes were 2.7, 0.2, 2.3, and 3.9 percentage points higher than those of current mainstream methods, respectively. The state vector-enhanced ByteTrack demonstrates robustness under different birthing conditions, providing consistent and reliable tracking performance that can be effectively deployed in real-world farming scenarios. In summary, the state vector-enhanced ByteTrack algorithm innovatively uses the confidence information and track state vector to re-update, and realizes the stable tracking of newborn lambs. The scheme provides data and technical support for automatic calculation of lamb vitality and evaluation of ewe breeding performance. The practicability and effectiveness of the model were verified to monitor the animal health and reproductive performance. Ultimately, a great contribution was gained to better manage and select breeding stock, in order to enhance the productivity and sustainability in livestock farming.
-
-