LI Xiaxi, E-mail: xiaxili@msn.com
[Objective] In the livestock industry, animal behavior serves as a critical indicator for evaluating physiological health and providing environmental early warning. To address the challenges of severe multi-object occlusion, complex illumination, and class imbalance in intensive farming, a detail-contextual attention-YOLO (DC-YOLO) model was developed for the 24/7 automatic detection of daily behaviors in housed Hu sheep, thereby facilitating precision management. [Methods] For severe multi-object occlusion, an adaptive detail-contextual attention (DCAttention) mechanism was introduced to construct the DCAC3K2 module, and bounding box similarity soft-NMS (BS-NMS) was adopted to prevent incorrect removal of occluded bounding boxes. For complex illumination, a Light-Encoder was pre-trained on illumination conditions and its parameters were transferred to DC-YOLO. For class imbalance, a comprehensive classification-quality focal loss was designed to adaptively increase loss weights for occluded and minority-class samples. The dataset, collected through 24/7 surveillance at Hu sheep farms, comprised 505 annotated images depicting 5 daily behaviors: drinking, eating, lying, licking, and standing. [Results and Discussions] DC-YOLO achieved mAP@50 of 91.4%, improving by 7.8 percentage points over YOLOv12. Moreover, DC-YOLO had 2.29 M parameters, an 8.74% reduction compared to YOLOv12. On CPU, the inference time of DC-YOLO was reduced to 115.5 ms and the frame rate increased to 8.50 f/s, corresponding to improvements of 33.2% and 48.9%, respectively. [Conclusions] Experimental results demonstrate that DC-YOLO effectively mitigates detection challenges caused by severe occlusion, complex illumination, and class imbalance while maintaining high inference efficiency. Consequently, it provides effective technical support for tracking and analyzing behaviors in intensive Hu sheep farming.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |