Source: UNIVERSITY OF NEBRASKA submitted to
FACT-AI: CYBERINFORMATIC TOOLS FOR EXPLORING AND VALIDATING SOW POSTURE AND PIGLET ACTIVITY
Sponsoring Institution
National Institute of Food and Agriculture
Project Status
ACTIVE
Funding Source
Reporting Frequency
Annual
Accession No.
1025866
Grant No.
2021-67015-34413
Cumulative Award Amt.
$500,000.00
Proposal No.
2020-08941
Multistate No.
(N/A)
Project Start Date
Mar 15, 2021
Project End Date
Mar 14, 2026
Grant Year
2021
Program Code
[A1541]- Food and Agriculture Cyberinformatics and Tools
Recipient Organization
UNIVERSITY OF NEBRASKA
(N/A)
LINCOLN,NE 68583
Performing Department
Biological Systems Engineering
Non Technical Summary
Pre-weaning mortality has detrimental effects on both piglet well-being and economic returns to U.S. pork producers. Sow crushing accounts for roughly 50% of the total pre-weaning mortality. Despite the widely appreciated magnitude of this problem, little progress has been made in the past few decades in understanding maternal behavior such as postural change sequences between sows with high and low piglet crushing rates. The variation in these behavioral sequences can be the critical phenotypes related to a sow's mothering ability, one of the critical factors determining piglet pre-weaning mortality.The overall goal of this project is to develop and deploy a cyberinfrastructure framework to support the automatic identification and analysis of sow posture and piglet activity and space utilization. We propose to 1) establish a cloud-based server to support the curation of sow's and piglet's image and production data; 2) develop deep learning models for automatic behavioral phenotypes identification from the sequential imagery, and 3) create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with the identified behavioral phenotypes and production records.This framework will provide a way to more efficiently and effectively study animal behaviors and aid the engineering design and genetics breeding. Upon completing this work, a set of data science applications will be available to the scientific community and can be adapted for general animal posture, activity, and space utilization studies. Additionally, a labeled dataset of sow and piglet behaviors will be made available for further model development. These will be valuable beyond the lifetime of this project.
Animal Health Component
30%
Research Effort Categories
Basic
50%
Applied
30%
Developmental
20%
Classification

Knowledge Area (KA)Subject of Investigation (SOI)Field of Science (FOS)Percent
31535102020100%
Knowledge Area
315 - Animal Welfare/Well-Being and Protection;

Subject Of Investigation
3510 - Swine, live animal;

Field Of Science
2020 - Engineering;
Goals / Objectives
The overall goal of this project is to develop and deploy a cyberinfrastructure framework to support the automatic identification and analysis of sow posture changes and piglet activity and space utilization to understand and ultimately reduce preweaning mortality caused by sows crushing their piglets. These tools will capture time-varying postural, activity, and space utilization changes of sows and piglets which will ultimately facilitate: 1) Identification of behavioral phenotypes related to sow's mothering ability for future genetic analysis, 2) Assessment of engineering designs of farrowing crates or management practices, 3) Determination/quantification of the impact of animal (sows and piglets) health on these changes.Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities.Objective 2: Develop and evaluate machine learning-based models for automatically identifying and quantifying time-series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality.Objective 3: Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes.
Project Methods
Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study including the sequential imagery and manual records in different modalities.Task 1.1: Leverage and interface with the existing sequential image data acquisition system to realize the multimodal sow and piglet behavioral data gathering and accumulation;Task 1.2: Identify the data sources to include and relation schema of the database to more efficiently and effectively managing and querying sow and piglet data;Task 1.3: Develop a web-based user interface tool to facilitate data visualization, exploration, analysis, and sharing.Objective 2: Develop and evaluate artificial intelligence-based techniques for identifying and quantifying time-series behavioral phenotypes from sequential image data that can potentially elucidate sows' posture changes and for tracking piglets' activity and space utilization.Task 2.1: Develop supervised machine learning models to automatically identify the sows' behaviors from the sequential images and compare the performance of different machine learning models and image sources (depth and digital);Task 2.2: Develop supervised machine learning models to automatically identify the piglet's activity level from the sequential images and compare the performance of different machine learning models and image sources (depth and digital).Objective 3: Create a MAI that classifies a sow's ability to successfully raise a litter.Task 3.1: Create an unsupervised machine learning model capable of classifying a sow into different mothering ability levels (clusters).Task 3.2: Create a model to describe piglet mortality rate for individual sows, aiming to evaluate the impact of mothering ability on mortality rate.Task 3.3: Package developed algorithms into an executable software to flag sows with a low Mothering Ability Index (MAI).Task 3.4: Test software on existing image acquisition system.

