Precise monitoring of sow behaviour is essential for enhancing animal welfare and production efficiency in precision husbandry. This study proposes an improved RT-DETR model to address real-time detection challenges in complex farming environments. By integrating innovative multi-scale feature fusion and lightweight attention mechanisms, the model achieves high-precision detection of four key postures (standing, sitting, sternal recumbency, and lateral recumbency). Experimental results show that the model attains an mAP@0.5 of 96.6% and a processing speed of 56 FPS, significantly outperforming existing methods. Furthermore, a Unity3D-based digital twin system was constructed to enable real-time bidirectional mapping, achieving a low latency of 320 ms. This system proposes a potential technical framework for intelligent pig farm management, providing a reliable tool for automated welfare assessment and operational decision support.
Chen et al. (Thu,) studied this question.