đ€ AI Summary
To address the poor robustness of cattle detection in complex farm environmentsâcharacterized by low illumination, severe occlusion, variable poses, and cluttered backgroundsâthis paper proposes an enhanced YOLOv8 model integrated with the Convolutional Block Attention Module (CBAM). CBAM is innovatively embedded into both the backbone and neck networks of YOLOv8 to enable adaptive channel- and spatial-wise feature weighting. A high-quality cattle detection dataset encompassing six representative indoor and outdoor farm scenarios is constructed, augmented with scenario-specific data augmentation and multi-environment transfer learning strategies. Experimental results demonstrate that the proposed method achieves an mAP@0.5:0.95 of 82.6% and a precision of 95.2%, outperforming the baseline YOLOv8 by 2.3 percentage points and significantly surpassing Mask R-CNN and YOLOv5. The approach effectively supports fine-grained individual cattle identification and long-term behavioral monitoring in smart dairy farms.
đ Abstract
Animal welfare has become a critical issue in contemporary society, emphasizing our ethical responsibilities toward animals, particularly within livestock farming. The advent of Artificial Intelligence (AI) technologies, specifically computer vision, offers an innovative approach to monitoring and enhancing animal welfare. Cows, as essential contributors to sustainable agriculture, are central to this effort. However, existing cow detection algorithms face challenges in real-world farming environments, such as complex lighting, occlusions, pose variations, and background interference, hindering detection. Model generalization is crucial for adaptation across contexts beyond the training dataset. This study addresses these challenges using a diverse cow dataset from six environments, including indoor and outdoor scenarios. We propose a detection model combining YOLOv8 with the CBAM (Convolutional Block Attention Module) and assess its performance against baseline models, including Mask R-CNN, YOLOv5, and YOLOv8. Our findings show baseline models degrade in complex conditions, while our approach improves using CBAM. YOLOv8-CBAM outperformed YOLOv8 by 2.3% in mAP, achieving 95.2% precision and an mAP@0.5:0.95 of 82.6%, demonstrating superior accuracy. Contributions include (1) analyzing detection limitations, (2) proposing a robust model, and (3) benchmarking state-of-the-art algorithms. Applications include health monitoring, behavioral analysis, and tracking in smart farms, enabling precise detection in challenging settings. This study advances AI-driven livestock monitoring, improving animal welfare and smart agriculture.