Progress 03/15/24 to 03/14/25

Outputs
Target Audience:The targeted audience of this project includes but is not limited to: • Researchers in precision livestock management, livestock breeding, and information and data scientists and engineers. • Students and educators in relevant areas such as animal science, agricultural engineering, and data science. Educational materials can be developed using the data and the process and results of the cyberinfrastructure and algorithms/models though this is a single-function (research) project. They can be mainly used in formal classroom instructions including lectures and hands-on lab exercises. The outcome or the mothering ability evaluation tool developed in this project can also possibly be used in extension programs. • Producers and the workforce in the livestock production industry may not immediately but can eventually benefit from the outcome of this research project which is a tool to evaluate the mothering ability and to help breed better genotypes. Changes/Problems:We requested another no-cost-extension to finish project objectives and publish the finding and outcomes. What opportunities for training and professional development has the project provided?Graduate and undergraduate students from different majors (agricultural engineering, animal science, and computer science) have been involved in this project, and they have been trained by the PIs with technologies and techniques related to precision livestock management, computer vision, machine/deep learning, statistical analysis, and programming. How have the results been disseminated to communities of interest?The primary channel for disseminating the study findings has been through various academic conferences and publications. What do you plan to do during the next reporting period to accomplish the goals? We need another project cycle to finish up primarily the Objective 3 which is to create a mothering ability index to classify a sow's ability to successfully raise a litter. In the first No-Cost-Extension we were granted to, we have completed the parts left in the Objectives 1 and 2. We published the shared data and tool repository https://github.com/FACT-MAI-Project/Cyberinformatic-Tools-for-Exploring-and-Validating-Sow-Posture-and-Piglet-Activity (Objective 1). We also finished labeling a significant amount of data that can be used to further improve the already developed and new sow and piglet behavior classification models (Objective 2). For details, please see the section below Summary of Progress To Date. Data annotation required for the computer vision model development for sow and piglet behavior classifications takes much more effort than we expected. The unbalanced dataset also requires extensive time-consuming data augmentation to ensure model robustness and completeness, such as for the sows' kneeling behavior which corresponds to a low frequency in the raw dataset. We are also in the process of implementing new deep learning model, Ultralytics YOLO11, which was just released in 2024, to improve the classification accuracy, inference speed, and implementation scalability, but requires additional time for re-training, re-validation, and deployment. Objective 3 success relies on the development of robust, accurate models from Objective 2, so making sure those models are predicting both sow and piglet behaviors accurately was our priority. Time needed for labeling and model training iterations ultimately delayed our progress for Objective 3. In addition to the manuscripts we've already published, we require more time to finish multiple additional publications: "Automated Segmentation of Sow and Piglets within Farrowing Crates Using Modified YOLO11 Model" (for ASABE 2025). "Deep Learning Approach for Monitoring Nursing Behaviors of Sows Within Farrowing Crates" (accepted for USPLF 2025). "Accelerating Sow Nursing Behaviors and Activities Monitoring with Modified YOLO11n Architecture and TensorRT Integration" (to be submitted as a journal manuscript in early 2025). "Automated Detection of Sow Behaviors in the Critical 12 Hours Pre- and Post-Farrowing" (to be submitted as a journal manuscript in mid-2025).

