A Fine-Grained Pig Behavior Recognition Method Based on an Improved YOLOv8n Network.
Jialin Gao, Junhao Wang, Ping Jiang, Shaohui Tan
School of Mechanical and Electrical Engineering, Hunan Agricultural University, Changsha 410128, China.
Key points
From the paper's conclusion- These results indicate that the proposed model can improve fine-grained behavior recognition while reducing model complexity, supporting automated behavior monitoring in group-housed pigs.
Abstract
Accurate recognition of pig behavior is important for animal health monitoring and precision livestock farming. However, fine-grained behavior recognition in group-housed pigs is challenging because of individual occlusion, large posture variation, and subtle visual differences among similar behaviors. Here, an improved YOLOv8n-based model, EPP-YOLOv8n, was developed for fine-grained pig behavior recognition. An efficient multi-scale attention module was inserted after the spatial pyramid pooling-fast module (SPPF) to enhance behavior-related feature extraction. A behavior-factorized asymmetric head (BFA-Head) was designed with scale-adaptive mixed convolution to reduce detection-head complexity, while posture- and interaction-assisted supervision was incorporated to guide fine-grained feature learning. A partial-channel mixed convolution module (P5-selective PLC-Mix) was deployed within the Backbone P5 C2f module to reduce redundant computation, followed by task-aware structured pruning with recovery training for further model compression. On a dataset comprising 2713 images and 30,695 annotated instances after training-set augmentation, EPP-YOLOv8n achieved 98.13% precision, 94.50% recall, and 89.07% mean average precision at intersection over union (IoU) thresholds from 0.50 to 0.95 (mAP@0.5:0.95), representing increases of 2.05, 1.52, and 1.64 percentage points, respectively, over YOLOv8n. Parameter count and billion floating-point operations (GFLOPs) were reduced by 14.59% and 9.70%, respectively. These results indicate that the proposed model can improve fine-grained behavior recognition while reducing model complexity, supporting automated behavior monitoring in group-housed pigs.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- DWEC-YOLO: A Multi-Behavior Detection Model for Group-Housed Pigs.Animals : an open access journal from MDPI · 2026
- PIG-YOLO: a lightweight oriented bounding box detection method for edge-deployable pig posture detectionMeasurement Science and Technology · 2026
- Feeding behavior recognition of group-housed pigs based on pose estimation and keypoint features discriminationComputers and Electronics in Agriculture · 2025
- The group-housed pigs attacking and daily behaviors detection and tracking based on improved YOLOv5s and DeepSORTPLoS ONE · 2025
- MMBs_TransNeXt: a hierarchical adaptive feature learning model for pig behavior recognition in precision livestock farming.Frontiers in veterinary science · 2026
- A Multi-Object Tracking Method for Pigs Based on Oriented Bounding Box Detection.Animals : an open access journal from MDPI · 2026