1. Introduction
Body weight is an extremely important indicator in pig production and scientific research. Accurately obtaining the weight of pigs guides scientific breeding and improves economic benefits [
1]. Direct weight measurement using a weighbridge is the most common manual method. This method can provide the most accurate weight, but it is time-consuming and labor-intensive, especially when the pig population is large. Besides, this method is difficult to achieve and is very stressful for pigs, affecting their growth and even causing pig death [
2,
3,
4,
5]. With the development of technologies such as image processing, image analysis, machine learning, deep learning, and computer vision, weighing methods have transformed from contact to noncontact [
5]. Noncontact measurement is based on computer vision technology and collects animal image data by 2D and 3D cameras for weighing [
6]. Combined with convolutional neural networks (CNN) [
7] or recurrent convolutional neural networks (RNN) [
8], it can extract pig body shape features quickly and estimate pig weight accurately [
9]. For example, Jun et al. [
10] developed an estimation model based on 2D images and accurately measured the weights of 70 to 120 kg pigs. Fernandes et al. [
11] successfully predicted the body weight of nursery and finishing pigs via 3D computer vision. In addition, noncontact measurement can also achieve automatic, continuous, and real-time monitoring of live pigs through smart equipment, promote the development of precision livestock farming, and improve pig production efficiency [
1,
12].
In recent years, noncontact measurement has been a rising weight-measuring tool in precision livestock farming. To achieve efficient live pig weight measurement in large-scale farming, we introduce an automatic intelligent weighing system (AIWS). This system can measure the weight of large groups of pigs and may become one of the weight measurement tools in precision livestock farming. However, there is no report on the application of this AIWS in practical production. Therefore, to examine the accuracy of AIWS and its application in the growth curve fitting of pigs, two experiments were conducted on large-scale pig farming. We hope to promote AIWS application in large-scale farming and provide a reference method for weight measurement in precision livestock farming.
4. Discussion
The camera is a direct factor affecting the accuracy of noncontact weight measurement. Noncontact weight measurement usually uses pig images collected by 2D and 3D cameras for weighing [
4,
19]. Although the accuracy was high, there were some problems with the use of 2D image data and camera systems in large-scale farming. For example, the data quality of a 2D camera system depends largely on the illumination conditions [
20]. Suboptimal lighting conditions can significantly reduce estimation accuracy [
21]. The data extracted from images captured in different environments may interfere with image processing and analysis, leading to incorrect results [
22]. Compared to 2D camera systems, the 3D camera has more advantages. Current 3D camera systems have their own light sources or use infrared, making them robust in different lighting environments [
20]. Three-dimensional images (depth images) are not affected by light [
19], and 3D imaging also reduces the influence of light on the weight estimation accuracy [
23]. One of the greatest factors affecting the estimation model accuracy for pig body weight is the depth camera accuracy [
24]. The depth camera accuracy is influenced by three factors: distance from the camera to the target, temperature, and target color [
25,
26]. Therefore, understanding the depth camera accuracy used and the effects of different environmental conditions on its accuracy is crucial for accurate body weight estimation. In this experiment, the distance from the camera to the target was the optimal distance obtained through extensive experiments which was fixed and unchanged, so it had little impact on weight measurement. However, a few larger absolute percentage errors may be related to the color of the pigs’ bodies. If a pig’s body is dark-colored or the surface is dirty, the measurement values will deviate [
25], which in turn affects the weight estimation accuracy. In addition, the posture of pigs may also affect the weight estimation accuracy. The weight estimation model in our study was established based on the back image of standing pigs. The back posture changed when the pig lay on its stomach or side, resulting in differences between the collected depth image data and the model dataset, ultimately leading to larger absolute percentage errors.
In addition to depth cameras, predictive networks are also crucial for the accuracy of estimation results. ANNs and convolutional neural networks (CNNs) in conjunction with image processing improved prediction accuracy [
12]. As machine-learning algorithms, ANNs have achieved enormous success in a wide variety of fields [
27]. CNN is a special type of ANN that has been optimized for input data with grid patterns such as images or videos and has excellent performance in image analysis data [
12,
28]. It can extract body shape features and estimate pig weight and body size quickly and accurately with simple automated preprocessing of 3D images [
12]. Previous studies reported that CNNs trained once can function in real time and accurately identify pigs with an accuracy of approximately 96.7% [
29]. In addition, Meckbach et al. [
30] reported that providing only depth images and the related weight to the CNN was sufficient to accurately predict the body weight of 20 to 133 kg pigs (R
2 > 0.97). In this weight measurement system, a regression network was built based on BotNet to predict the weight precisely. It was designed so that a dual branch of 3 × 3 convolution and MHSA replaces a single 3 × 3 convolution of the fourth block in ResNet, using 3D images as input. A high-accuracy and strong universality weight measurement model was obtained based on deep learning and considerable dataset training [
13]. Then, cascading deconvolution layers and atrous convolution layers were used to improve the mask generation branch and solve the problem of low-resolution feature maps in the mask branch [
31]. In the weight measurement of live pigs, this method optimized the Track R-CNN to output more accurate masks than the original network. In this experiment, the MAE, MAPE, and RMSE were 3.48 kg, 3.71%, and 4.43 kg, respectively. This result was close to the research (R
2 = 0.65, MAE = 1.85 kg, MAPE = 1.68%, RMSE = 5.74 kg) of Chen et al. [
1] who constructed a multilayer RBF neural network (deep neural network) model that automatically predicts the weight of live pigs. The RMSE was lower than the optimal prediction model of the multilayer perceptron neural network (MLP-NN) that was developed by Ositanwosu et al. [
14]. This indicated that our prediction model is more precise and that the prediction results are more accurate. Furthermore, the correlation coefficient
r of the two weight measurement methods was 0.9410, R
2 was 0.8854, and there was a highly significant correlation between the two methods (
p < 0.001). These results suggested that this AIWS could replace manual measurement to measure the weight of 60 to 120 kg pigs in large-scale farming.
A pig’s weight and growth rate are important factors in its production [
32]. Fitting growth curves of pigs can predict pig growth, frame proper feeding plans, maximize utilization of the meat growth potential, and estimate the optimal slaughter weight for higher production and economic benefits [
33,
34]. Logistic and Gompertz are two commonly used and classical models in animal growth curve fitting, and they have a better fitting effect. Shen et al. [
35] used three nonlinear growth models (Logistic, Gompertz, and Von Bertalanffy) to describe the growth characteristics of Liangshan pigs, established a growth curve model for Liangshan pigs, and estimated the maximum growth rate of Liangshan pigs. Studies have reported that the logistic model was the best-fitting model for longitudinal testicular volume in Nellore bulls [
15]. The Gompertz model has a better-fit effect on the growth curve of partridges and has a higher R
2 and R
2aj and a lower AIC and BIC [
33]. Hoang et al. [
36] showed that the Gompertz model was the most suitable model for describing the growth curve of Mia chickens. However, unlike these reports, Mata Estrada et al. [
37] compared four nonlinear growth models and found that the Von Bertalanffy growth model had the best-fitting effect on Creole chickens in Mexico. It can be concluded that different varieties and different animals are suitable for different growth models. Finally, with the previous studies, we chose the Logistic and Gompertz models to fit the growth curve of 50 to 110 kg three-crossbred pigs (Duroc × Landrace × Large White). The results of our study revealed that the AIC and BIC of the AIWS weighting method were much lower than the manual method, and a better fit was indicated by a lower AIC and BIC [
38,
39], suggesting that the AIWS weight estimation method is superior to manual weight measurement in growth curve fitting. In AIWS weight estimation, both R
2 and R
2aj of the Logistic and Gompertz models were 0.997, and the AIC and BIC of the Logistic model were lower than those of the Gompertz model. Therefore, we considered that the logistic model obtained by the machine weighing method was the best-fitting model. In this experiment, the age at the inflection point of 50 to 110 kg three-crossbred pigs was 164.46 d and the body weight at the inflection point was 93.45 kg.
In this study, the growth curve for 50 to 110 kg pigs showed a tilted right J-shaped increase because the growth rate of pigs gradually decreased after reaching the inflection point, and the curve tended to flatten. In addition, the farms began to sell and slaughter pigs after 180 days when their body weight reached approximately 110 kg to achieve maximum breeding benefits. Our experiment also ended with the sale and slaughter of pigs. Consequently, the growth curve of pigs did not reach a stable period and was not S-shaped. The maximum growth rate was estimated using growth curves [
40] and calculated using the first derivative of the growth curve absolute growth rate (AGR) [
41]. We took the first-order derivative of two models using two weighing methods to obtain the absolute growth rate, as shown in
Figure 4. With aging, the AGR first increased and then decreased, reaching its maximum growth rate at the inflection point. The maximum growth rate of the best-fit model was close to the method of manual weighing. It was 831.66 g/d. This result is higher than that of Liangshan pigs (455.43 g/d) [
42], and it also confirmed that three-crossbred pigs grew faster than local pigs. The growth rate and the daily gain decreased after the inflection point, and the feed conversion ratio also decreased accordingly. It is also the main reason that the farms sell and slaughter pigs after 180 days of age when their body weight reaches around 110 kg. Therefore, the logistic model built by the AIWS weighing method not only conformed to the growth and development rules of pigs but also conformed to practical production. For these reasons, it is feasible for AIWS to replace manual weighing in fitting pig growth curves, and continuous weight data on pigs had a better fitting effect.