Currently, artificial intelligence (AI) and robotics are being applied to improve livestock production. Artificial neural networks (ANN) are a computational model, which is based on the biological neuron of human brain to respond to optimal estimated value. The ANN are also a set of algorithms used in AI for learning big data. The advantage of ANN has been reported since it does not need mathematical models before prediction when compared with the regression analysis. The use of ANN in livestock has been published for egg price forecasting, nutrient requirement for animals, predicting amino acid profiles in feed ingredients and estimating growth curve and growth performance. Recently, image processing has been introduced to several fields in livestock for improving management and production such as facial recognition, emotional detection, egg quality and medical diagnosis. In Thailand, we have been researched and published the application of ANN for 1) Increasing the accuracy of growth model for Cherry Valley ducks (2011), 2) Prediction of standardized ileal lysine digestibility in heated full-fat soybeans for growing pigs (2018), 3) Soybean meal price forecasting (2018), and 4) Pig body weight estimation using image processing and ANN (2019). The results suggested that ANN had more accurate predictions with lower error measurement than regression analysis. In addition, image processing is a quick method to monitor health status, growth performance and animal welfare. For further research, deep learning will be used to detect the level of footpad dermatitis. Thermal image will be used to determine the heat production and health status in commercial farm. Motion and tracking will be applied for monitoring gait scoring and animal behavior. In conclusion, the application of ANN and image processing is an alternative technique to improve commercial pig and poultry production.
Keywords: Artificial intelligence, artificial neural networks, image processing, prediction, production
Artificial neural networks (ANN) are a computational model, which is based on the biological neuron of human brain to respond optimal prediction value (Ahmad et al., 2001). An ANN is also a set of algorithms in artificial intelligence (AI) that are designed to recognized the patterns of big data. The advantage of ANN has been reported since it does not need mathematical models before prediction when compared with the regression analysis (Kaewtapee et al., 2011). Therefore, ANN are being applied to livestock production as alternative to regression analysis for the prediction of animal growth (Kaewtapee et al., 2011), the estimation of standardized ileal digestibility of amino acids in full-fat soybeans for growing pigs (Kaewtapee et al., 2018a), feed forecasting (Kaewtapee et al., 2018b) and estimation of pig body weight (Kaewtapee et al., 2018).
Regression Analysis Models
Simple linear regression, multiple linear regression, quadratic regression and cubic curvilinear are shown as below:
Simple linear regression:
y = β0 + β1x1
Multiple linear regression:
y = β0 + β1x1 + β2x2
y = β0 + β1x1 + β2x22
y = β0 + β1x1 + β2x12 +β2x13
where y represents estimated values, x is observed values, and β is a rate constant
Artificial Neural Networks Models
An ANN is a processing system that executes activities similar to those of the human brain by replicating the operations and connectivity of biological neurons. Multilayer perceptron (MLP), the most popular ANN, typically consists of 3 connected feed-forward layers of neurons. The MLP for the input, hidden, and output layers were designed according to Kolmogorov’s theorem (with each layer connected to the previous layer). A back-propagation algorithm was used for training by iteratively changing the interconnecting until an error minimum was found. The hyperbolic tangent function and the linear activation function are used in the hidden and output layers, respectively, and are represented by these functions:
Where x represents the weighted sum of inputs to the neuron and f(x) indicated the outputs from the neuron. For improving accuracy, radial basis function (RBF) represents an alternative to MLP. The RBF involves the basis functions, which use an algorithm to cluster data in the training set. It is a local-processing network in which the effect of a hidden unit is usually concentrated in a local area centered at the weight vector. It is different from the MLP, which are distributed-processing networks, in that the effect of a hidden unit can be distributed over the entire input space. In addition, RBF simulates a function in the hidden layer and it can be trained
and is shown as below:
Where x represents the weighted sum of inputs, s is the sphere of influence or width of the basis function, and f(x) is the corresponding output from neurons.
The data were divided into two different random sets, including training and testing, and were used for model development by regression analysis and artificial neural networks. The statistic of the fit model and an error measurement of observations were determined using Pearson correlation (r), R2, root mean square error (RMSE), mean absolute percentage error (MAPE), mean absolute deviation (MAD) and bias.
The Pearson correlation (r) is shown as below:
where xt, yt are observed values at time t, is mean of x, x̄ is mean of ȳ, and n is the number of observations. The accuracy of each predictive model was determined by R2 computed as following model:
where ŷ is the estimated value. The error measurements were determined by mean absolute deviation (MAD) and mean absolute percentage error (MAPE) as following models:
Prediction of animal growth
The objective of this research was to compare growth models of Cherry Valley ducks. The multilayer perceptron (MLP) method and the radial basis function (RBF) method are both ANN that offer an alternative to nonlinear regression analyses. To describe the growth curve, average BW was used. The results suggested that RBF improved R2 than did the regression analyses and MLP models. The error measurements of RBF were significantly lower than that of MLP. It could be concluded that RBF produced more accurate predictions than MLP.
The estimation of standardized ileal digestibility
Heat treatment is necessary to reduce trypsin inhibitor activity (TIA) in full-fat soybeans (FFSB). The ANN were used to predict the effect of heat treatment on standardized ileal digestibility (SID) of lysine (Lys) in FFSB. Raw FFSB were undertaken seven different procedures of heat treatment including wet heating and autoclaving. The eight differently heated FFSB were analyzed for TIA, urease activity (UA), protein solubility in 0.2% potassium hydroxide (KOH), Lys to crude protein (CP) ratio (Lys:CP), and the color values including lightness (L*) and redness (a*) values. The SID of Lys showed a quadratic response to decreasing TIA, UA, KOH, Lys:CP and L*, and to increasing a*. Based on the accuracy of quadratic regression, R2 were 0.80, 0.72, 0.51, 0.49, 0.41 and 0.37 for TIA, UA, Lys:CP, a*, KOH and L*, respectively. In comparison, ANN analysis resulted in higher R2, which were 0.85, 0.75, 0.83, 0.81, 0.85 and 0.80 for TIA, UA, Lys:CP, a*, KOH and L*, respectively. In addition, mean absolute deviation and mean absolute percentage error were lower in ANN analysis than in quadratic regression. The heat index of optimal heat treatment by ANN analysis was 2.04 mg/g DM for TIA, 0.05 mg N2/g min for UA, 6.00% for Lys:CP, 4.04 for a*, 75% for KOH and 56.94 for L*. In conclusion, ANN can be used as an alternative method to regression analysis for predicting SID of Lys in heated FFSB.
The objective of this study was to forecast soybean meal price by using ANN. The data included Thai soybean meal price, US soybean meal price, US soybean seed price, Thai soybean seed production, Brazil soybean seed production and oil price. The data was collected from January 1998 to April 2018, and was divided into two groups for training and testing data. The training data were used for simple linear regression analysis, Stepwise regression, multiple linear regression analysis and ANN analysis. The results showed that the simple linear regression analysis using US soybean meal price gave lower accuracy (R2 = 0.867), higher mean absolute deviation (MAD = 0.98) and higher mean absolute percentage error (MAPE = 7.60) when compared to the ANN analysis (R2 = 0.873, MAD =0.96 and MAPE =7.38). Likewise, the multiple linear regression analysis using US soybean meal price, Brazil soybean seed production and oil price gave lower accuracy ( R2 = 0.875) and higher error measurement (MAD =0.93 and MAPE =7.26) when compared to the ANN analysis (R2 = 0.895, MAD =0.86 and MAPE =6.50). Therefore, the application of ANN is an alternative method to predict soybean meal price in the future.
Pig weight estimation using image processing and artificial neural networks
Pigs were individually weighted, measured heart girth and body length. Thereafter, the top-view images of pigs were captured, and the ratio of pig pixels to total area (image) was analyzed by using Python programming. The correlation of body weight and heart girth as well as body length and image was determined by Pearson correlation. The training set was used to develop equations of pig weight by regressing analysis and artificial neural networks (ANN). The results showed that the high positive correlation with body weight was observed in image, heart girth, and body length (0.930, 0.872 and 0.849, respectively). With regard to regression analysis, the equation including image showed a higher accuracy (R2 = 0.866) when compared to the equations including heart girth (R2 = 0.760) or body length (R2 = 0.721) as well as the equation including both heart girth and body length (R2 = 0.835). For ANN analysis, the model including image expressed a better fit (R2 = 0.892) when compared to the equation obtained from regression analysis. Furthermore, ANN analysis showed lower MAD (0.618) and MAPE (6.243) when compared to regression analysis (MAD=0.630 and MAPE=6.410). Therefore, image processing is a quick method to estimate body weight without casing stress to the pigs. The use of ANN is an alternative method to increase the accuracy of the model for pig weight estimation.
The ANN are mathematical models, which can be used as an alternative to regression analysis models to improve the accuracy of the model with lower error measurements. Image processing is a quick method to estimate growth performance and to observe behavior of animals. The ANN and image processing may be used to monitor health status and animal welfare for improving commercial pig and poultry production in the near future.
Ahmad HA, Dozier GV, Roland DA Sr. 2001. Egg price forecasting using neural networks. Journal of Applied Poultry Research. 10:162–171.
Kaewtapee, C., C. Khetchaturat, R., and C. Bunchasak. 2011. Comparison of growth models between artificial neuron networks and nonlinear regression analysis in cherry valley duck. Journal of Applied Poultry Research. 20: 421-428.
Kaewtapee, C., C. Khetchaturat, and C. Bunchasak. 2018a. Prediction of standardized ileal lysine digestibility in heated full-fat soybeans by artificial neural networks. In: The 18th Asian Australasian Animal Production Congress, 1-5 August 2018, Borneo Convention Centre Kuching, Sarawak, Malaysia.
Kaewtapee, C., C. Khetchaturat, N. Krutthai, and C. Bunchasak. 2018b. Soybean meal price forecasting using artificial neural network. Journal of Agricultural Research and Extension. 352 (2): 392-399.
Kaewtapee, C., C. Rakangtong and C. Bunchasak. 2019. Pig weight estimation using image processing and artificial neural networks. 2019 9th International Conference on Asia Agriculture and Animal (ICAAA 2019). 8-10 August 2019, Jeju Island, South Korea.
|Date submitted: October 24, 2019
Reviewed, edited and uploaded: November 22, 2019