Impacts
What was accomplished under these goals? Progress to Date toward Objective 1 - Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities. Successfully labeled extensive image datasets using tools like Label Studio and CVAT, significantly enhancing efficiency in annotating sequential behavioral data for sows and piglets. Developed a cloud-based repository, publicly accessible at FACT-MAI GitHub Repository, to curate and share behavioral datasets of sows and piglets, sequential imagery, and production records. What is this repository about? - This repository was established as part of the goal of the USDA-NIFA-funded project, which aims to develop and deploy cyberinfrastructure tools for the automatic identification and analysis of sow posture and piglet activity. The project focuses on reducing pre-weaning mortality caused by sows crushing their piglets and understanding the maternal behaviors associated with piglet survival. Key Contributions: Users can find annotated datasets, statistical models and machine learning algorithms to drive collaborative research in classifying sow and piglet's behaviors and predict piglets' pre-weaning mortality for Precision Livestock Farming (PLF). Datasets and video demonstrations are continuously being added to the repository. Progress to Date toward Objective 2 - Develop and evaluate machine learning-based models for automatically identifying and quantifying time-series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality. Published a study on the factors that affect preweaning mortality (PWM) in piglets, analyzing production data from 1,982 litters collected at the U.S. Meat Animal Research Center. Investigated factors contributing to PWM and overlays, such as litter size, mean birth weight, health diagnosis, gestation length, and parity order, using statistical models and machine learning approaches. Machine learning-based models were developed and evaluated to automatically classify sow postures from time-series depth images captured in farrowing crates. A computer vision system using Kinect v2 sensors collected continuous top-down depth images, which were labeled into six posture categories. Convolutional Neural Network (CNN) models, including ResNet-50 and Inception v3, were trained on this dataset, with Inception v3 achieving 95% accuracy in posture classification. These models were validated on different test datasets. They demonstrated robust performance in detecting postures. This study was presented in ASABE AIM 2024. Deep learning classifier was developed using transfer learning models (YOLO11m-cls, ResNet-50, Inception v3) and transformed depth images to classify six sow postures using a more robust dataset. The YOLO11m-cls model showed the best performance (F1 score = 0.98) on Jet colormap images, with robust results across different crate types and heat lamp configurations. This work has been finished and it is in the process for publication. Paper ready to publish: Deep Learning for Sow Posture Classification: Advancing Maternal Behavior Analysis with Transfer Learning and Depth Images Published a peer reviewed journal paper analyzing factors affecting pre-weaning mortality using machine learning and production data (Translational Animal Science, 2023). Developed YOLOv11n-based deep learning models to classify sow postures and nursing behaviors with faster detection rates and higher mean Average Precision (mAP) scores. Publications: Rahman, M. T., Brown-Brandl, T. M., Rohrer, G. A., Sharma, S. R., Manthena, V., & Shi, Y. (2023). Statistical and machine learning approaches describe factors affecting preweaning mortality of piglets. Translational Animal Science, 7(1), txad117. https://doi.org/10.1093/tas/txad117 Ferziger, S. S., Condotta, I. C. F. S., Brown-Brandl, T. M., Shi, Y., & Rohrer, G. A. (2023). Deep-learning-based behavioral time budgets for sows with high and low piglet mortality rates. 2023 ASABE Annual International Meeting, ASABE Paper No. 2300833. https://doi.org/10.13031/aim.202300833 Rahman, M.T., Brown-Brandl T. M., Rohrer G.A., Shi Y., Sharma S.R. (2024). Classification of Sow Postures Using Convolutional Neural Network and Depth images, Session: 246 Precision (SMART) Animal Management, ASABE Annual International Meeting 2024, Anaheim, California DOI: https://doi.org/10.13031/aim.202401533 Paper titled "Automated Segmentation of Sow and Piglets within Farrowing Crates Using Modified YOLO11 Model" is ready for publication at ASABE25 Annual International Meeting in Toronto, Canada (July 2025). Close to submission: "Deep Learning for Sow Posture Classification: Advancing Maternal Behavior Analysis with Transfer Learning and Depth Images" Paper titled "Deep Learning Approach for Monitoring Nursing Behaviors of Sows Within Farrowing Crates" accepted for the 3rd U.S. Precision Livestock Farming (USPLF) Conference, 2025, with the extended abstract to be published in Animal Scientific Proceedings. In process of development: Results of YOLO11n model optimization using TensorRT integration will be submitted as "Accelerating Sow Nursing Behaviors and Activities Monitoring with Modified YOLO11n Architecture and TensorRT Integration." Close to submission: "Automated Detection of Sow Behaviors in the Critical 12 Hours Pre- and Post-Farrowing." Progress to Date toward Objective 3 - Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes. In the last request we put in, we mentioned that in the first two years of the project, we had developed an initial model using statistical and machine learning approaches to describe sow and litter factors affecting the preweaning mortality of piglets. A journal paper was published on this (Rahman et al., 2023 - https://doi.org/10.1093/tas/txad117). The difference between this initial model and the final model we anticipate developing mainly lies in the lack of time budget data for different postures and activities of the sow and piglets. This data needs to be derived from Objective 2. In the past year, we noticed that our initial deep learning model developed in Objective 2 could not give us satisfied results for the posture classifications. This would affect the result of time budgets and the following analysis in this Objective 3. Hence, we updated the deep learning model to YOLO11 for the time-series posture data from sow videos and images. This model demonstrates significant improvements in speed and accuracy compared to previous YOLOvv8 versions, achieving higher F1-scores and reducing classification errors during predictions. These advancements have enhanced the quality and reliability of behavioral data, which is critical for understanding how specific sow behaviors influence piglet survival. This data forms the foundation for developing the sow's mothering ability index (MAI). If we are approved for another extension, advanced development of statistical models identifying behavioral phenotypes as predictors of maternal/mothering ability will be developed with data derived from Objective 2. Then an index will be devised to represent the mothering ability of the sow to successfully raise piglets, the MAI. This lays the groundwork for future integration with genetic indices Accepted Conference Abstract: How sow posture patterns affect preweaning mortality: Key behavioral insights. 2025. 3rd U.S. Precision Livestock Farming (USPLF) Conference, 2025, with the extended abstract to be published in Animal Scientific Proceedings.

