Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Apr 30;11(5):1295.
doi: 10.3390/ani11051295.

Pig-Posture Recognition Based on Computer Vision: Dataset and Exploration

Affiliations

Pig-Posture Recognition Based on Computer Vision: Dataset and Exploration

Hongmin Shao et al. Animals (Basel). .

Abstract

Posture changes in pigs during growth are often precursors of disease. Monitoring pigs' behavioral activities can allow us to detect pathological changes in pigs earlier and identify the factors threatening the health of pigs in advance. Pigs tend to be farmed on a large scale, and manual observation by keepers is time consuming and laborious. Therefore, the use of computers to monitor the growth processes of pigs in real time, and to recognize the duration and frequency of pigs' postural changes over time, can prevent outbreaks of porcine diseases. The contributions of this article are as follows: (1) The first human-annotated pig-posture-identification dataset in the world was established, including 800 pictures of each of the four pig postures: standing, lying on the stomach, lying on the side, and exploring. (2) When using a deep separable convolutional network to classify pig postures, the accuracy was 92.45%. The results show that the method proposed in this paper achieves adequate pig-posture recognition in a piggery environment and may be suitable for livestock farm applications.

Keywords: agricultural automation; automated breeding; computer vision; pig posture; posture recognition.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure 1
Figure 1
The overall framework of the envisaged method. First, we extracted a single target from the original dataset of multiple targets; then, we preprocessed the image of the single target, extracted the action features and, finally, carried out semantic segmentation and classification.
Figure 2
Figure 2
Overview of the residual network.
Figure 3
Figure 3
A single pig photo collection extracted by YOLOV5.
Figure 4
Figure 4
The image after noise reduction.
Figure 5
Figure 5
DeepLabv3+’s network structure diagram, which includes three parts: entry flow, middle flow, and exit flow.
Figure 6
Figure 6
Image after semantic segmentation.
Figure 7
Figure 7
The change in loss for DeepLab v3+ according to the training process.
Figure 8
Figure 8
The algorithm training progress: (a) semantic-segmentation accuracy of the test set; (b) test-set-classification accuracy; (c) frequency weighted intersection over union (FWIoU) of the test set; (d) mean intersection over union (MIoU) of the test set.

References

    1. Statistical Communiqué of the People’s Republic of China on the 2019 National Economic and Social Development. [(accessed on 4 January 2021)]; Available online: http://www.stats.gov.cn/tjsj/zxfb/202002/t20200228_1728913.html.
    1. 2019 China Pig Industry Research and Commercial Investment Decision Analysis Report. [(accessed on 4 January 2021)]; Available online: https://report.iimedia.cn/repo1-0/38822.html.
    1. Yang H., Zhou L. Swine disease epidemic in 2018 and 2019 epidemic trend and prevention and control countermeasures. Swine Sci. 2019;36:38–40. doi: 10.3969/j.issn.1673-5358.2019.02.012. - DOI
    1. Wu S., Bao Y., Chen G., Chen Q. Non-contact recognition system for pig behavior activity based on machine vision technology. Comput. Syst. Appl. 2020;29:113–117. doi: 10.15888/j.cnki.csa.007356. - DOI
    1. Ren G., Jin C. Pig individual characteristics and identification methods. Mod. Agric. Sci. Technol. 2019;18:171–173.

LinkOut - more resources