Instance segmentation and automated pig posture recognition for smart health management
- PMID: 40519624
- PMCID: PMC12159697
- DOI: 10.5187/jast.2024.e112
Instance segmentation and automated pig posture recognition for smart health management
Abstract
Changes in posture and movement during the growing period can often indicate abnormal development or health in pigs, making it possible to monitor and detect early morphological symptoms and health risks, potentially helping to limit the spread of infections. Large-scale pig farming requires extensive visual monitoring by workers, which is time-consuming and laborious. However, a potential solution is computer vision-based monitoring of posture and movement. The objective of this study was to recognize and detect pig posture using a masked-based instance segmentation for automated pig monitoring in a closed pig farm environment. Two automatic video acquisition systems were installed from the top and side views. RGB images were extracted from the RGB video files and used for annotation work. Manual annotation of 600 images was used to prepare a training dataset, including the four postures: standing, sitting, lying, and eating from the food bin. An instance segmentation framework was employed to recognize and detect pig posture. A region proposal network was used in the Mask R-CNN-generated candidate boxes and the features from these boxes were extracted using RoIPool, followed by classification and bounding-box regression. The model effectively identified standard postures, achieving a mean average precision of 0.937 for piglets and 0.935 for adults. The proposed model showed strong potential for real-time posture monitoring and early welfare issue detection in pigs, aiding in the optimization of farm management practices. Additionally, the study explored body weight estimation using 2D image pixel areas, which showed a high correlation with actual weight, although limitations in capturing 3D volume could affect precision. Future work should integrate 3D imaging or depth sensors and expand the use of the model across diverse farm conditions to enhance real-world applicability.
Keywords: Computer vision; Pig activity; Pig identification; Pig posture; Segmentation; Smart agriculture.
© Copyright 2025 Korean Society of Animal Science and Technology.
Conflict of interest statement
No potential conflict of interest relevant to this article was reported.
Figures
















Similar articles
-
Analysis of pig posture detection in group-housed pigs using deep learning-based mask scoring instance segmentation.Anim Sci J. 2024 Jan-Dec;95(1):e13975. doi: 10.1111/asj.13975. Anim Sci J. 2024. PMID: 39005155
-
Pig-Posture Recognition Based on Computer Vision: Dataset and Exploration.Animals (Basel). 2021 Apr 30;11(5):1295. doi: 10.3390/ani11051295. Animals (Basel). 2021. PMID: 33946472 Free PMC article.
-
Determining the posture and location of pigs using an object detection model under different lighting conditions.Transl Anim Sci. 2024 Dec 3;8:txae167. doi: 10.1093/tas/txae167. eCollection 2024. Transl Anim Sci. 2024. PMID: 39669266 Free PMC article.
-
RGB-based machine vision for enhanced pig disease symptoms monitoring and health management: a review.J Anim Sci Technol. 2025 Jan;67(1):17-42. doi: 10.5187/jast.2024.e111. Epub 2025 Jan 31. J Anim Sci Technol. 2025. PMID: 39974778 Free PMC article. Review.
-
A review of sound-based pig monitoring for enhanced precision production.J Anim Sci Technol. 2025 Mar;67(2):277-302. doi: 10.5187/jast.2024.e113. Epub 2025 Mar 31. J Anim Sci Technol. 2025. PMID: 40264534 Free PMC article. Review.
References
-
- Neethirajan S. AI in sustainable pig farming: IoT insights into stress and gait. Agriculture. 2023;13:1706. doi: 10.3390/agriculture13091706. - DOI
-
- Ji H, Yu J, Lao F, Zhuang Y, Wen Y, Teng G. Automatic position detection and posture recognition of grouped pigs based on deep learning. Agriculture. 2022;12:1314. doi: 10.3390/agriculture12091314. - DOI
LinkOut - more resources
Full Text Sources