maintaining the multifunctionality of grassland ecosystems [5]. Controlling overgrazing necessitates effective management of herders' livestock numbers to maintain the pasture's healthy condition and preclude further grassland degradation. At the moment, the primary technique for determining grassland stocking capacity is manual field surveys carried out by specialists in plant protection and grassland management [6]. The typical manual survey, however, has numerous drawbacks, including low representativeness, poor timeliness, and high subjectivity. It is also time-consuming and difficult, has restricted coverage, and is hampered by the vastness and complexity of the grassland area [7; 8; 9]. Therefore, it is crucial to advance the intelligent development and automation of livestock detection and early warning systems. The use of various intelligent gadgets in contemporary livestock farming together with computer vision technology in livestock production has become more commonplace in recent years and has become a hotspot for livestock farming research [10; 11; 12]. The utilization of these intelligent devices has markedly enhanced livestock-raising accuracy and efficiency, reduced dependence on labor and resources, lowered livestock-raising costs, and fostered sustainable growth in the livestock industry. Computer vision technology can be employed to analyze livestock through images or videos for disease detection, behavior monitoring, and individual identification. Among these applications, the identification and localization of individual livestock using target detection technology constitutes an important research direction. Currently, deep learning target recognition methods are categorized into two groups based on the number of detection stages [13]. Two-stage object detectors entail a detection process segmented into two stages. In the first stage, regions that potentially contain targets are selected from the input image, while in the second stage, targets are identified and located within these candidate regions. Representative methods encompass R-CNN [14], Fast-RCNN [15], and Faster-RCNN [16] proposed by [PERSON] et al. While this type of target detector typically achieves high accuracy, its substantial computational demands and intricate model structure necessitate more advanced hardware configurations and longer computation times. By comparison, one-stage models have superior real-time performance due to their ability to recognize and locate items inside the picture. While their accuracy may be somewhat lower than that of two-stage models, they can detect things much faster [17]. Representing single-stage models, the YOLO series achieves rapid and highly accurate detection through the rational design and modification of its network structure [18]. The YOLO series models have shown significant promise in livestock detection applications [19]. [PERSON] and [PERSON] et al. enhanced the YOLOV4 model by incorporating a novel composite multi-channel attention mechanism. This innovation significantly improved the model's performance in livestock detection tasks within agricultural environments, achieving an mAP of 89.77%. However, it is important to note that the model still faces challenges with missed detection of small targets, especially when livestock are lying down or in similar positions. This issue is largely attributed to the horizontal shooting angles commonly employed in the dataset [20]. [PERSON] and [PERSON] et al. introduced an enhanced Chengdu horse goat detection algorithm based on TPH-YOLOv5, integrating BiFPN instead of PANet. This technique successfully identifies Chengdu ma goats in actual indoor cowshed breeding settings, laying the groundwork for precision livestock feeding according to age and gender. However, its limitation lies in its applicability being restricted to indoor breeding scenarios and its focus on a single livestock species [21]. [PERSON] and [PERSON] et al. combined YOLOv5 with UAV imagery and videography to achieve recognition and localization of free-grazing dairy cattle.