Publications

  • Type: Conference Papers and Presentations Status: Accepted Year Published: 2024 Citation: Rahman, M.T., Brown-Brandl T. M., Rohrer G.A., Shi Y., Sharma S.R. (2024). Classification of Sow Postures Using Convolutional Neural Network and Depth images, Session: 246 Precision (SMART) Animal Management, ASABE Annual International Meeting 2024, Anaheim, California DOI: https://doi.org/10.13031/aim.202401533


Progress 03/15/23 to 03/14/24

Outputs
Target Audience:The targeted audience of this project includes but is not limited to: • Researchers in precision livestock management, livestock breeding, and information and data scientists and engineers. • Students and educators in relevant areas such as animal science, agricultural engineering, and data science. Educational materials can be developed using the data and the process and results of the cyberinfrastructure and algorithms/models though this is a single-function (research) project. They can be mainly used in formal classroom instructions including lectures and hands-on lab exercises. The outcome or the mothering ability evaluation tool developed in this project can also possibly be used in extension programs. • Producers and the workforce in the livestock production industry may not immediately but can eventually benefit from the outcome of this research project which is a tool to evaluate the mothering ability and to help breed better genotypes. Changes/Problems:We are starting the 1-year no cost extension of the project. What opportunities for training and professional development has the project provided?Graduate and undergraduate students from different majors (agricultural engineering, animal science, and computer science) have been involved in this project, and they have been trained by the PIs with technologies and techniques related to precision livestock management, computer vision, machine/deep learning, statistical analysis, and programming. How have the results been disseminated to communities of interest?The primary channel for disseminating the study findings has been through academic conferences and publications. The undergraduate student, Ms. Ferziger and two graduate students Mr. M.T. Rahman and Mr. M. Rahman attended various university and international levelprofessional conferences and deliveredoral and poster presentations, including2023 ASABE AIM,2023 Communication Conference of High Education Challenge Communicating Agriculture Beyond Academia, etc. What do you plan to do during the next reporting period to accomplish the goals?We have started the one-year no cost extension of this project this April. During this year, we plan to: Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities. We decided that a more useful and sustainable way to help the community is to share the project data and developed models online. We will publish sow posture classification sequential imageswith labels and models from Objective 2 as well as thesow's mothering ability index model together with production record data from Objective 3 on GitHub, so that other researchers can use and adapt them for their own usage. Objective 2: Develop and evaluate machine learning-based models for automatically identifying and quantifying time- series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality. We plan to wrap up and complete the additional two papers writing and submissions for the behavior classification machine learning models that we have been working on under this objective. We will also complete analyzing the entire dataset and prepare the data of the time-budget for the different behaviors of interestsfor objective 3. Objective 3: Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes. Built upon the outcome of objective 2, we willinclude the behavior phenotypes of each sow in the already developed and published modelto determine which behaviors are indicative of high piglet mortality. Then we will combine this information with other necessary sow and litter factors used in the first model to develop one complete model for the mothering ability. The new models will be explained in additional journal papers and also shared withthe community.

