The pig pose recognition method based on pig body semantic segmentation

Pose recognition in pigs faces several challenges in practical applications, primarily due to high annotation costs, the labor-intensive nature of annotation processes, and the difficulty of achieving accurate target detection in complex environments. To address these challenges, this paper proposes a novel pig pose recognition method based on the semantic segmentation of pig body parts. First, we introduce PR-SegFormer, a pig body semantic segmentation model designed for individual pigs in indoor environments. Building on the SegFormer network, we incorporate a Polarized Self-Attention (PSA) module to enhance pixel-level attention and improve the extraction of fine-grained features. Additionally, the model integrates an improved Reduced SE Atrous Spatial Pyramid Pooling (RSASPP) module, which aggregates multi-scale contextual information, further boosting segmentation performance. Training on a self-constructed dataset, PR-SegFormer achieves a mean intersection over union (mIoU) of 81.93 % and a mean F1 score (mF1) of 88.82 %, outperforming the original SegFormer model by 3.75 and 2.59 percentage points, respectively. For pose recognition, we propose an enhanced YOLOv8-cls-MCM model. By replacing the baseline YOLOv8-cls with the more parameter-efficient MobileNetV3 backbone and incorporating a Coordinate Attention (CA) mechanism, the model enhances its ability to extract key local features while reducing the parameter count. Furthermore, the Mish activation function is introduced to improve training stability and accelerate convergence. Experimental results show that the proposed method achieves 93.16 % accuracy in pose recognition, even in complex backgrounds and close pig proximity, with an average precision of 93.7 % and recall of 92.95 %. Notably, the number of parameters is reduced by 40 % compared to the original YOLOv8-cls model. In conclusion, the proposed method, based on semantic segmentation of pig bodies and the improved YOLOv8-cls-MCM model, significantly advances the precision and efficiency of pig pose recognition. The experimental findings highlight that this method offers a promising solution for enhancing livestock management and animal health monitoring in intelligent farming applications.

Authors

Institutions

Publication Details

Journal
Smart Agricultural Technology
Published
2025-08-10
DOI
https://doi.org/10.1016/j.atech.2025.101309
Primary Topic
Industrial Vision Systems and Defect Detection
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The pig pose recognition method based on pig body semantic segmentation

Yi Li, Liang He, Nien-Tsu Huang, Deli Zhu
Smart Agricultural Technology
Industrial Vision Systems and Defect Detection
article

The pig pose recognition method based on pig body semantic segmentation

Yi Li, Liang He, Nien-Tsu Huang, Deli Zhu
article en

Abstract

Pose recognition in pigs faces several challenges in practical applications, primarily due to high annotation costs, the labor-intensive nature of annotation processes, and the difficulty of achieving accurate target detection in complex environments. To address these challenges, this paper proposes a novel pig pose recognition method based on the semantic segmentation of pig body parts. First, we introduce PR-SegFormer, a pig body semantic segmentation model designed for individual pigs in indoor environments. Building on the SegFormer network, we incorporate a Polarized Self-Attention (PSA) module to enhance pixel-level attention and improve the extraction of fine-grained features. Additionally, the model integrates an improved Reduced SE Atrous Spatial Pyramid Pooling (RSASPP) module, which aggregates multi-scale contextual information, further boosting segmentation performance. Training on a self-constructed dataset, PR-SegFormer achieves a mean intersection over union (mIoU) of 81.93 % and a mean F1 score (mF1) of 88.82 %, outperforming the original SegFormer model by 3.75 and 2.59 percentage points, respectively. For pose recognition, we propose an enhanced YOLOv8-cls-MCM model. By replacing the baseline YOLOv8-cls with the more parameter-efficient MobileNetV3 backbone and incorporating a Coordinate Attention (CA) mechanism, the model enhances its ability to extract key local features while reducing the parameter count. Furthermore, the Mish activation function is introduced to improve training stability and accelerate convergence. Experimental results show that the proposed method achieves 93.16 % accuracy in pose recognition, even in complex backgrounds and close pig proximity, with an average precision of 93.7 % and recall of 92.95 %. Notably, the number of parameters is reduced by 40 % compared to the original YOLOv8-cls model. In conclusion, the proposed method, based on semantic segmentation of pig bodies and the improved YOLOv8-cls-MCM model, significantly advances the precision and efficiency of pig pose recognition. The experimental findings highlight that this method offers a promising solution for enhancing livestock management and animal health monitoring in intelligent farming applications.

Smart Agricultural TechnologyVol. 12
Chongqing Normal University (CN), Chongqing Academy of Animal Science (CN), Chongqing Academy of Agricultural Sciences (CN)
Chongqing Normal University, Key Project of Application Development Plan of Chongqing City
Openalex Percentile: Top 71%
Industrial Vision Systems and Defect Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.