An intelligent monitoring model based on YOLOv5 and an attention mechanism is proposed to improve automatic identification of abnormal pig behaviors in farming environments. A dataset containing pig fighting, abnormal feeding, and reduced activity behaviors was constructed and enhanced through data augmentation. By integrating a channel attention mechanism into YOLOv5s, the model improves feature extraction and detection performance for small and occluded targets. Experimental results show that the improved model achieves 95.24 % detection accuracy and 91 FPS, outperforming Faster R-CNN, YOLOv3, and the original YOLOv5s. The model demonstrates strong robustness, stability, and computational efficiency under complex conditions, providing effective technical support for intelligent livestock health management and precision farming applications.
View full abstract