Impacts
What was accomplished under these goals? Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities. Both universities have been focusing on labelling the image data with sow and piglet behaviors and developing deep learning models for the behavior classifications. We have already prepared the set of images with different sow's postures taken by the overhead cameras. The time-consuming image labeling has been completed as well. We are working on organizing and depositing all the data to GitHub for sharing with the community estimated to be finished in mid of 2024. Once the model of objective 3 for sow's mothering ability is completed, it will also be published together with the imagery data, estimated by the end of the one-year extension (February 2025). Objective 2: Develop and evaluate machine learning-based models for automatically identifying and quantifying time- series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality. We have successfully developed machine learning models for automatic sow and piglet's behavior/posture classification. Using the depth images, Drs. Brown-Brandl and Shi and their graduate student at the University of Nebraska-Lincoln kept working on and finished the deep learning model for the posture classification of lactating sows. VGG16 architecture was utilized as the backbone and an average accuracy of 0.94 was achieved with the current model. A presentation was made at the ASABE AIM and the manuscript is close to submission. With the join an start of the PhD student, Dr. Condotta's group at the University of Illinois finished the developments of initial versions of three deep learning based computer vision models based on RGB digital images: (1) a deep learning model for automatic detection of sow posture in farrowing crates; (2) a deep learning model for automatic detection of nursing events in swine facility; and (3) a deep learning model to detect and track sows and piglets within farrowing crates. The current model for sow posture detection and classification in farrowing crates was developed with the latest YOLO v8 (You Only Look Once) algorithm due to its exemplary performance in real-time object detection tasks. The algorithm's high accuracy, speed, and ability to simultaneously detect multiple objects within an image were key factors in its selection. Label Studio was used for manually labelling images. A total of 1000 images were used and 80%, 10% and 10% images were allocated for the Training, Validation and Testing. It was on detecting three postures: Standing, lying on right side and lying on left side. An average precision of 0.986 when using an Intersection over Union (IoU) threshold of 0.5 for evaluating the predicted bounding boxes. The trained model was also applied on a unseen test video and achieved 83% accuracy. Similarly, the current model for nursing events detection was also based on YOLO v8 and achieved 100% accuracy on the test dataset. The current model developed for detecting and tracking sows and piglets achieved around 80% accuracy on sows and from 82 to 94% on piglets when tested on an unseen test video. A few conference presentations and posters were delivered. An ASABE conference paper was published. A journal manuscript "Deep Learning Approach for Reducing Pre-Weaning Mortality in Piglets: A Review" is set for submission. Two papers are in progress: one on the automatic detection of nursing events and another on the detection of behavioral changes of sows that may lead to piglet crushing. Objective 3: Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes. This objective is built upon the time budget of each posture in objective 2 and is to create a "sow's mothering ability index" to classify a sow's ability to successfully raise a litter. Since we just developed the models for analyzing the image data, we have not completely processed the entire dataset to obtain the time budget information. However, we did correlate time-budgets of each posture derived with the historical data of pre-weaning mortality rates from the limited image data we've analyzed. Preliminary results from Dr. Condotta's group showed that there were no statistical differences between high mortality and low mortality animals for time spent at each posture, but slightly more time spent kneeling and lying and less time spent sitting and standing was observed for low mortality animals. More results need to be obtained after the complete processing of objective 2 and the analysis of time budget analysis. The UNL group has had an initial model developed on statistical and machine learning approaches to describe sow and litter factors affecting the preweaning mortality of piglets. A journal paper was published on this (Rahman et al., 2023 - https://doi.org/10.1093/tas/txad117). Next, we want to include the behavior phenotypes of each sow to determine which behaviors are indicative of high piglet mortality. Then we will combine this information with other necessary sow and litter factors used in the first model to develop one complete model for the mothering ability, estimated to have an initial model completed by 2024.

Publications

  • Type: Journal Articles Status: Published Year Published: 2023 Citation: Rahman, M. T., Brown-Brandl, T. M., Rohrer, G. A., Sharma, S. R., Manthena, V., & Shi, Y. (2023). Statistical and machine learning approaches to describe factors affecting preweaning mortality of piglets. Translational Animal Science, 7(1), txad117. https://doi.org/10.1093/tas/txad117
  • Type: Conference Papers and Presentations Status: Accepted Year Published: 2023 Citation: M.T. Rahman , T. M. Brown-Brandl, G.A. Rohrer , S.R. Sharma, Y. Shi. Posture classification of lactating sows using convolutional neural network and depth images. 2023 ASABE Annual International Meeting.
  • Type: Conference Papers and Presentations Status: Published Year Published: 2023 Citation: Shifra S. Ferziger, Isabella C. F. S. Condotta, Tami M. Brown-Brandl, Yeyin Shi, Gary A. Rohrer. Deep-learning-based behavioral time budgets for sows with high and low piglet mortality rates. 2023 ASABE Annual International Meeting 2300833.(doi:10.13031/aim.202300833)
  • Type: Conference Papers and Presentations Status: Accepted Year Published: 2023 Citation: The 2023 Communication Conference of High Education Challenge Communicating Agriculture Beyond Academia Program, Sioux Falls, SD on the "Computer Vision Approach for Reducing Piglet Crushing and Improving Pre-Weaning Mortality."


