| Literature DB >> 34066410 |
Jianlong Zhang1,2, Yanrong Zhuang1,2, Hengyi Ji1,2, Guanghui Teng1,2,3.
Abstract
Pig weight and body size are important indicators for producers. Due to the increasing scale of pig farms, it is increasingly difficult for farmers to quickly and automatically obtain pig weight and body size. Due to this problem, we focused on a multiple output regression convolutional neural network (CNN) to estimate pig weight and body size. DenseNet201, ResNet152 V2, Xception and MobileNet V2 were modified into multiple output regression CNNs and trained on modeling data. By comparing the estimated performance of each model on test data, modified Xception was selected as the optimal estimation model. Based on pig height, body shape, and contour, the mean absolute error (MAE) of the model to estimate body weight (BW), shoulder width (SW), shoulder height (SH), hip width (HW), hip width (HH), and body length (BL) were 1.16 kg, 0.33 cm, 1.23 cm, 0.38 cm, 0.66 cm, and 0.75 cm, respectively. The coefficient of determination (R2) value between the estimated and measured results was in the range of 0.9879-0.9973. Combined with the LabVIEW software development platform, this method can estimate pig weight and body size accurately, quickly, and automatically. This work contributes to the automatic management of pig farms.Entities:
Keywords: body size; convolutional neural network; deep learning; estimation; pig weight
Mesh:
Year: 2021 PMID: 34066410 PMCID: PMC8124602 DOI: 10.3390/s21093218
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Pig weight and back image acquisition system: (a) three-dimensional diagram of system; (b) distribution of weighing sensors; (c) photo of system.
Figure 2Pig weight and back image acquisition system: (a) data acquisition scheme; (b) software interface.
Figure 3Specific locations of body size parameters and measurement of body size: (a) specific locations of body size parameters; (b) body size measurement using a measuring stick.
Figure 4Samples of pig images in various postures.
Figure 5Image preprocessing process.
Figure 6Pig weight and body size estimation model and estimate process. DL: dense layer; BW: body weight; SW: shoulder width; SH: shoulder height; HW: hip width; HH: hip height; BL: body length.
Hyper-parameters of models.
| Optimization Function | Learning Rate | Loss Function | Batch Size | Iterations |
|---|---|---|---|---|
| Adam | 0.001 | MSE | 16 | 150 |
Model information.
| Model | Size of Input | Model | Number of | Number of | Training |
|---|---|---|---|---|---|
| Modified DenseNet201 | 224 × 224 | 229 | 18,333,510 | 18,104,454 | 29.1 |
| Modified MobileNet V2 | 224 × 224 | 31 | 2,265,670 | 2,231,558 | 12.9 |
| Modified ResNet152 V2 | 224 × 224 | 683 | 58,343,942 | 58,200,198 | 35.7 |
| Modified Xception | 299 × 299 | 243 | 20,873,774 | 20,819,246 | 54.0 |
Figure 7Loss change on validation set of each model.
Performance of the models on the test set. BW: body weight; SW: shoulder width; SH: shoulder height; HW: hip width; HH: hip height; BL: body length; RMSE: root mean square error; MAE: mean absolute error; MRE: mean relative error; MET: mean estimation time; MSE: total mean square error.
| Items | Modified | Modified | Modified | Modified | |
|---|---|---|---|---|---|
| BW | RMSE (kg) | 2.51 | 1.84 | 1.73 | 1.53 |
| MAE (kg) | 2.03 | 1.49 | 1.31 | 1.16 | |
| MRE | 3.44% | 2.54% | 2.26% | 1.99% | |
| SW | RMSE (cm) | 0.48 | 0.44 | 0.46 | 0.43 |
| MAE (cm) | 0.38 | 0.34 | 0.37 | 0.33 | |
| MRE | 1.49% | 1.35% | 1.47% | 1.31% | |
| SH | RMSE (cm) | 1.53 | 1.38 | 1.31 | 1.36 |
| MAE (cm) | 1.42 | 1.22 | 1.17 | 1.23 | |
| MRE | 2.79% | 2.38% | 2.30% | 2.40% | |
| HW | RMSE (cm) | 0.50 | 0.40 | 0.47 | 0.47 |
| MAE (cm) | 0.45 | 0.31 | 0.38 | 0.38 | |
| MRE | 1.84% | 1.29% | 1.55% | 1.58% | |
| HH | RMSE (cm) | 1.11 | 0.96 | 1.10 | 0.87 |
| MAE (cm) | 0.90 | 0.76 | 0.89 | 0.66 | |
| MRE | 1.59% | 1.34% | 1.58% | 1.16% | |
| BL | RMSE (cm) | 1.16 | 0.89 | 0.84 | 0.94 |
| MAE (cm) | 0.97 | 0.69 | 0.63 | 0.75 | |
| MRE | 1.05% | 0.74% | 0.69% | 0.82% | |
| MET (ms) | 17.98 | 5.99 | 27.10 | 12.32 | |
| MSE (kg2) | 11.699 | 7.357 | 7.057 | 6.236 | |
Figure 8Comparison between measured and estimated BW (a), SW (b), SH (c), HW (d), HH € and BL (f).
Figure 9Original image (a) and feature maps (b) output from the first convolutional layer of modified Xception.
Figure 10LabVIEW panel of the pig weight and body size estimation system.