Sheep peripartum behavior recognition method based on improved YOLOv8n-pose
-
Graphical Abstract
-
Abstract
An accurate and rapid identification of sheep periparturient behaviors can often be required to prevent the potential health risks and production abnormalities in modern animal husbandry. It is crucial to safeguard the ovine welfare for reproductive efficiency, thus reducing neonatal lamb mortality. However, some challenges still remain in the accurate recognition of the behavior during the periparturient period. Particularly, there is a high similarity between the behavioral traits and environmental interferences, such as the complex illumination and cluttered backgrounds in sheep farming. In this study, an advanced recognition was proposed to integrate an enhanced YOLOv8n-Pose key-point model with a backpropagation (BP) neural network. Specifically, an additional P2 detection layer was incorporated into the network architecture, in order to improve the precision of the key-point detection. The fine-grained and small-scale features were captured to accurately localize the anatomical key points in the complex behavioral scenarios. The detection layer was added for a higher degree of spatial resolution. Particularly, there were subtle movement variations in the periparturient sheep. Furthermore, a multi-scale attention block (MAB) module was introduced into the framework, in order to mitigate the feature representation in dynamic environments. A dynamic weighting module was employed to interactively learn the global and local spatial dependencies. Consequently, the robustness and generalization performance of the improved model was achieved under heterogeneous illumination. The MAB module effectively prioritized the most discriminative feature regions, thereby reducing the impact of the background noise and occlusions commonly observed in practical farming environments. The L1-norm channel pruning was systematically implemented to reduce the excessive parameters in the practical deployment constraints. The parameter compression was effectively optimized to eliminate the redundancy in the refined model. An optimal combination was achieved to balance computational efficiency and performance retention. The pruning was utilized to maintain the model integrity using structured sparsity, in order to significantly reduce the computational overhead. The real-time livestock monitoring was realized as suitable for edge computing. A multidimensional dataset of the behavioral feature was constructed to accurately extract the 12 key-point coordinates. Five joint angle parameters were integrated with two pairs of the key-point relative distance metrics, and the key-point detection confidence scores. The dataset was obtained with a 32-dimension feature vector. These feature representations were extracted to serve as the input into a BP neural network for the precise classification of the periparturient behaviors. The BP neural network was trained using adaptive learning. The complex spatiotemporal dependencies were effectively captured among the extracted features. The high classification accuracy was achieved after extraction. A series of experiments were conducted to evaluate the performance of the improved model on a self-developed dataset of periparturient sheep. The results demonstrated that the improved YOLOv8n-Pose model achieved a notable 4.6 percentage point increase in the mean average precision (mAP50) and a 6.7 percentage point improvement in mAP50:95 for the key-point detection, compared with the baseline architecture. Moreover, the BP neural network exhibited outstanding performance in the classification. An F1-score of 95.7% was obtained to distinguish the critical periparturient behaviors. The superior efficacy of the key-point recognition was obtained to identify the periparturient behavior. Ultimately, the robust technical framework greatly contributed to the intelligent livestock systems. Full automation and precision monitoring were enhanced in sheep farming.
-
-