RF-GoatDet: An Occlusion-Aware Instance Segmentation Framework for Dairy Goats with an Adaptive Receptive Field Encoder
Abstract
Accurate instance segmentation is essential for precision livestock farming, as it supports individual tracking, posture analysis, body-shape measurement, and other downstream visual monitoring tasks. However, dairy goat segmentation in dense barn scenes remains challenging because frequent mutual occlusion, instance adhesion, partial visibility, and non-rigid posture variation often lead to incomplete masks and ambiguous instance boundaries. To address these challenges, this study develops RF-GoatDet, a real-time instance segmentation framework for dairy goats built upon RT-DETR. The main component of the proposed framework is an Adaptive Receptive Field Encoder (ARFE), which enhances feature encoding by adapting the effective receptive field to irregular goat contours, scale variation, and partially visible body regions. In addition, Coordinate Attention is introduced to strengthen direction-aware spatial representation, while a Query-Conditioned Dynamic Mask Head is used to generate instance-specific masks and improve the separation of adjacent goats. A dairy goat instance segmentation dataset containing 2288 annotated images was constructed, and a two-stage cleaning procedure was applied to reduce redundancy and visual anomalies. Experimental results show that RF-GoatDet achieves 46.5% mask AP and 62 FPS on this dataset, improving the RT-DETR baseline by 4.2 percentage points in mask AP while maintaining real-time inference. These results demonstrate that the proposed ARFE-centered framework effectively improves mask quality and instance discrimination in dense dairy goat scenes, providing a robust and efficient solution for real-time visual monitoring in precision livestock farming.
Fields of Study & Subjects
Animal Behavior and Welfare Studies
Effects of Environmental Stressors on Livestock
Food Supply Chain Traceability
Publication details
- Journal / source
- Mathematics
- Publisher
- MDPI AG
- Volume
- 14
- Issue
- 11
- Pages
- 1786–1786
- Publication date
- 22 May 2026
- Language
- EN