Abstract
Pig production is dominated in the livestock industry, particularly for the food safety, social stability, and the coordinated development of the national economy. An accurate tracking of pig behavior can greatly contribute to the health and well-being of pigs, in terms of the detection of abnormal conditions, such as diseases and dangerous movements. However, manual monitoring cannot fully meet the large-scale production in recent years, due to the time consuming, subjective, and labor intensity. Fortunately, the video surveillance technology has been carried out to detect and track pigs. But it is still lacking on accurate tracking and detection of pig behavior in various complex scenes (day or night, sparse or dense condition). In this study, an improved TransTrak multiple object tracking (MOT) was proposed to automatically detect the pigs, and then track the behavior of each detected pig, with considering the motion information of the behavior. Three improvements included an improved CIOU matching to remove the overlapping detections, the behavior category learning with MOT, and the data association. Therefore, the improved TransTrack approach performed better to identify the pig objects during behavior tracking in complex scenarios. The improved TransTrack was validated on the special dataset under a variety of settings. The specific dataset included the public dataset with 23 video sequences and 6900 images, and the private dataset with 8 video segments and 2400 images. The experimental results show that the MOT accuracy (MOTA), the higher order tracking accuracy (HOTA), and ID switches (IDs) on all test videos were 92.0%, 69.8%, and 210, respectively, using the improved TransTrack. On the public dataset, the improved TransTrack achieved the MOTA with 92.4%, HOTA with 72.1%, and IDs with 147. And the improved TransTrack improved the MOTA by 3.9, 9.0 and 13.1 percentage points, HOTA by 1.3, 9.5, and 8.3 percentage points, and decreased in the IDs by 136, 326, and 376, respectively, compared with the Trackformer, JDE, and TransTrack. On the private dataset, the improved TransTrack obtained the MOTA with 91.5%, HOTA with 62.5%, and IDs with 63. The MOTA was increased by 14.4, and 15.8 percentage points, and the HOTA was improved by 1.8, and 9.5 percentage points, respectively, compared with the Trackformer and TransTrack. The improved TransTrack can be expected to obtain the best performance in the tracking evaluation metrics (MOTA, HOTA, and IDs) among the four methods. Therefore, the improved TransTrack can also provide the scalable technical support for the automatic monitoring pigs.