IDEAS home Printed from https://ideas.repec.org/a/gam/jagris/v15y2025i9p968-d1645673.html
   My bibliography  Save this article

MACA-Net: Mamba-Driven Adaptive Cross-Layer Attention Network for Multi-Behavior Recognition in Group-Housed Pigs

Author

Listed:
  • Zhixiong Zeng

    (Key Laboratory of Agricultural Equipment Technology, College of Engineering, South China Agricultural University, Guangzhou 510642, China
    These authors contributed equally to this work and should be considered co-first authors.)

  • Zaoming Wu

    (School of Electronic Engineering, South China Agricultural University, Guangzhou 510642, China
    These authors contributed equally to this work and should be considered co-first authors.)

  • Runtao Xie

    (College of Mathematics and Informatics, South China Agricultural University, Guangzhou 510642, China)

  • Kai Lin

    (College of Mathematics and Informatics, South China Agricultural University, Guangzhou 510642, China)

  • Shenwen Tan

    (Key Laboratory of Agricultural Equipment Technology, College of Engineering, South China Agricultural University, Guangzhou 510642, China)

  • Xinyuan He

    (Key Laboratory of Agricultural Equipment Technology, College of Engineering, South China Agricultural University, Guangzhou 510642, China)

  • Yizhi Luo

    (Key Laboratory of Agricultural Equipment Technology, College of Engineering, South China Agricultural University, Guangzhou 510642, China
    Institute of Facility Agriculture, Guangdong Academy of Agricultural Sciences, Guangzhou 510640, China
    State Key Laboratory of Swine and Poultry Breding Industry, Guangzhou 510640, China)

Abstract

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.

Suggested Citation

  • Zhixiong Zeng & Zaoming Wu & Runtao Xie & Kai Lin & Shenwen Tan & Xinyuan He & Yizhi Luo, 2025. "MACA-Net: Mamba-Driven Adaptive Cross-Layer Attention Network for Multi-Behavior Recognition in Group-Housed Pigs," Agriculture, MDPI, vol. 15(9), pages 1-27, April.
  • Handle: RePEc:gam:jagris:v:15:y:2025:i:9:p:968-:d:1645673
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2077-0472/15/9/968/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2077-0472/15/9/968/
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jagris:v:15:y:2025:i:9:p:968-:d:1645673. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.