Progress 03/15/22 to 03/14/23

Outputs
Target Audience:The targeted audience of this project includes but is not limited to: Researchers in precision livestock management, livestock breeding, and information and data scientists and engineers. Students and educators in relevant areas such as animal science, agricultural engineering, and data science. Educational materials can be developed using the data and the process and results of the cyberinfrastructure and algorithms/models though this is a single-function (research) project. They can be mainly used in formal classroom instructions including lectures and hands-on lab exercises. The outcome or the mothering ability evaluation tool developed in this project can also possibly be used in extension programs. Producers and the workforce in the livestock production industry may not immediately but can eventually benefit from the outcome of this research project which is a tool to evaluate the mothering ability and to help breed better genotypes. Changes/Problems:It is still challenging for us to identify and hire qualified graduate students. The University of Nebraska had a graduate student start last year; however, the University of Illinois group has been relying on some talented undergraduate students to make progress on the work. Data labeling takes more time than we expected. What opportunities for training and professional development has the project provided?Graduate and undergraduate students from different majors (agricultural engineering, animal science, and computer science) have been involved in this project, and they have been trained by the PIs with technologies and techniques related to precision livestock management, computer vision, machine/deep learning, statistical analysis, and programming. How have the results been disseminated to communities of interest?The primary channel for disseminating the study findings has been through academic conferences and publications. The graduate student Mr. Rahman attended and gave a presentation at the ASABE AIM. What do you plan to do during the next reporting period to accomplish the goals?Objective 1: we plan tocome up with a feasible plan for the online deposition and share the labelled image data with sow and piglet behaviors with the community. Objective 2: We plan to finish developingmachine learning models for automatic sow and piglet's behavior/posture classification. Objective 3: We may not finish this objective as it depends on objective 2. But we plan to finish the analysis ofa similar model with historical records of sows and piglets just without the time budgets of sow's postures.

Impacts
What was accomplished under these goals? Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities. Both universities have been focusing on labelling the image data with sow and piglet behaviors. We have also been exploring the best way to share the data and later with the developed behavior classification models to the science community towards the end and beyond the project lifetime. We've discussed that both universities have computing centers that could possibly be an option; however, we've also been considering some public resources such as GitHub considering the cost, accessibility, and popularity among the data science community. At the same time, we have labelled a large size of sequential images and organized the manually recorded historical data that will be shared later together with the computer vision models and mothering ability index model. Objective 2: Develop and evaluate machine learning-based models for automatically identifying and quantifying time- series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality. A major effort we made was the organization and analysis of a considerable dataset comprising thirteen farrowing groups and eighty-four sows. Both universities developed image labeling approaches. We planned to separate the work: University of Illinois group has been focusing on RGB images, while University of Nebraska group has been focusing on depth images. Dr. Condotta managed to work with undergraduate research assistant at University of Illinois and has labelled in total 925 RGB images for sows and piglets. For sows, four postures were labelled: kneeling, lying, sitting, and standing. Initial YOLO model has been developing for sows' posture classification. Drs. Brown-Brandl and Shi's graduate student at UNL labelled 17353 images in total with seven postures (kneeling, lying on belly, lying on right, lying on left, sitting, and standing) for CNN based deep learning model development. 14353 of them were used as the training set later. Less images with kneeling postures were available from the original raw dataset but this posture is critical in exploring the crushing behavior on piglets. So we augmented the kneeling postures to improve the model's generalization ability. At the same time, at both universities our students have been learning CNN based deep learning upon their join in and working on initial models for sows' and piglets' behavior recognition and classification. Objective 3: Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes. ?This objective is built upon the time budget of each posture in objective 2 so we are not able to model for the mothering ability index at this point. However, we've been working on a similar model with historical records of sows and piglets just without the time budgets of sow's postures. In the past year, the graduate student at UNL finished developing both statistical and machine learning approaches to describe factors affecting preweaning mortality (PWM) of piglets. A generalized linear model was used to analyze the various sow, litter, environment, and piglet parameters on PWM. Different models (beta-regression and random forest) were evaluated. The RF model was used to predict PWM and overlays for all listed contributing factors. On average, the mean birth weight was 1.44 kg, and the mean mortality was 16.1% where 5.55% was for stillbirths and 6.20% was contributed by overlays. No significant effect was found for seasonal and location variations on PWM. Significant differences were observed in the effects of litter lines on PWM (P < 0.05). PWM increased with higher parity orders (P < 0.05) due to larger litter sizes. The RF model provided the best fit for PWM prediction with a root mean squared errors of 2.28 and a correlation coefficient (r) of 0.89 between observed and predicted values. Features' importance from the RF model indicated that, PWM increased with the increase of litter size (mean decrease accuracy (MDA) = 93.17), decrease in mean birth weight (MDA = 22.72), increase in health diagnosis (MDA = 15.34), longer gestation length (MDA = 11.77), and at older parity (MDA = 10.86). However, in this study, the location of the farrowing crate, seasonal differences, and litter line turned out to be the least important predictors for PWM. For overlays, parity order was the highest importance predictor (MDA = 7.68) followed by litter size and mean birth weight. We are working on submitting the results as a journal manuscript.

