YOLOv8A-SD: A Segmentation-Detection Algorithm for Overlooking Scenes in Pig Farms - Yiran Liao; Yipeng Qiu; Bo Liu; Yibin Qin; Yuchao Wang; Zhijun Wu; Lijia Xu; Ao Feng (Animals)
A refined YOLOv8A-SD model is introduced to address pig detection challenges in aerial surveillance of pig farms. The model incorporates the ADown attention mechanism and a dual-task strategy combining detection and segmentation tasks. Testing was conducted using top-view footage from a large-scale pig farm in Sichuan, with 924 images for detection training, 216 for validation, and 2985 images for segmentation training, with 1512 for validation. The model achieved 96.1% Precision and 96.3% mAP50 in detection tasks while maintaining strong segmentation performance (IoU: 83.1%). A key finding reveals that training with original images while applying segmentation preprocessing during testing provides optimal results, achieving exceptional counting accuracy (25.05 vs. actual 25.09 pigs) and simplifying practical deployment. The research demonstrates YOLOv8A-SD’s effectiveness in complex farming environments, providing reliable monitoring capabilities for intelligent farm management applications.