DACN-YOLO: an Improved Abnormal Behavior Recognition Model for Pigs

Yiming Cui, Ruiqi Wang, Dongzhen Shen, Rui Mao · 2024

The prompt and accurate recognition of abnormal pig behavior is crucial for ensuring the welfare of pig farming. Existing behavior recognition models often overlook abnormal pig behaviors and are unable to recognize both individual and group interaction behaviors of pigs. To tackle these limitations, we developed an optimized variant of YOLOv8, known as DACNYOLO, capable of simultaneously recognizing seven behaviors in pigs. Initially, we designed a DCN-CPCA module based on Deformable Convolutional Network (DCN) and Channel Prior Convolutional Attention (CPCA), enhancing the adaptability of convolutional checks for multi-scale pig behaviors and facilitating better capture of behavioral information. Subsequently, we integrated DCN-CPCA into C2f, forming the DC-C2f module to optimize the backbone network of YOLOv8. Additionally, to improve frame positioning accuracy and dynamically adapt to complex behavioral changes in pigs, we introduced a WIoU loss function based on a monotonic focusing mechanism to enhance the detection head. Furthermore, we established a comprehensive and standardized pig behavior dataset, CPBD2024, comprising images of four common behaviors (sniffing, lying, walking, and kneeling) and three abnormal behaviors (fighting, fence-climbing, and mounting). Experimental results on the CPBD2024 demonstrated that DACN-YOLO proficiently recognized three abnormal behaviors and four common behaviors simultaneously with a mean Average Precision (mAP) of 95.8% and a speed of 114 Frames Per Second (FPS). Compared to YOLOv8, DACN-YOLO significantly improved recognition accuracy with almost negligible impact on speed, thereby achieving simultaneous recognition of individual and group interaction behaviors and providing technical support for intelligent management and welfare-focused breeding of pigs.

Read the paper · More papers on PaperTik