Publications

  • Type: Other Status: Accepted Year Published: 2022 Citation: M.T. Rahman, T. M. Brown-Brandl, G.A. Rohrer, Y. Shi, S.R. Sharma, V. Manthena. Factors affecting pre-weaning mortality of piglets. 2022 ASABE annual international meeting.


Progress 03/15/21 to 03/14/22

Outputs
Target Audience:The targeted audience of this project includes but is not limited to: Researchers in precision livestock management, livestock breeding, and information and data scientists and engineers. Students and educators in the relevant areas such as animal science, agricultural engineering, and data science.Educational materials can be developed using the data and the process and results of the cyberinfrastructure and algorithms/models though this is a single-function (research) project. They can be mainly used informal classroom instructions including lectures and hands-on lab exercises. The outcome or the mothering ability evaluation tool developed in this project can also possibly be used in extension programs. Producers in the livestock production industry can eventually benefit from the outcomeof this research project which is a tool to evaluate the mothering ability and to help breed better genotypes. Changes/Problems:Even though in the system the project started in March 2021, the engine really started running a full speed in the fall semester (September) of 2021 after the first graduate GRA arrived onboard and started at the University of Nebraska-Lincoln. Due to COVID, we could not have the identified graduate student started earlier due to the restrictions on the visa process and international travel. Co-PI Condotta recently just started her tenure track in the Animal Science department at UIUC. She has also been making a significantefforton looking for an appropriate graduate GRA fully dedicated to this project; however, it has been very difficult to hire a good candidate and she has not been able to identify one who can work on this project full time in the first year. Even with these difficulties/problems, both institutions managed to accomplish a large portion of the tasks originally planned for the first cycle of the project. Alternatives were figured out, for example, for the GRA issue which is the part-time hiring of multiple qualified candidates from collaborated departments such as computer science. A GRA who can work exclusively on this project has been identified recently at UIUC and is expected to start fall this year. What opportunities for training and professional development has the project provided?This is a single-function research project and we have not conducted much training and professional development in the first cycle of the project. However, there are graduate and undergraduate students from various majors (agricultural engineering, animal science, and computer science) involved in this project, and they have been trained by the PIs with technologies and techniques related to precision livestock management, computer vision,machine/deep learning, statistical analysis, and programming. How have the results been disseminated to communities of interest?Yes. As mentioned in the previous paragraphs, part of the efforts and results so far will be presentedat the ASABE Annual International Meeting in Houston in July by the Ph.D. student Towfiqur Raman from the University of Nebraska-Lincoln. The title is "factors affecting pre-weaning mortality of piglets". What do you plan to do during the next reporting period to accomplish the goals?Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities. complete the creation and setupof the cloud-based server. include examplesequential image data, labels, and corresponding records onthe server. include the labeling tool on the server. figure out a plan for data computing on the server. Objective 2: Develop and evaluate machine learning-based models for automatically identifying and quantifying time-series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality. Co-PI Condotta will hire a GRA focusingon this project at UIUC. complete labelingthe selected example datasets that are ready to be published. develop theCNN models for automatic sow's behaviorand piglet activity classifications. complete manuscripts for conference proceedings and journal papers related to the CNN models. Objective 3: Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes. Depending on when Objective 2 is completed, start developing the General Linear Model to describe piglet mortality based on the outcomes of Objective 2.

