Abstract:Cow tracking is an essential technique for obtaining positional and behavioral data of cows, playing a vital role in intelligent farm management. To tackle challenges such as missed and false detections, as well as track fragmentation caused by small object sizes, occlusion, and overlap in farm videos, the YOLOX-BT algorithm was proposed. This method enhanced both detection and tracking performance. Specifically, the YOLOX-s model was improved by replacing the original CSP2 _ 1 structure with the CFP_EVCBlock, boosting small object detection capability. Within CFP_EVCBlock, a feature refinement module ( FRM ) was designed by integrating multiple feature enhancement mechanisms, enabling prioritized extraction of important features and effectively mitigating occlusion and overlap issues. In the tracking phase, appearance similarity was introduced into the data association process, and the weights between appearance and IoU matching were dynamically adjusted, improving cow identity matching accuracy. Experimental results showed that the improved detector achieves an average precision of 94. 9% , precision of 94. 2% , recall of 92. 7% , and an inference speed of 22. 9 f/ s, representing gains of 1. 2, 0. 8, 2. 3 percentage points, and 29. 4% , respectively, over the baseline. Additionally, the number of parameters and FLOPs were reduced by 9. 3% and 16. 7% , respectively. In the cow multi-object tracking task, YOLOX-BT achieved a MOTA of 93. 2% , IDF1 of 95. 2% , 13 ID switches, and a MOTP of 5. 3% . Compared with commonly used methods, the proposed algorithm showed significant improvements in both tracking accuracy and identity consistency, providing robust technical support for intelligent cow management.