MACA-Net: Mamba-Driven Adaptive Cross-Layer Attention Network for Multi-Behavior Recognition in Group-Housed Pigs
The accurate recognition of pig behaviors in intensive farming is crucial for health monitoring and growth assessment. To address multi-scale recognition challenges caused by perspective distortion (non-frontal camera angles), this study proposes MACA-Net, a YOLOv8n-based model capable of detecting four key behaviors: eating, lying on the belly, lying on the side, and standing. The model incorporates a Mamba Global–Local Extractor (MGLE) Module, which leverages Mamba to capture global dependencies while preserving local details through convolutional operations and channel shuffle, overcoming Mamba’s limitation in retaining fine-grained visual information. Additionally, an Adaptive Multi-Path Attention (AMPA) mechanism integrates spatial-channel attention to enhance feature focus, ensuring robust performance in complex environments and low-light conditions. To further improve detection, a Cross-Layer Feature Pyramid Transformer (CFPT) neck employs non-upsampled feature fusion, mitigating semantic gap issues where small target features are overshadowed by large target features during feature transmission. Experimental results demonstrate that MACA-Net achieves a precision of 83.1% and mAP of 85.1%, surpassing YOLOv8n by 8.9% and 4.4%, respectively. Furthermore, MACA-Net significantly reduces parameters by 48.4% and FLOPs by 39.5%. When evaluated in comparison to leading detectors such as RT-DETR, Faster R-CNN, and YOLOv11n, MACA-Net demonstrates a consistent level of both computational efficiency and accuracy. These findings provide a robust validation of the efficacy of MACA-Net for intelligent livestock management and welfare-driven breeding, offering a practical and efficient solution for modern pig farming.
Authors
- Ruishi Xie (ORCID: https://orcid.org/0000-0001-8797-8201)
- Yizhi Luo (ORCID: https://orcid.org/0000-0002-8362-5481)
- Zhaocong Wu (ORCID: https://orcid.org/0000-0003-2435-5538)
- Xinyuan He (ORCID: https://orcid.org/0009-0007-3631-334X)
- Zhixiong Zeng (ORCID: https://orcid.org/0000-0002-3822-1074)
- Seng Ghee Tan (ORCID: https://orcid.org/0000-0001-8081-102X)
- Kai Lin
Institutions
- South China Agricultural University (CN)
- Poultry Research Institute (CN)
- Guangdong Academy of Agricultural Sciences (CN)
Publication Details
- Journal
- Agriculture
- Published
- 2025-04-29
- DOI
- https://doi.org/10.3390/agriculture15090968
- Citations
- 1
- Primary Topic
- Animal Behavior and Welfare Studies
- Type
- article
- Field-Weighted Citation Impact
- 2.35