Impacts
What was accomplished under these goals? Objective 1: Establish a cloud-based server to support the curation of sow and piglet data related to their behavior study, including the sequential imagery and manual records in different modalities. In the first cycle of this project, efforts were made on identifying the best way to create and host the cloud-based server. After evaluating the pros and cons of a few options, we've identified the Holland Computing Center (HCC) at the University of Nebraska-Lincoln as the top candidate to host the server which will be the repository to hold the datasets and the data processing center with developed algorithms/models. This server will be open to public at the end of the project. We've been working with HCC and created a domain. As for the data repository, a set of overhead sequential images had been identified and curated together with complete manual records for developing the automatic sow and piglet behavior recognition model. The sequential images are regular digital and 3D images collected from overhead depth cameras mounted above the farrowing cates since the labor day till about 3 days after birth. The images are recorded every 5-7 seconds in order to capture the behavior changes of the sows and piglets. The corresponding manual records include pen location, sow's parity, piglet birth date, stillborn, piglet daily death count, environmental conditions, sow health ratings, piglet birth weight, piglet weaning weight, etc. This dataset was selected from a much bigger dataset to only include the cases with significant high or low pre-weaning mortality rates to serve objective 3 of this project to investigate the relationship between sow's behavior and pre-weaning mortality. We hope, at the end of the project, we not only share the scientific finding on whether there are certain sow's behaviors that are related with high or low piglet pre-weaning mortality, but also provide to the science community and industry a tool to process their data to facilitate their decision makings on the mothering ability of a sow which is the outcome of this objective. Objective 2: Develop and evaluate machine learning-based models for automatically identifying and quantifying time-series behavioral phenotypes from sequential image data that can potentially elucidate sows' mothering ability and piglets' activity and vitality. In order to build the machine/deep learning models for automatically recognizing sow's behavior and piglet activities, we need to develop the data labeling tool for the sequential digital and depth images precisely and efficiently. This is what we primarily focused on regarding this objective in the first cycle of the project. Knowing about the similar interests and efforts by her colleagues in the AIFARMS Institute (Artificial Intelligence for Future Agricultural Resilience, Management, and Sustainability funded by NSF and NIFA) at UIUC, Co-PI Condotta has been working with her colleagues there to develop the image labeling software to synergize the efforts and maximize the outcome of the two fundings. An initial version of the labeling tool was developed and will be tested and improved in the next cycle of the project. The final version of this labeling tool will also be published and available to the public as a handy tool for sequential video-based animal behavior research. In the meantime, we have manually labeled the sow's behavior and piglet's activities for 10 crates (5 high mortality and 5 low mortality). Each cate has over 5000 digital and depth image pairs. This is a lot of effort and we look forward to using the labeling tool mentioned above in the next project cycle to increase efficiency. In addition, we've been training the related students on image processing and convolutional neural network (CNN) based deep learning to build sow behavior and piglet activity recognition models. Objective 3: Create a Mothering Ability Index (MAI) to classify a sow's ability to successfully raise a litter based on statistical modeling with historical records of sows and piglets and the identified time-series behavioral phenotypes. Although we have already curated the dataset including the complete records of sow, piglets, and environment, the development of the decision-making model to assess a sow's MAI in objective 3 relies on the outcomes of objective 2, which is the classified sow behaviors. However, we conducted a related study on determining and ranking the major contributing factors causing the pre-weaning mortality (PWM) in relation to the sow (without the mothering ability), piglets, and environment in the first project cycle. We used the data from 1982 sows over 5 years collected at the U.S. Meat Animal Research Center in Clay Center, Nebraska. Data included 4 different parities of sows, 4 different birth seasons, 10 different pen locations inside a barn, and the piglet birth weights. Three different models (Beta regression, Binomial, and Random Forest models) were used to analyze the association of the PWM and overlay deaths with the contributing factors. Additionally, the ANOVA procedure was performed to determine the variations among the factors. The ranking of contributing factors or variables for mortality in a descending order were mean birth weight, gestation length, production year, diagnosis , seasons, and parity. The PWM increases when the mean birth weight decreases. ANOVA model (Tukey's HSD model) showed the PWM and overlays percentage significantly increased (23.7% and 9.5%, respectively) in the fall season than the other. For the parity group, PWM and overlays were found higher in the fourth parity. However, the pen location was found to have no effect on production. This study serves as the base or a bottom line of this project. Compared with other few existing studies, this study used large production datasets. The results will be presented at the ASABE Annual International Meeting in Houston in July by the PhD student Towfiqur Raman from the University of Nebraska-Lincoln. We will include the mothering ability in the analysis once we have the information.

Publications

  • Type: Conference Papers and Presentations Status: Accepted Year Published: 2022 Citation: Rahman, M.T., Brown-Brandl, T. M., Rohrer, G.A., Shi, Y., Sharma, S.R., Manthena, V. (2022, July 17-20). Factors affecting pre-weaning mortality of piglets. ASABE AIM 2022, ASABE, Houston, Texas.