Yu-Jung Tsai, Yi-Che Huang, En-Chung Lin, Sheng-Chieh Lai, Xu-Chu Hong, Jonas Tsai, Cheng-En Chiang, Yan-Fu Kuo
{"title":"Monitoring the lactation-related behaviors of sows and their piglets in farrowing crates using deep learning","authors":"Yu-Jung Tsai, Yi-Che Huang, En-Chung Lin, Sheng-Chieh Lai, Xu-Chu Hong, Jonas Tsai, Cheng-En Chiang, Yan-Fu Kuo","doi":"10.3389/fanim.2024.1431285","DOIUrl":null,"url":null,"abstract":"Pig farming is a major sector of livestock production. The preweaning stage is a critical period in the pig farming process, where lactation-related behaviors between sows and their piglets directly influence the preweaning survivability of the piglets. Lactation-related behaviors are mutual interactions that require the combined monitoring of both the sow and her piglets. Conventional naked-eye observation is discontinuous and labor-intensive and may result in undetected abnormal behavior and economic losses. Thus, this study proposed to monitor the lactation-related behaviors of sows and their piglets simultaneously and continuously using computer vision. Videos were recorded from farrowing crates using embedded systems equipped with regular RGB cameras. The sow posture recognition model (SPRM), comprising a convolutional neural network (CNN) of the architecture EfficientNet and a long short-term memory network, was trained to identify seven postures of sows. The piglet localization and tracking model (PLTM), comprising a CNN of the architecture YOLOv7 and a simple online and realtime tracking algorithm, was trained to localize and track piglets in the farrowing crate. The sow posture information was then combined with the piglet activity to detect unfed piglets. The trained SPRM and PLTM reached an accuracy of 91.36% and a multiple object tracking accuracy of 94.6%. The performance of the proposed unfed piglet detection achieved a precision of 98.4% and a recall of 90.7%. A long-term experiment was conducted to monitor lactation-related behaviors of sows and their piglets from the birth of the piglets to day 15. The overall mean daily percentages ± standard deviations (SDs) of sow postures were 6.8% ± 2.9% for feeding, 8.8% ± 6.6% for standing, 11.8% ± 4.5% for sitting, 20.6% ± 16.3% for recumbency, 14.1% ± 6.5% for lying, and 38.1% ± 7.5% for lactating. The overall mean daily percentages ± SDs of piglet activities were 38.1% ± 7.5% for suckling, 22.2% ± 5.4% for active, and 39.7% ± 10.5% for rest. The proposed approach provides a total solution for the automatic monitoring of sows and their piglets in the farrowing house. This automatic detection of abnormal lactation-related behaviors can help in preventing piglet preweaning mortality and therefore aid pig farming efficiency.","PeriodicalId":73064,"journal":{"name":"Frontiers in animal science","volume":null,"pages":null},"PeriodicalIF":2.1000,"publicationDate":"2024-07-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Frontiers in animal science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3389/fanim.2024.1431285","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, DAIRY & ANIMAL SCIENCE","Score":null,"Total":0}
引用次数: 0
Abstract
Pig farming is a major sector of livestock production. The preweaning stage is a critical period in the pig farming process, where lactation-related behaviors between sows and their piglets directly influence the preweaning survivability of the piglets. Lactation-related behaviors are mutual interactions that require the combined monitoring of both the sow and her piglets. Conventional naked-eye observation is discontinuous and labor-intensive and may result in undetected abnormal behavior and economic losses. Thus, this study proposed to monitor the lactation-related behaviors of sows and their piglets simultaneously and continuously using computer vision. Videos were recorded from farrowing crates using embedded systems equipped with regular RGB cameras. The sow posture recognition model (SPRM), comprising a convolutional neural network (CNN) of the architecture EfficientNet and a long short-term memory network, was trained to identify seven postures of sows. The piglet localization and tracking model (PLTM), comprising a CNN of the architecture YOLOv7 and a simple online and realtime tracking algorithm, was trained to localize and track piglets in the farrowing crate. The sow posture information was then combined with the piglet activity to detect unfed piglets. The trained SPRM and PLTM reached an accuracy of 91.36% and a multiple object tracking accuracy of 94.6%. The performance of the proposed unfed piglet detection achieved a precision of 98.4% and a recall of 90.7%. A long-term experiment was conducted to monitor lactation-related behaviors of sows and their piglets from the birth of the piglets to day 15. The overall mean daily percentages ± standard deviations (SDs) of sow postures were 6.8% ± 2.9% for feeding, 8.8% ± 6.6% for standing, 11.8% ± 4.5% for sitting, 20.6% ± 16.3% for recumbency, 14.1% ± 6.5% for lying, and 38.1% ± 7.5% for lactating. The overall mean daily percentages ± SDs of piglet activities were 38.1% ± 7.5% for suckling, 22.2% ± 5.4% for active, and 39.7% ± 10.5% for rest. The proposed approach provides a total solution for the automatic monitoring of sows and their piglets in the farrowing house. This automatic detection of abnormal lactation-related behaviors can help in preventing piglet preweaning mortality and therefore aid pig farming efficiency.