Journal of Animal Science and Technology
Korean Society of Animal Science and Technology
Article

Instance Segmentation and Automated Pig Posture Recognition for Smart Health Management

Md Nasim Reza1,2, Md Sazzadul Kabir2, Md Asrakul Haque1, Hongbin Jin2, Hyunjin Kyoung3, Young Kyoung Choi4, Gookhwan Kim5, Sun-Ok Chung1,2,*
1Department of Agricultural Machinery Engineering, Graduate School, Chungnam National University, Daejeon 34134, Korea.
2Department of Smart Agricultural Systems, Graduate School, Chungnam National University, Daejeon 34134, Korea.
3Division of Animal and Dairy Science, Chungnam National University, Daejeon 34134, Korea.
4DAWOON Co., Ltd., Incheon 22847, Korea.
5National Institute of Agricultural Sciences, Rural Development Administration, Jeonju 54875, Korea.
*Corresponding Author: Sun-Ok Chung, Department of Agricultural Machinery Engineering, Graduate School, Chungnam National University, Daejeon 34134, Korea, Republic of. Department of Smart Agricultural Systems, Graduate School, Chungnam National University, Daejeon 34134, Korea, Republic of. E-mail: sochung@cnu.ac.kr.

© Copyright 2024 Korean Society of Animal Science and Technology. This is an Open-Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/4.0/) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Received: Oct 17, 2024; Revised: Nov 15, 2024; Accepted: Nov 18, 2024

Published Online: Nov 19, 2024

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: Smart agriculture; Pig identification; Pig posture; Computer vision; Pig activity; Segmentation