Levering BIG DATA and DIGITAL TOOLS to improve the efficiency and sustainability of the pig production
Guilherme J. M. Rosa, PhD University of Wisconsin-Madison www.gjmrosa.org
Complexity of Production Systems
Production Efficiency Product Quality Animal Welfare Sustainability
Two Innovation Opportunities Big Data Analytics Sensor Technologies
Big Data Surveys
Farm management software
Economics Sensors Weather
Data is the Fuel for AI
AI: From Data to Decisions Descriptive
Data
Predictive
Optimization
Prescriptive
Example 1. Minimizing Transport Losses • •
Dead on arrival (DOA) Downer or slower hogs Direct economic losses for producers Animal welfare and well-being concern
Passafaro, T.L., Van de Stroet, D., Bello, N.M., Williams, N.H. and Rosa, G.J.M. Generalized additive mixed model on the analysis of total transport losses of market-weight pigs. Journal of Animal Science 97: 2025-2034, 2019.
Data Integration
Location of Finishing Farms
100 km
Database • Data from 2013 to 2016 • More than 100 variables: - Performance: Average daily gain, feed conversion, mortality, final weight, initial weight, days on feed, etc. - Economics: Profit, income, expenses, feed cost, genetic sales, etc. - Management: Number of empty days, vaccinations, etc. - Facilities: Type of feeder, type of drinker, construction age, supervisor, manager, etc.
Materials and Methods • Integration of movement and weather data: - Market-weight pigs - July of 2014 to December of 2015
• Final dataset: -
26,828 shipments 420 farms 2 processing plants 4,569,032 market-weight hogs
• Statistical model
- Generalized Additive Mixed Models (GAMM): linear predictor specified in terms of smooth functions of covariates
Variables Recorded per Shipment
Descriptive Statistics
DOA = Dead on arrival; DOWN = Losses due to downer hogs; THI = Temperature humidity index
Materials and Methods • Statistical model
- Generalized Additive Mixed Models (GAMM): linear predictor specified in terms of smooth functions of covariates (Lin & Zhang, 1999)
• Base generalized linear mixed model
- Random effects: combination of farm - quarter of the year, and truck company - Fixed effects: abattoir, type of driver, management group, distance traveled, average weight, wind speed, precipitation, and THI
• Forward stepwise procedure
- Model deviance, Biological meaning, Statistical significance - Pairwise interactions
Results
Total Transport Losses
Results
Distance Traveled (km)
Predicted total transport losses of market weight pigs on the odds ratio scale
Total Transport Losses
Results
THI
Predicted total transport losses of market weight pigs on the odds ratio scale
Total Transport Losses
Results
Average Weight (kg)
Predicted total transport losses of market weight pigs on the odds ratio scale
Results
Example 2. Mitigation of Disease Outbreaks
GSCG: Giant Strongly Connected Component; GIC: Giant In Component; GOC: Giant Out Component; GWCC: Giant Weakly Connected Component
Location of Different Types of Farms ● ● ● ● ●
Finishing GDU Nurseries Sows Wean-to-finishing
Passafaro, T.L., Fernandes, A.F.A., Valente, B.D., Williams, N.H. and Rosa, G.J.M. Network analysis of swine movements in a multi-site pig production system in Iowa, USA. Preventive Veterinary Medicine 174: 104856, 2020.
Monthly Pig Shipments Between Farms
Network Analysis • Describe and understand the swine network transportation in a multi-site production system • Target sites that are more likely to spread disease • Assess different intervention strategies
Materials and Methods Movement Report: • Movement ID, movement date, site of origin, site of destination, farm type, and number of pigs • Final data contained 76,566 movement records • Networks were generated with the R package igraph (Csardi, 2006) • Metrics -
Degree Betweenness Scale-free topology Degree assortativity Connected components
Materials and Methods Basic Reproducible Number (R0): • defined as the number of secondary cases generated from a single case: • where -
and
refer to in- and out-contact rates.
Investigated three scenarios R0 was calculated after removing each site Sites were removed based on their rank and R0 was calculated Or removed randomly 100 times for each monthly network
Sensor Technologies
Computer Vision Systems
Depth Sensors (3D Cameras)
Time of Flight (ToF) Light Detection and Ranging (LiDAR)
Supervised Learning
Computer Vision Techniques Convolutional Neural Network
Precision Feeding
Growth and Development
Age
Schematic representation of changes in proportions of muscle, total body fat and bone during growth of cattle
Real-Time Monitoring Periodic measurements: • Direct assessment of animals growth
- Assess intra-group variability - Optimal management (e.g. precision nutrition)
• Prohibitive
- Labor and cost - Animal welfare (stress) - Scale within pen: expensive, requires periodically cleaning and calibration
Prediction of Pig Weight • Data on 655 pigs • Boars and gilts from 3 commercial lines • Weight across different ages (Scale EziWeigh5i, ste ±1%) • Pigs were not fasting Fernandes AFA, Dórea JRR, Fitzgerald R, Herring W and Rosa GJM. A novel automated system to acquire biometric and morphological measurements, and predict body weight of pigs via 3D computer vision. Journal of Animal Science 97:496–508, 2019.
Data Acquisition • Sensor positioned on top of the area before to the scale • Pigs were contained under the sensor for a variable amount time • Kinect V2 sensor (Microsoft) • BW and multiple images acquired from each animal
Computer Vision System Framework
A. Image acquisition
C. Image Analysis
B. Image Processing
D. Data Analysis
- Thresholding - Binarization
- Image segmentation - Feature extraction
-
Data normalization Model fitting Validation and tuning Prediction
Features Extracted Periodic measurements: • Body measurements -
Area Volume Length Width Height
• Shape descriptors
- Eccentricity - Back curvature linear coefficient - Polar Fourier Descriptors
Data Analysis & Results • 10 permutations on a 5-fold cross-validation were used to assess the quality of the predictions • Stepwise regression with AIC as model selection criterion (stepAIC function of MASS R package) • Results: MAE = 3.2 kg, R2 = 82.0%
Improving Prediction of Pig Body Weight and Body Composition • Body weight • Body composition traits: Muscle depth (MD) and Back fat (BF)
Aloka SSD 500
Fernandes AFA, Dórea JRR, Valente BD, Fitzgerald R, Herring W and Rosa GJM. Comparison of data analytics strategies in computer vision systems to predict pig body composition traits from 3D images. Journal of Animal Science 98:skaa250, 2020.
Data Mining Approaches Prediction models: Multiple Linear Regression (LM) Partial Least Squares (PLS) Elastic Network Regression (EN) Artificial Neural Network (ANN) Deep Learning Image Encoder (DL)
Input: Image features (MASS, pls, glmnet, H2O)
Input: Raw 3D images
NN architectures: 1-3 hidden layers, 5-100 nodes/layer, activation functions: rectified linear unit (ReLU) or max-out, dropout rate 20-80%, loss functions: Gaussian and Huber, L1 and L2 regularizations, learning rate and time decay Model comparison: 5-fold CV: mean absolute error (MAE), mean absolute scaled error (MASE), root mean square error (RMSE), R2
Deep Learning Image Encoder
Deep Learning Image Encoder -
TensorFlow machine learning library; Python (version 3.7) Network architectures: input layer, encoder blocks, fully connected layers, and output layer Input layer: 3D image and camera focal length Encoder blocks: convolutional block, followed by a max-pooling layer with a 2 by 2 window and a strider of the same size Convolutional blocks: convolutional layer with a 3 by 3 window, batch normalization layer, and ReLU activation function layer Fully connected layers had L1 and L2 regularization, dropout rate of 50%, and leaky ReLU activation function DL architectures varied on size of the input image, number of encoder blocks, and number of nodes on the fully connected layers
Results
Concluding Remarks • Big Data: multiple sources of information • Efficient data management and analytics • Optimization algorithms for data-driven decision • Precision Livestock Farming (PLF) • Computer vision for animal identification and tracking, monitoring behavior and welfare, disease detection, among others.