Chengqi Liu, Haijian Ye, Shuhan Lu, Zhan Tang, Zhao Bai, Lei Diao, Longhe Wang, Lin Li
{"title":"Skeleton extraction and pose estimation of piglets using ZS-DLC-PAF","authors":"Chengqi Liu, Haijian Ye, Shuhan Lu, Zhan Tang, Zhao Bai, Lei Diao, Longhe Wang, Lin Li","doi":"10.25165/j.ijabe.20231603.6930","DOIUrl":null,"url":null,"abstract":"The accurate identification of various postures in the daily life of piglets that are directly reflected by their skeleton morphology is necessary to study the behavioral characteristics of pigs. Accordingly, this study proposed a novel approach for the skeleton extraction and pose estimation of piglets. First, an improved Zhang-Suen (ZS) thinning algorithm based on morphology was used to establish the chain code mechanism of the burr and the redundant information deletion templates to achieve a single-pixel width extraction of pig skeletons. Then, body nodes were extracted on the basis of the improved DeepLabCut (DLC) algorithm, and a part affinity field (PAF) was added to realize the connection of body nodes, and consequently, construct a database of pig behavior and postures. Finally, a support vector machine was used for pose matching to recognize the main behavior of piglets. In this study, 14 000 images of piglets with different types of behavior were used in posture recognition experiments. Results showed that the improved algorithm based on ZS-DLC-PAF achieved the best thinning rate compared with those of distance transformation, medial axis transformation, morphology refinement, and the traditional ZS algorithm. The node tracking accuracy reached 85.08%, and the pressure test could accurately detect up to 35 nodes of 5 pigs. The average accuracy of posture matching was 89.60%. This study not only realized the single-pixel extraction of piglets’ skeletons but also the connection among the different behavior body nodes of individual sows and multiple piglets. Furthermore, this study established a database of pig posture behavior, which provides a reference for studying animal behavior identification and classification and anomaly detection. Keywords: piglets, skeleton extraction, pose estimation, Zhang-Suen, DeepLabCut, Part affinity field DOI: 10.25165/j.ijabe.20231603.6930 Citation: Liu C Q, Ye H J, Lu S H, Tang Z, Bai Z, Diao L, et al. Skeleton extraction and pose estimation of piglets using ZS-DLC-PAF. Int J Agric & Biol Eng, 2023; 16(3): 180–193.","PeriodicalId":13895,"journal":{"name":"International Journal of Agricultural and Biological Engineering","volume":null,"pages":null},"PeriodicalIF":2.2000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Journal of Agricultural and Biological Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.25165/j.ijabe.20231603.6930","RegionNum":2,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"AGRICULTURAL ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
The accurate identification of various postures in the daily life of piglets that are directly reflected by their skeleton morphology is necessary to study the behavioral characteristics of pigs. Accordingly, this study proposed a novel approach for the skeleton extraction and pose estimation of piglets. First, an improved Zhang-Suen (ZS) thinning algorithm based on morphology was used to establish the chain code mechanism of the burr and the redundant information deletion templates to achieve a single-pixel width extraction of pig skeletons. Then, body nodes were extracted on the basis of the improved DeepLabCut (DLC) algorithm, and a part affinity field (PAF) was added to realize the connection of body nodes, and consequently, construct a database of pig behavior and postures. Finally, a support vector machine was used for pose matching to recognize the main behavior of piglets. In this study, 14 000 images of piglets with different types of behavior were used in posture recognition experiments. Results showed that the improved algorithm based on ZS-DLC-PAF achieved the best thinning rate compared with those of distance transformation, medial axis transformation, morphology refinement, and the traditional ZS algorithm. The node tracking accuracy reached 85.08%, and the pressure test could accurately detect up to 35 nodes of 5 pigs. The average accuracy of posture matching was 89.60%. This study not only realized the single-pixel extraction of piglets’ skeletons but also the connection among the different behavior body nodes of individual sows and multiple piglets. Furthermore, this study established a database of pig posture behavior, which provides a reference for studying animal behavior identification and classification and anomaly detection. Keywords: piglets, skeleton extraction, pose estimation, Zhang-Suen, DeepLabCut, Part affinity field DOI: 10.25165/j.ijabe.20231603.6930 Citation: Liu C Q, Ye H J, Lu S H, Tang Z, Bai Z, Diao L, et al. Skeleton extraction and pose estimation of piglets using ZS-DLC-PAF. Int J Agric & Biol Eng, 2023; 16(3): 180–193.
期刊介绍:
International Journal of Agricultural and Biological Engineering (IJABE, https://www.ijabe.org) is a peer reviewed open access international journal. IJABE, started in 2008, is a joint publication co-sponsored by US-based Association of Agricultural, Biological and Food Engineers (AOCABFE) and China-based Chinese Society of Agricultural Engineering (CSAE). The ISSN 1934-6344 and eISSN 1934-6352 numbers for both print and online IJABE have been registered in US. Now, Int. J. Agric. & Biol. Eng (IJABE) is published in both online and print version by Chinese Academy of Agricultural Engineering.