Next Article in Journal
An Arterial Compliance Sensor for Cuffless Blood Pressure Estimation Based on Piezoelectric and Optical Signals
Next Article in Special Issue
Design and Implementation of a Prosthesis System Controlled by Electromyographic Signals Means, Characterized with Artificial Neural Networks
Previous Article in Journal
Wide-Angle Mini-Light-Emitting Diodes without Optical Lens for an Ultrathin Flexible Light Source
Previous Article in Special Issue
Dual U-Net-Based Conditional Generative Adversarial Network for Blood Vessel Segmentation with Reduced Cerebral MR Training Volumes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Towards the Estimation of Body Weight in Sheep Using Metaheuristic Algorithms from Biometric Parameters in Microsystems

by
Enrique Camacho-Pérez
1,2,
Alfonso Juventino Chay-Canul
3,
Juan Manuel Garcia-Guendulain
2,4 and
Omar Rodríguez-Abreo
2,4,*
1
Tecnológico Nacional de México/Instituto Tecnológico Superior Progreso, Progreso 97320, Mexico
2
Red de Investigación OAC Optimización, Automatización y Control, El Marques 76240, Mexico
3
División Académica de Ciencias Agropecuarias, Universidad Juárez Autónoma de Tabasco, km 25, Carretera Villahermosa-Teapa, R/A La Huasteca, Colonia Centro Tabasco 86280, Mexico
4
Industrial Technologies Division, Universidad Politécnica de Querétaro, El Marques 76240, Mexico
*
Author to whom correspondence should be addressed.
Micromachines 2022, 13(8), 1325; https://doi.org/10.3390/mi13081325
Submission received: 7 June 2022 / Revised: 2 August 2022 / Accepted: 12 August 2022 / Published: 16 August 2022
(This article belongs to the Special Issue Artificial Intelligence Integration with Micro-Nano Systems)

Abstract

:
The Body Weight (BW) of sheep is an important indicator for producers. Genetic management, nutrition, and health activities can benefit from weight monitoring. This article presents a polynomial model with an adjustable degree for estimating the weight of sheep from the biometric parameters of the animal. Computer vision tools were used to measure these parameters, obtaining a margin of error of less than 5%. A polynomial model is proposed after the parameters were obtained, where a coefficient and an unknown exponent go with each biometric variable. Two metaheuristic algorithms determine the values of these constants. The first is the most extended algorithm, the Genetic Algorithm (GA). Subsequently, the Cuckoo Search Algorithm (CSA) has a similar performance to the GA, which indicates that the value obtained by the GA is not a local optimum due to the poor parameter selection in the GA. The results show a Root-Mean-Squared Error (RMSE) of 7.68% for the GA and an RMSE of 7.55% for the CSA, proving the feasibility of the mathematical model for estimating the weight from biometric parameters. The proposed mathematical model, as well as the estimation of the biometric parameters can be easily adapted to an embedded microsystem.

1. Introduction

Livestock Body Weight (BW) is often used as a tool in feeding strategies [1,2], to estimate the intestinal microbiota [3], to assess growth [4], to assess the effects of heat stress [5], and to evaluate genetic selection [6]. In general, it has been an important parameter for both the research on and management of commercial farms around the world.
There are two principal methodologies to estimate the BW: the first is through direct measurements via scales, and the second is based on indirect measures of different parts of the body [7]. For indirect weight estimation, several methodologies have been implemented, such as those that use mathematical regression models to estimate the BW through morphological measurements [8,9]. Recently, these measurements have been improved with the application of technology, from digital images [10,11,12,13,14,15,16], stereo vision [17], Light Detection And Ranging (LiDAR) sensors [18], 3D images [19,20], to depth sensors [21,22,23]. Among the latter mentioned innovations, the Kinect® arises due to its low cost and easy implementation. It is used to estimate the weight, as well as for other livestock applications, such as measuring live cattle body parameters [24], the estimation of the muscle scores of live pigs [25], and sheep behavior recognition [26], among other studies.
The advancement of new technologies, studies, and processes in livestock has been complemented by Computer Vision (CV), which consists of a set of techniques used to analyze visual information, including its acquisition, transmission, processing, and understanding [27]. Some applications of this technology include the recognition of the behavior of pigs [28], cattle monitoring [29], automatic heat detection in cows [30], segmentation of body parts [31], and a wide variety of studies related to BW estimation, which are summarized in [32]. In addition to CV, new prediction models have also been implemented, especially those based on deep learning [33,34,35,36], which improves their performance when more information is provided. However, other methodologies, such as Metaheuristic Algorithms (MAs), do not require much data, which can be used to solve optimization or forecast problems. So far, there are few applications of metaheuristic algorithms to livestock; the few reported applications are for the optimization of resources [37,38] and logistics [39], but there are no reports regarding their direct application for the estimation of biometric parameters such as the ones presented here.
MAs are essentially high-level strategies that employ some specific tactics for exploring the search space to find a near-optimal solution(s) [40]. MAs have the most significant advantage over other methods because of their flexibility, which allows them to address a wide range of scientific problems in many areas, especially in engineering. Their flexibility is because they do not depend on the mathematical model of the studied system. Their simplicity and easy implementation allow them to solve most optimization and search problems [41]. The use of MAs as parameter estimators has been tested in various engineering applications, for example, in [42], the parameters of a motor were estimated from the angular speed and the current it consumed. Another example is the investigation in [43], in which the Rough-Enhanced-Bayes (REBMIX) mixture estimation algorithm was used to estimate the parameters of a mixture model.
Therefore, using two MAs is proposed as a novel method to estimate the BW: Genetic Algorithms (GAs) and the Cuckoo Search Algorithms (CSAs). The GA is commonly used to generate optimization and search problems, often employing the processes of natural evolution, such as inheritance, mutation, selection, and crossover. The GA has been shown to perform well in mixed (continuous and discrete) combinatorial problems [44]. The CSA proposed by Yang and Deb [45] is based on the Lévy flight behavior (or random walk model) and the parasitic behavior of broods. Cuckoos reproduce by laying their eggs in the nests of other birds for them to raise and feed their young. The cuckoos with the highest breeding success are the ones that lay eggs that are the most similar to their host’s, as an egg that is different will be detected and the host will either drop the egg or leave the nest. If a cuckoo’s egg in a host’s nest is considered a possible solution, the worst solutions will be abandoned, and new solutions will be sought. The new solutions will be searched through a Lévy flight, a search model of many animals and insects. In this type of flight, the animal searches in a straight path, then suddenly changes its direction, leading to an irregular scale-free search pattern. This type of flight benefits the search for new solutions as new areas in the search space are explored. These characteristics allow the CSA to be a highly efficient option for solving optimization problems in continuous functions [46].
There is a lack of published information on the use of metaheuristic algorithms to estimate important biometric parameters of livestock. Most of the works deal with issues of resource optimization. For example, in [47], the study attempted to posit a suitable strategy for optimal production with maximum resilience and sustainability in industrial dairy farms. Another type of application was given in [48], where a metaheuristic approach was presented for selecting optimal clusters in wireless body area networks to achieve an energy-efficient routing protocol for livestock health and behavior monitoring. In [37], two metaheuristic algorithms, MOPSO and MICA, were used to balance the broiler production process’s cost, time, and quality.
Currently, in the livestock field, there is interest in monitoring parameters through embedded systems, for example, in [49], the implementation of an electronic system specifically developed for real-time monitoring of feeding patterns in dairy cows was shown. In [50], an embedded system was presented that could track individual cows using ultra-wideband technology; in addition, social interactions between individuals around the feeding area were analyzed with a computer vision module. This work aims to develop a model based on biometric parameters to estimate the BW, using the GA and the CSA through a polynomial model with a variable degree adjusted by MAs; these biometric parameters can be acquired through a CV system that is suitable for implementation on embedded systems. Therefore, given many variables and taking advantage of the available information, a polynomial model is proposed, which has shown promising results in other areas [51,52].
Two algorithms are used to verify that the efficiency of the GA is not limited to a local optimum. Unlike the works described above, the proposal of this work uses the evolutionary computation branch to estimate the BW. This technique has an advantage over intelligent techniques based on Artificial Neural Networks (ANNs), which present a polynomial model and not a black box one, as in an ANN. The results show a Root-Mean-Squared Error (RMSE) of 7.68% for the GA and 7.55% for the CSA.

2. Materials and Methods

In this section, each of the stages for the construction of the mathematical model is developed in detail: from the handling of animals to the application of the metaheuristic algorithms. Figure 1 briefly shows the workflow of this study.

2.1. Animals, Diets, and Handling

In this investigation, were worked with Pelibuey sheep, which is a type of sheep that generally is not raised for wool. The animals were handled according to the Regulations for Ethical Animal Experimentation of the División Académica de Ciencias Agropecuarias of the Universidad Juárez Autónoma de Tabasco (ID project PFI: UJAT-DACA-2015-IA-02). The experiment was performed at the Southeastern Center for Ovine Integration (17° 78  N, 92° 96 W; 10 masl ). The data were collected from 56 non-pregnant and non-lactating Pelibuey ewes aged from four to 10 months with a mean BW of 30.31 ± 7.83 kg . The animals for the experiment were placed in raised slatted-floor cages with a feeding group in a feedlot system. The experimental diet was a total mixed ration (80:20 concentrate to forage ratio) comprising ground maize, soybean meal, star grass hay, vitamins, and mineral premix and had a crude protein level of 16% Dry Matter (DM) [53].

2.2. Image Acquisition

The Python programming language [54] and the Numpy [55], OpenCV [56], and Pandas [57] libraries were used to process and manipulate the images and the data obtained manually. The procedure followed is described next. First, an image acquisition program was developed to acquire data from a Kinect® sensor (Version 1) and implemented on a computer for data collection. For data acquisition, it should be considered that light is the sensed variable. Thus, sudden brightness changes should be avoided to obtain an adequate contrast between the animal and the background. Although the processing has a tolerance for changes, the measurements were made under a roof to prevent excess light. On the other hand, the sensor was ideally placed at 1.5 m. The camera calibration worked as long as the animal stayed between 1.2 and 1.8 m.
The Kinect® sensor was placed on the side of the animal, with a separation distance of approximately 1.5 m , allowing the entire body length’s registration. A reference line was added; a label with the identification number was placed on each animal, which helped identify them in the subsequent analysis (Figure 2).
With the Kinect® sensor, two images were obtained, a color image with a resolution of 640 × 480 pixels (Figure 3) and a depth image of 320 × 240 pixels (Figure 4). Each image was taken and recorded every second. Next, the color image was saved in a Portable Network Graphics (PNG) file and the depth file in the Comma-Separated Values (CSV) format. Finally, this last file was processed through the OpenCV and Numpy libraries of the Python programming language.
It was necessary to calibrate the depth images to obtain the actual measurements in the three spatial coordinates, which followed the procedure suggested in [58]. The calibration was tested on objects with regular shapes and some biometric measurements of sheep to ensure that the measurements were correct (see Figure 5).
In order to have only the sheep’s information and eliminate the background, a threshold cut was made on the Z-axis, removing the depth information of less than 1.2 and beyond 1.8 m. The appropriate value of the threshold was through multiple tests with the expected measurement conditions, and a two-dimensional histogram was obtained (Figure 6); this histogram was then converted to a 2D image with the conversion of 1 cm equivalent to 1 pixel (Figure 7).
Figure 8 shows the points and distances of interest to make the measurements. These points were selected from Figure 7, which was calibrated in centimeters. The points of interest were extracted with OpenCV tools showing the image, and the user only has to place a small cross on the points of interest measurements, which were stored automatically (Figure 9).
Then, these measurements were taken, and the calculations were executed considering that the scale for both the X- and Y-axes was in centimeters, that is 1 pixel is equal to 1 cm ; the Euclidean distances for each pair of points were previously defined; an example can be seen in Figure 10.

2.3. Body Measurements

The following Body Measurements (BMs) were recorded after data acquisition with the Kinect® sensor for each animal. The BMs were taken as described previously by [59]: Height at Withers (HW), Body Length (BL), Diagonal Body Length (BDL), Total Body Length (BTL), Rump Height (RH), Abdomen Semi-Circumference (ASC), Girth Semi-Circumference (GSC) (Figure 8). The letter K was added at the end to differentiate the measurements obtained by the Kinect® sensor. For example, the Height at Withers obtained by the Kinect® would be HWK.
All BMs were recorded in cm. A flexible fiberglass tape was used for the measurements. For BW, the animals were weighed using a digital scale (EQB Model, Torrey®, Monterrey, Mexico).

2.4. Polynomial Model for Weight Estimation

In the current study, a polynomial model is proposed. This type of model fits the data to a non-linear model. The biggest problem is the adjustment of the coefficients and the proper determination of the grade. This research used a polynomial model based on the biometric variables of the sheep to estimate the weight. The expression proposed with these variables is shown in Equation (1), and the variables and their nomenclature are shown in Table 1.
B W E = a 1 H W K a 8 + a 2 R H K a 9 + a 3 B L K a 10 + a 4 B D L K a 11 + a 5 B T L K a 12 + a 6 G S C K a 13 + a 7 A S C K a 14
The objective was to find the coefficients and exponents a n that minimize the actual and estimated weights’ error. The Root-Mean-Squared Error (RMSE) was used as a performance measure, defined by Equation (2). The solutions with a lower RMSE have a higher probability of hatching. A solution with an RMSE of 0 implies a prediction equal to the actual value. The RMSE magnifies errors of greater magnitude, but reduces those of lower magnitude. The errors expected in the estimates and experimental measurements are errors of low magnitude. Thus, the RMSE is an appropriate indicator for evaluating the algorithm’s performance.
R M S E = i = 1 n ( B W E B W ) 2 n
Metaheuristic search algorithms were used to estimate the 14 unknown coefficients. A significant advantage of using this type of algorithm is that it leaves the polynomial degree as an unknown. Given the complexity of the model, a logical option for flexibility and adaptability is metaheuristic algorithms. In this way, the metaheuristic algorithms analyze in each iteration the performance of the different degrees in each variable. For both algorithms, the same search limits were used. In the case of the coefficients, the search was limited between 0 and 5 and the coefficient values between 0 and 1.

2.5. Genetic Algorithm

One of the two algorithms used was a Genetic Algorithm (GA). This type of algorithm is inspired by the selection genes in natural selection. Usually, the individuals with the best genes have the most offspring. Under this principle, the search for the coefficients is carried out, with the best genes representing the combinations of coefficients and exponents that generate a lower RMSE.
This algorithm was chosen because it is the most extensive and widely used metaheuristic algorithm despite being a first-generation algorithm. Although there are multiple adaptations for its improvement, it is well known that all metaheuristic algorithms risk falling into local optima. This situation happens because they find a suitable solution and keep searching around that solution in the search space, but better solutions exist elsewhere in that space. The genetic algorithm is particularly prone to this because several specific search parameters must be tuned correctly, such as mutation percentage and individuals that can reproduce.
The version of this algorithm used is shown as pseudo-code in Algorithm 1. It goes through a stage of selection, one of mutation, and one of elitism. The complete search parameters used are shown in Table 2. These parameters were obtained through multiple runs based on the performance of the algorithm; however, it is important to note that there are various tuning methods such as CRS-Tuning [60], F-Race [61,62], and REVAC [63], which can be used to optimize the algorithm and other optimization techniques [64]. In particular, the use of these methods with a larger sample is recommended to compare the error reduction in future works.
Algorithm 1 Genetic algorithm with elitism
1:
Begin
2:
Generate initial population P based on random vectors with coefficients and exponents
3:
while fitness evaluations consumed limit <40,000 do
4:
    Evaluate fitness of P members
5:
    Selection of best P members based on their fitness
6:
    Crossover of best parents from P based on a random single point
7:
    Mutation in a part of the individuals based on a probability value
8:
    Create new population P based on most-fit individuals and elitism
9:
end while
10:
Save the best vector
11:
end

2.6. Cuckoo Search Algorithm

The Cuckoo Search Algorithm (CSA) is based on how cuckoo birds reproduce. For this, it uses other birds’ nests and places its eggs in them, hoping that the other birds will raise their young. Of course, some eggs will be discovered, but the more the foreign eggs resemble the host bird’s eggs, the more likely they will hatch. This behavior has been successfully adapted to a metaheuristic algorithm, an egg being in a nest being a possible solution.
The CSA has been widely used and has shown significant improvement combined with the Lévy flight. In this work, we decided to use this algorithm to verify that the hyperparameters used in the genetic algorithm did not affect the performance of the final model. The advantage of the CSA is that it contains only one specific parameter, which is the probability that the impostor egg will be discovered.
It should also be considered that it was not the objective of this study to demonstrate the superiority of one algorithm over another. In fact, according to the no free lunch theorem, all optimization algorithms have the same average performance [65]. This supposition implies that if an algorithm was more efficient in one task, it will be worse for another task. Therefore, tests must be carried out with at least two algorithms, for which the CSA was chosen to compare the results with the GA. The complete process of the algorithm is shown in the pseudo-code in Algorithm 2, and the search parameters are shown in Table 3.
Algorithm 2 Cuckoo search algorithm
1:
Begin
2:
Create random initial population of n host nests (vectors with coefficients and exponents)
3:
while fitness evaluations consumed limit <40,000 do
4:
    Obtain a cuckoo randomly by Lévy flights and evaluate fitness F i
5:
    Choose a nest among n (say, j) randomly
6:
    if  F i > F j  then
7:
        Replace j with the new solution
8:
    end if
9:
    Abandon a fraction P a of the worse nests and build new ones at the new values via Lévy flights
10:
    Rank the solutions and find the current best
11:
end while
12:
Save the best vector
13:
end
The same general parameters and same fitness evaluations consumed were used to make a fairer comparison between the algorithms [66,67,68].

3. Results

To understand the proximity of the measurements obtained with the Kinect® sensor and by manual methods, the calculation of the Pearson correlation coefficients was performed. Figure 11 shows the results of this correlation test.
Examining the pairs of values obtained, between the Kinect® and the corresponding ones by the manual method, they were found to range from 0.83 to 0.93, for HW and ASC, respectively, having an average of 0.90.
The two algorithms were executed with the parameters of Table 2 and Table 3. The results of the coefficients and exponents for both algorithms are presented in Table 4.
This implies that the model obtained by the genetic algorithm is described by Equation (3), while the CSA is represented by Equation (4).
0.057 ( H W K ) 4 + 0.209 ( R H K ) 3 + 0.22 ( B L K ) 4 + 0.009 ( B D L K ) + 0.548 ( B T L K ) 2 + 6.4 × 4 ( G S C K ) 4 + 0.026 ( A S C K ) 4
0.198 ( H W K ) 4 + 0.198 ( R H K ) 2 + 0.023 ( B L K ) 5 + 0.189 ( B D L K ) 5 + 0.422 ( B T L K ) 2 + 0.035 ( G S C K ) 4 + 0.0419 ( A S C K ) 3
With the previous equations, the statistical errors (Table 5) were obtained.
A cross-validation stage was required since the methods are based on random values. Therefore, 10 runs were carried out, and the average statistical values of these runs are shown in Table 6.
The convergence curves obtained for both algorithms are shown in Figure 12.
Finally, the comparison of the error between the real values and the estimated ones is given in Figure 13.
The results are discussed in depth in Section 4.

4. Discussion

Numerous studies show that biometric measurements are highly relevant for predicting the body weight of sheep, and many of them use different techniques such as Multiple Linear Regression (MLR), which is very simple and the most used, and in recent years, machine learning techniques. Nevertheless, there is a lack of studies in the literature using metaheuristic algorithms, but it is possible to compare the predictive accuracy of our approach based on the R 2 ( % ) values. In the case of models based on machine learning, Huma and Iqbal [69] proposed using seven biometric parameters for different models: regression trees (85.4%), linear model (86.1%), support vector machine (89.7%), and random forest (91.6%); it is necessary to mention that they used 131 Balochi sheep from Pakistan, and all of them were males, so all the values obtained were higher than those obtained in our study: 79.23% and 79.98% (Table 5). Canul-Solis et al. [70] used only one parameter to estimate the BW; this was the hip width, and they proposed three equations: linear, quadratic, and exponential, obtaining 96%, 96%, and 95%, respectively; in this study, 577 Pelibuey ewe lambs were used. Ansar et al. [71] estimated an R 2 ( % ) value of 64.5% for the Chi-squared Automatic Interaction Detector algorithm (CHAID) in the BW prediction based on nine parameters; for this study, they used Thalli sheep, while Mohammad et al. [72] estimated a higher R 2 ( % ) value of 72% for the CHAID algorithm, based on four parameters; in this case, indigenous sheep breeds from Pakistan were used. Roel et al. [73] carried out a study that used images of heifers, and they were processed using computer vision techniques to predict weight using deep neural networks; they obtained two models depending on the view: the side-view model had a coefficient of determination R 2 ( % ) of 91%, and the top-view model had an R 2 of 0.96%. Samperio et al. [74] proposed a system for estimating weight by means of 3D zenithal images from 272 lambs, obtaining an R 2 ( % ) of 86%. Other studies used the Kinect® sensor to estimate the BW, as was the case of Pezzuolo et al. [75]; this study proposed the use of two Kinect® sensors to estimate the BW of pigs, one for the lateral view and the other for the top section, where they obtained an R 2 ( % ) of 95%. Our proposal has the advantage of using a single Kinect®, which simplifies the acquisition of the images. Finally, Reference [32] is a review of studies based on CV that were carried out using algorithms based on linear regression and artificial neural networks for weight estimation. However, those studies did not mention the metaheuristic algorithms used in this work.
As shown in Table 7, previous works showed simple empirical formulas or models that cannot take advantage of all the variables that can be measured simultaneously with artificial vision.
The results in the measurement of the parameters via CV can be seen in the correlation matrix of Figure 11. It can be seen that the biometric parameter with the best correlation to the BW was RHK with 0.80. With all the parameters in this range [0.7 to 0.8], each biometric parameter used correlated highly with the BW. The real parameters and those obtained with the Kinect® sensor showed a minimum value of 0.83 and a maximum value of 0.93 for ASC and HW, respectively. These values might indicate that the measured values with respect to the real value have an average error of less than 10%. However, there were some atypical observations due to disturbances, such as sudden movements of the animals during the measurements. This situation caused some values, such as ASC in Sheep 31 and 32, to have atypical measurement errors: 50% and 52%, respectively. This error was reflected in the weight prediction by the algorithm, obtaining errors for those points of 25.7% and 27.7%. These point errors for Sheep 31 and 32 were still lower than the average reported, for example, by the Schaefferformula for Jersey Cross cattle body weight (kg), which was around 31%.
Table 5 shows the statistical indicators obtained by each algorithm. The performance of each algorithm was measured with the RMSE, defined by Equation (2). The GA obtained an RMSE of 7.68%, and the CSA obtained an RMSE of 7.55%. The difference between both algorithms was 0.13%. Regarding the correlation coefficient R 2 , the value for GA was 79.23% and 79.98%. This is a difference of only 0.75%. Although each algorithm found polynomials with a similar performance reflected in the RMSE and R 2 , each algorithm found a different local optimum. The objective of using two different metaheuristic algorithms was to compare other solutions with similar performance. Additionally, it was observed that, at the end of the process, neither algorithm presented a reduction of the RMSE. Thus, it is suggested for future or similar works to reduce the number of fitness evaluations.
The previous point was demonstrated by the results of both algorithms since the local optimum found by each one reflected a similar performance; however, it is observed in Table 4 that the parameters of each polynomial were different. Figure 12 demonstrates the performance of each algorithm in the search for the solution with the best fitness. While the GA converged to its optimum in fewer fitness evaluations, the CSA had a slightly better optimum. It can be summarized that the local optima for both algorithms were similar in performance.
Finally, Figure 13 shows the performance as a weight estimator of each algorithm. Both algorithms presented similar prediction trends. The sheep with ID 31 and 32 presented the largest errors in both algorithms. If they were considered atypical points, the accuracy of the algorithms would increase.

5. Conclusions

This research developed an intelligent estimator system based on evolutionary computation. A multivariate polynomial with an adjustable degree was adjusted based on the biometric parameters of Pelibuey sheep using metaheuristic algorithms. The polynomial models presented an RMSE of 7.68% for the GA and 7.55% for the CSA.
Methods based on CV to obtain biometric measurements were carried out without performing manual measurements. The approach showed an average of 0.9 in the measurements obtained from the Pearson correlation coefficient.
The results are encouraging, as they presented an estimate with an RMSE of less than 8% for both cases. Instead of using artificial intelligence techniques such as ANNs, the presented methodology is an alternative approach to estimating Body Weight (BW). A more significant amount of data is required and the errors are expected to be reduced with a more extensive database used to fit the multivariate polynomial. However, this type of study serves as a background to carry out more extensive investigations. On the other hand, this research can be improved with the use of hardware with higher performance. Another point implies obtaining a more extensive image preprocessing stage and a fixed data acquisition system, where the biometric parameters of a large number of sheep can be taken fluidly.
The proposed computational model was supported by artificial intelligence techniques, which can be difficult to adapt in microsystems. However, the proposed model is a polynomial, which is easily processed by any embedded device. On the other hand, OpenCV and the biometric parameters option can also be used for implementation in compatible microsystems in Python.

Author Contributions

Conceptualization, O.R.-A. and E.C.-P.; methodology, O.R.-A. and E.C.-P.; writing—original draft preparation, A.J.C.-C. and E.C.-P.; writing—review and editing, J.M.G.-G. and O.R.-A.; supervision, J.M.G.-G. and A.J.C.-C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author.

Acknowledgments

This research was performed with the help of the Autonomus University of Queretaro UAQ, Politechnic University of Queretaro UPQ, Juárez Autonomous University of Tabasco UJAT, and Technological Institute Superior of Progreso ITSP.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of the data; in the writing of the manuscript; nor in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
BWBody Weight
MAMetaheuristic Algorithms
CVComputer Vision
RMSERoot-Mean-Squared Error
GAGenetic Algorithm
CSACuckoo Search Algorithm
DMDry Matter
HWHeight at Withers
HWKHeight at Withers sensed by Kinect®
BLBody Length
BLKBody Length sensed by Kinect®
BDLBody Diagonal Length
BDLKBody Diagonal Length sensed by Kinect®
BTLBody Total Length
BTLKBody Total Length sensed by Kinect®
RHRump Height
RHKRump Height sensed by Kinect®
ASCAbdomen Semi-Circumference
ASCKAbdomen Semi-Circumference sensed by Kinect®
GSCGirth Semi-Circumference
GSCKGirth Semi-Circumference sensed by Kinect®
ANNArtificial Neural Network

References

  1. Reis, J.H.; Gebert, R.R.; Barreta, M.; Baldissera, M.D.; Dos Santos, I.D.; Wagner, R.; Campigotto, G.; Jaguezeski, A.M.; Gris, A.; de Lima, J.L.; et al. Effects of phytogenic feed additive based on thymol, carvacrol and cinnamic aldehyde on body weight, blood parameters and environmental bacteria in broilers chickens. Microb. Pathog. 2018, 125, 168–176. [Google Scholar] [CrossRef] [PubMed]
  2. Prokopieva, M.; Nesterova, O.; Sereda, N. On the use of feed supplements in the system of livestock technological modernization. In Proceedings of the IOP Conference Series: Earth and Environmental Science, Changchun, China, 21–23 August 2020; IOP Publishing: Bristol, UK, 2020; Volume 604, p. 012022. [Google Scholar]
  3. Han, G.G.; Lee, J.Y.; Jin, G.D.; Park, J.; Choi, Y.H.; Chae, B.J.; Kim, E.B.; Choi, Y.J. Evaluating the association between body weight and the intestinal microbiota of weaned piglets via 16S rRNA sequencing. Appl. Microbiol. Biotechnol. 2017, 101, 5903–5911. [Google Scholar] [CrossRef] [PubMed]
  4. Cominotte, A.; Fernandes, A.; Dorea, J.; Rosa, G.; Ladeira, M.; van Cleef, E.; Pereira, G.; Baldassini, W.; Neto, O.M. Automated computer vision system to predict body weight and average daily gain in beef cattle during growing and finishing phases. Livest. Sci. 2020, 232, 103904. [Google Scholar] [CrossRef]
  5. Johnson, J.S. Heat stress: Impact on livestock well-being and productivity and mitigation strategies to alleviate the negative effects. Anim. Prod. Sci. 2018, 58, 1404–1413. [Google Scholar] [CrossRef]
  6. Freetly, H.C.; Kuehn, L.A.; Thallman, R.M.; Snelling, W.M. Heritability and genetic correlations of feed intake, body weight gain, residual gain, and residual feed intake of beef cattle as heifers and cows. J. Anim. Sci. 2020, 98, skz394. [Google Scholar] [CrossRef] [PubMed]
  7. Wang, Z.; Shadpour, S.; Chan, E.; Rotondo, V.; Wood, K.M.; Tulpan, D. ASAS-NANP SYMPOSIUM: Applications of machine learning for livestock body weight prediction from digital images. J. Anim. Sci. 2021, 99, skab022. [Google Scholar] [CrossRef]
  8. Kunene, N.; Nesamvuni, A.; Nsahlai, I. Determination of prediction equations for estimating body weight of Zulu (Nguni) sheep. Small Rumin. Res. 2009, 84, 41–46. [Google Scholar] [CrossRef]
  9. Yilmaz, O.; Cemal, I.; Karaca, O. Estimation of mature live weight using some body measurements in Karya sheep. Trop. Anim. Health Prod. 2013, 45, 397–403. [Google Scholar] [CrossRef]
  10. Tasdemir, S.; Urkmez, A.; Inal, S. Determination of body measurements on the Holstein cows using digital image analysis and estimation of live weight with regression analysis. Comput. Electron. Agric. 2011, 76, 189–197. [Google Scholar] [CrossRef]
  11. Pradana, Z.H.; Hidayat, B.; Darana, S. Beef cattle weight determine by using digital image processing. In Proceedings of the 2016 International Conference on Control, Electronics, Renewable Energy and Communications (ICCEREC), Bandung, Indonesia, 13–15 September 2016; pp. 179–184. [Google Scholar]
  12. Paredes-Orta, C.; Valentin-Coronado, L.; Díaz-Ponce, A.; Rodríguez-Reséndiz, J.; Mendiola-Santibañez, J. Distortion Calculation Method Based on Image Processing for Automobile Lateral Mirrors. Micromachines 2022, 13, 401. [Google Scholar] [CrossRef]
  13. Sánchez-Reyes, L.M.; Rodríguez-Reséndiz, J.; Salazar-Colores, S.; Avecilla-Ramírez, G.; Pérez-Soto, G. A high-accuracy mathematical morphology and multilayer perceptron-based approach for melanoma detection. Appl. Sci. 2020, 10, 1098. [Google Scholar] [CrossRef]
  14. Gallegos-Duarte, M.; Mendiola-Santibanez, J.; Ibrahimi, D.; Paredes-Orta, C.; Rodriguez-Resendiz, J.; Gonzalez-Gutierrez, C. A Novel Method for Measuring Subtle Alterations in Pupil Size in Children with Congenital Strabismus. IEEE Access 2020, 8, 125331–125344. [Google Scholar] [CrossRef]
  15. Salazar-Colores, S.; Ramos-Arreguín, J.M.; Pedraza-Ortega, J.C.; Rodríguez-Reséndiz, J. Efficient single image dehazing by modifying the dark channel prior. Eurasip J. Image Video Process. 2019, 2019, 1–8. [Google Scholar] [CrossRef]
  16. Salazar-Colores, S.; Ramos-Arreguín, J.M.; Ortiz Echeverri, C.; Cabal-Yepez, E.; Pedraza-Ortega, J.C.; Rodriguez-Resendiz, J. Image dehazing using morphological opening, dilation and Gaussian filtering. Signal Image Video Process. 2018, 12, 1329–1335. [Google Scholar] [CrossRef]
  17. Menesatti, P.; Costa, C.; Antonucci, F.; Steri, R.; Pallottino, F.; Catillo, G. A low-cost stereovision system to estimate size and weight of live sheep. Comput. Electron. Agric. 2014, 103, 33–38. [Google Scholar] [CrossRef]
  18. Huang, L.; Li, S.; Zhu, A.; Fan, X.; Zhang, C.; Wang, H. Non-contact body measurement for qinchuan cattle with LiDAR sensor. Sensors 2018, 18, 3014. [Google Scholar] [CrossRef]
  19. Miller, G.A.; Hyslop, J.J.; Barclay, D.; Edwards, A.; Thomson, W.; Duthie, C.A. Using 3D imaging and machine learning to predict liveweight and carcass characteristics of live finishing beef cattle. Front. Sustain. Food Syst. 2019, 3, 30. [Google Scholar] [CrossRef]
  20. Le Cozler, Y.; Allain, C.; Xavier, C.; Depuille, L.; Caillot, A.; Delouard, J.; Delattre, L.; Luginbuhl, T.; Faverdin, P. Volume and surface area of Holstein dairy cows calculated from complete 3D shapes acquired using a high-precision scanning system: Interest for body weight estimation. Comput. Electron. Agric. 2019, 165, 104977. [Google Scholar] [CrossRef]
  21. Kongsro, J. Estimation of pig weight using a Microsoft Kinect prototype imaging system. Comput. Electron. Agric. 2014, 109, 32–35. [Google Scholar] [CrossRef]
  22. Condotta, I.C.; Brown-Brandl, T.M.; Silva-Miranda, K.O.; Stinn, J.P. Evaluation of a depth sensor for mass estimation of growing and finishing pigs. Biosyst. Eng. 2018, 173, 11–18. [Google Scholar] [CrossRef]
  23. Fernandes, A.F.; Dórea, J.R.; Fitzgerald, R.; Herring, W.; Rosa, G.J. A novel automated system to acquire biometric and morphological measurements and predict body weight of pigs via 3D computer vision. J. Anim. Sci. 2019, 97, 496–508. [Google Scholar] [CrossRef] [PubMed]
  24. Ruchay, A.N.; Dorofeev, K.A.; Kalschikov, V.V.; Kolpakov, V.I.; Dzhulamanov, K.M. A depth camera-based system for automatic measurement of live cattle body parameters. IOP Conf. Ser. Earth Environ. Sci. 2019, 341, 012148. [Google Scholar] [CrossRef]
  25. Alsahaf, A.; Azzopardi, G.; Ducro, B.; Hanenberg, E.; Veerkamp, R.F.; Petkov, N. Estimation of muscle scores of live pigs using a kinect camera. IEEE Access 2019, 7, 52238–52245. [Google Scholar] [CrossRef]
  26. Xu, J.; Wu, Q.; Zhang, J.; Tait, A. Automatic Sheep Behaviour Analysis Using Mask R-CNN. In Proceedings of the 2021 Digital Image Computing: Techniques and Applications (DICTA), Gold Coast, Australia, 29 November–1 December 2021; pp. 01–06. [Google Scholar]
  27. Lemley, J.; Bazrafkan, S.; Corcoran, P. Deep Learning for Consumer Devices and Services: Pushing the limits for machine learning, artificial intelligence, and computer vision. IEEE Consum. Electron. Mag. 2017, 6, 48–56. [Google Scholar] [CrossRef]
  28. Chen, C.; Zhu, W.; Norton, T. Behaviour recognition of pigs and cattle: Journey from computer vision to deep learning. Comput. Electron. Agric. 2021, 187, 106255. [Google Scholar] [CrossRef]
  29. Tiwari, A.; Sachdeva, K.; Jain, N. Computer Vision and Deep Learningbased Framework for Cattle Monitoring. In Proceedings of the 2021 IEEE 8th Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON), Dehradun, Uttarakhand, 11–13 November 2021; pp. 1–6. [Google Scholar]
  30. Chowdhury, S.; Verma, B.; Roberts, J.; Corbet, N.; Swain, D. Deep learning based computer vision technique for automatic heat detection in cows. In Proceedings of the 2016 International Conference on Digital Image Computing: Techniques and Applications (DICTA), Gold Coast, Australia, 30 November–2 December 2016; pp. 1–6. [Google Scholar]
  31. Jia, N.; Kootstra, G.; Koerkamp, P.G.; Shi, Z.; Du, S. Segmentation of body parts of cows in RGB-depth images based on template matching. Comput. Electron. Agric. 2021, 180, 105897. [Google Scholar] [CrossRef]
  32. Dohmen, R.; Catal, C.; Liu, Q. Computer vision-based weight estimation of livestock: A systematic literature review. N. Z. J. Agric. Res. 2021, 65, 227–247. [Google Scholar] [CrossRef]
  33. Liseune, A.; Salamone, M.; Van den Poel, D.; Van Ranst, B.; Hostens, M. Predicting the milk yield curve of dairy cows in the subsequent lactation period using deep learning. Comput. Electron. Agric. 2021, 180, 105904. [Google Scholar] [CrossRef]
  34. Kim, Y.J.; Park, D.H.; Park, H.; Kim, S.H. Pig datasets of livestock for deep learning to detect posture using surveillance camera. In Proceedings of the 2020 International Conference on Information and Communication Technology Convergence (ICTC), Jeju Islan, Korea, 21–23 October 2020; pp. 1196–1198. [Google Scholar]
  35. Qiao, Y.; Su, D.; Kong, H.; Sukkarieh, S.; Lomax, S.; Clark, C. Individual cattle identification using a deep learning based framework. IFAC-PapersOnLine 2019, 52, 318–323. [Google Scholar] [CrossRef]
  36. Karegowda, A.G.; Devika, G.; Geetha, M. Deep learning solutions for agricultural and farming activities. In Deep Learning Applications and Intelligent Decision Making in Engineering; IGI Global: Hershey, PA, USA, 2021; pp. 256–287. [Google Scholar]
  37. Moghadam, E.K.; Sharifi, M.; Rafiee, S.; Chang, Y.K. Time–Cost–Quality Trade-Off in a Broiler Production Project Using Meta-Heuristic Algorithms: A Case Study. Agriculture 2020, 10, 3. [Google Scholar] [CrossRef]
  38. Nie, Y.; Avraamidou, S.; Li, J.; Xiao, X.; Pistikopoulos, E.N. Land use modeling and optimization based on food-energy-water nexus: A case study on crop-livestock systems. In Computer Aided Chemical Engineering, Proceedings of the 13th International Symposium on Process Systems Engineering (PSE 2018), Amsterdam, The Netherlands, 1–5 July 2018; Eden, M.R., Ierapetritou, M.G., Towler, G.P., Eds.; Elsevier: Amsterdam, The Netherlands, 2018; Volume 44, pp. 1939–1944. [Google Scholar] [CrossRef]
  39. Benvenga, M.A.C.; de Alencar Nääs, I. Application of Hybrid Metaheuristic Optimization Algorithm (SAGAC) in Beef Cattle Logistics. In Proceedings of the Advances in Production Management Systems. Artificial Intelligence for Sustainable and Resilient Production Systems, Nantes, France, 5–9 September; Dolgui, A., Bernard, A., Lemoine, D., von Cieminski, G., Romero, D., Eds.; Springer International Publishing: Cham, Switzerland, 2021; pp. 585–593. [Google Scholar]
  40. Liao, T.W.; Li, G. Metaheuristic-based inverse design of materials–a survey. J. Mater. 2020, 6, 414–430. [Google Scholar] [CrossRef]
  41. Li, S.; Gong, W.; Gu, Q. A comprehensive survey on meta-heuristic algorithms for parameter extraction of photovoltaic models. Renew. Sustain. Energy Rev. 2021, 141, 110828. [Google Scholar] [CrossRef]
  42. Jesenik, M.; Hamler, A.; Trbušić, M.; Trlep, M. The Use of Evolutionary Methods for the Determination of a DC Motor and Drive Parameters Based on the Current and Angular Speed Response. Mathematics 2020, 8, 1269. [Google Scholar] [CrossRef]
  43. Panić, B.; Klemenc, J.; Nagode, M. Improved Initialization of the EM Algorithm for Mixture Model Parameter Estimation. Mathematics 2020, 8, 373. [Google Scholar] [CrossRef]
  44. Fatimaezzahra, M.; Mohamed, S.; Abdelaziz, E. ‘A combined cuckoo search algorithm and genetic algorithm for parameter optimization in computer vision. Int. J. Appl. Eng. Res 2017, 51, 12940–12954. [Google Scholar]
  45. Yang, X.S.; Deb, S. Cuckoo search via Lévy flights. In Proceedings of the 2009 World Congress on Nature & Biologically Inspired Computing (NaBIC), Coimbatore, India, 9–11 December 2009; pp. 210–214. [Google Scholar]
  46. Fister, I.; Yang, X.S.; Fister, D. Cuckoo search: A brief literature review. Cuckoo Search Firefly Algorithm 2014, 2014, 49–62. [Google Scholar]
  47. Hassani, L.; Daneshvar kakhki, M.; Sabouhi sabouni, M.; Ghanbari, R. The optimization of resilience and sustainability using mathematical programming models and metaheuristic algorithms. J. Clean. Prod. 2019, 228, 1062–1072. [Google Scholar] [CrossRef]
  48. Saleem, F.; Majeed, M.N.; Iqbal, J.; Waheed, A.; Rauf, A.; Zareei, M.; Mohamed, E.M. Ant Lion Optimizer Based Clustering Algorithm for Wireless Body Area Networks in Livestock Industry. IEEE Access 2021, 9, 114495–114513. [Google Scholar] [CrossRef]
  49. Deniz, N.N.; Chelotti, J.O.; Galli, J.R.; Planisich, A.M.; Larripa, M.J.; Rufiner, H.L.; Giovanini, L.L. Embedded system for real-time monitoring of foraging behavior of grazing cattle using acoustic signals. Comput. Electron. Agric. 2017, 138, 167–174. [Google Scholar] [CrossRef]
  50. Ren, K.; Bernes, G.; Hetta, M.; Karlsson, J. Tracking and analysing social interactions in dairy cattle with real-time locating system and machine learning. J. Syst. Archit. 2021, 116, 102139. [Google Scholar] [CrossRef]
  51. Besharat, F.; Dehghan, A.A.; Faghih, A.R. Empirical models for estimating global solar radiation: A review and case study. Renew. Sustain. Energy Rev. 2013, 21, 798–821. [Google Scholar] [CrossRef]
  52. Ostertagová, E. Modelling using Polynomial Regression. Procedia Eng. 2012, 48, 500–506. [Google Scholar] [CrossRef]
  53. AFRC. Energy and Protein Requirements of Ruminants; Agricultural and Food Research Council: Wuhan, China, 1993. [Google Scholar]
  54. Van Rossum, G.; Drake, F.L., Jr. Python Reference Manual; Centrum voor Wiskunde en Informatica: Amsterdam, The Netherlands, 1995. [Google Scholar]
  55. Harris, C.R.; Millman, K.J.; van der Walt, S.J.; Gommers, R.; Virtanen, P.; Cournapeau, D.; Wieser, E.; Taylor, J.; Berg, S.; Smith, N.J.; et al. Array programming with NumPy. Nature 2020, 585, 357–362. [Google Scholar] [CrossRef] [PubMed]
  56. Bradski, G. The OpenCV Library. Dr. Dobb’S J. Softw. Tools 2000, 25, 120–123. [Google Scholar]
  57. McKinney, W. Data Structures for Statistical Computing in Python. In Proceedings of the 9th Python in Science Conference, Austin, TX, USA, 28 June–3 July 2010; van der, S., Millman, W.J., Eds.; 2010; pp. 56–61. [Google Scholar] [CrossRef]
  58. Pagliari, D.; Pinto, L. Calibration of Kinect for Xbox One and Comparison between the Two Generations of Microsoft Sensors. Sensors 2015, 15, 27569–27589. [Google Scholar] [CrossRef]
  59. Bautista-Díaz, E.; Salazar-Cuytun, R.; Chay-Canul, A.J.; Garcia Herrera, R.A.; Piñeiro-Vázquez, Á.T.; Magaña Monforte, J.T.; Tedeschi, L.O.; Cruz-Hernández, A.; Gómez-Vázquez, A. Determination of carcass traits in Pelibuey ewes using biometric measurements. Small Rumin. Res. 2017, 147, 115–119. [Google Scholar] [CrossRef]
  60. Veček, N.; Mernik, M.; Filipič, B.; Črepinšek, M. Parameter tuning with Chess Rating System (CRS-Tuning) for meta-heuristic algorithms. Inf. Sci. 2016, 372, 446–469. [Google Scholar] [CrossRef]
  61. Montero, E.; Riff, M.C.; Neveu, B. A beginner’s guide to tuning methods. Appl. Soft Comput. 2014, 17, 39–51. [Google Scholar] [CrossRef]
  62. Birattari, M.; Stützle, T.; Paquete, L.; Varrentrapp, K. A Racing Algorithm for Configuring Metaheuristics; Schloss Dagstuhl: Wadern, Germany, 2002; pp. 11–18. [Google Scholar]
  63. Nannen, V.; Eiben, A.E. Efficient relevance estimation and value calibration of evolutionary algorithm parameters. In Proceedings of the 2007 IEEE Congress on Evolutionary Computation, Singapore, 25–28 September 2007; pp. 103–110. [Google Scholar] [CrossRef]
  64. Das, S.; Mullick, S.S.; Suganthan, P. Recent advances in differential evolution—An updated survey. Swarm Evol. Comput. 2016, 27, 1–30. [Google Scholar] [CrossRef]
  65. Adam, S.P.; Alexandropoulos, S.A.N.; Pardalos, P.M.; Vrahatis, M.N. No Free Lunch Theorem: A Review. In Approximation and Optimization: Algorithms, Complexity and Applications; Demetriou, I.C., Pardalos, P.M., Eds.; Springer International Publishing: Cham, Switzerland, 2019; pp. 57–82. [Google Scholar] [CrossRef]
  66. Črepinšek, M.; Liu, S.H.; Mernik, M. Replication and comparison of computational experiments in applied evolutionary computing: Common pitfalls and guidelines to avoid them. Appl. Soft Comput. 2014, 19, 161–170. [Google Scholar] [CrossRef]
  67. Aranha, C.; Camacho Villalon, C.L.; Campelo, F.; Dorigo, M.; Ruiz, R.; Sevaux, M.; Sorensen, K.; Stutzle, T. Metaphor-based metaheuristics, a call for action: The elephant in the room. Swarm Intell. 2022, 16, 1–6. [Google Scholar] [CrossRef]
  68. Mernik, M.; Liu, S.H.; Karaboga, D.; Črepinšek, M. On clarifying misconceptions when comparing variants of the Artificial Bee Colony Algorithm by offering a new implementation. Inf. Sci. 2015, 291, 115–127. [Google Scholar] [CrossRef]
  69. Huma, Z.E.; Iqbal, F. Predicting the body weight of Balochi sheep using a machine learning approach. Turk. J. Vet. Anim. Sci. 2019, 43, 500–506. [Google Scholar] [CrossRef]
  70. Canul-Solis, J.; Angeles-Hernandez, J.C.; García-Herrera, R.A.; del Razo-Rodríguez, O.E.; Lee Rangel, H.A.; Piñeiro-Vazquez, A.T.; Casanova-Lugo, F.; Rosales Nieto, C.A.; Chay-Canul, A.J. Estimation of body weight in hair ewes using an indirect measurement method. Trop. Anim. Health Prod. 2020, 52, 2341–2347. [Google Scholar] [CrossRef] [PubMed]
  71. Abbas, A.; Ullah, M.A.; Waheed, A. Body weight prediction using different data mining algorithms in Thalli sheep: A comparative study. Vet. World 2021, 14, 2332. [Google Scholar] [CrossRef]
  72. Mohammad, M.; Rafeeq, M.; Bajwa, M.; Awan, M.; Abbas, F.; Waheed, A.; Bukhari, F.; Akhtar, P. Prediction of body weight from body measurements using regression tree (RT) method for indigenous sheep breeds in Balochistan, Pakistan. J. Anim. Plant Sci. 2012, 22, 20–24. [Google Scholar]
  73. Dohmen, R.; Catal, C.; Liu, Q. Image-based body mass prediction of heifers using deep neural networks. Biosyst. Eng. 2021, 204, 283–293. [Google Scholar] [CrossRef]
  74. Samperio, E.; Lidón, I.; Rebollar, R.; Castejón-Limas, M.; Álvarez Aparicio, C. Lambs’ live weight estimation using 3D images. Animal 2021, 15, 100212. [Google Scholar] [CrossRef]
  75. Pezzuolo, A.; Guarino, M.; Sartori, L.; González, L.A.; Marinello, F. On-barn pig weight estimation based on body measurements by a Kinect v1 depth camera. Comput. Electron. Agric. 2018, 148, 29–36. [Google Scholar] [CrossRef]
  76. Wangchuk, K.; Wangdi, J.; Mindu, M. Comparison and reliability of techniques to estimate live cattle body weight. J. Appl. Anim. Res. 2018, 46, 349–352. [Google Scholar] [CrossRef]
  77. Brown, J.; Fitzhugh, H., Jr.; Cartwright, T. A comparison of nonlinear models for describing weight-age relationships in cattle. J. Anim. Sci. 1976, 42, 810–818. [Google Scholar] [CrossRef]
  78. Blasco, A.; Piles, M.; Varona, L. A Bayesian analysis of the effect of selection for growth rate on growth curves in rabbits. Genet. Sel. Evol. 2003, 35, 21–41. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Workflow of the main stages carried out in this study.
Figure 1. Workflow of the main stages carried out in this study.
Micromachines 13 01325 g001
Figure 2. Configuration of the area for data collection.
Figure 2. Configuration of the area for data collection.
Micromachines 13 01325 g002
Figure 3. RGB image from the Kinect® sensor.
Figure 3. RGB image from the Kinect® sensor.
Micromachines 13 01325 g003
Figure 4. Depth image from the Kinect® sensor.
Figure 4. Depth image from the Kinect® sensor.
Micromachines 13 01325 g004
Figure 5. Calibration tests.
Figure 5. Calibration tests.
Micromachines 13 01325 g005
Figure 6. Segmented depth histogram on the Z-axis.
Figure 6. Segmented depth histogram on the Z-axis.
Micromachines 13 01325 g006
Figure 7. Two-dimensional image with the information on the X-axis and the Y-axis.
Figure 7. Two-dimensional image with the information on the X-axis and the Y-axis.
Micromachines 13 01325 g007
Figure 8. Schematic of the body measurements.
Figure 8. Schematic of the body measurements.
Micromachines 13 01325 g008
Figure 9. Interface where the user places the points of interest to generate the measurements.
Figure 9. Interface where the user places the points of interest to generate the measurements.
Micromachines 13 01325 g009
Figure 10. Example of BDL obtained by the Kinect® sensor.
Figure 10. Example of BDL obtained by the Kinect® sensor.
Micromachines 13 01325 g010
Figure 11. Correlation matrix of the biometric parameters.
Figure 11. Correlation matrix of the biometric parameters.
Micromachines 13 01325 g011
Figure 12. Function costs for both algorithms.
Figure 12. Function costs for both algorithms.
Micromachines 13 01325 g012
Figure 13. Comparison between real weights’ values and estimated weights. (a) Comparison using the genetic algorithm; (b) Comparison using the cuckoo search algorithm.
Figure 13. Comparison between real weights’ values and estimated weights. (a) Comparison using the genetic algorithm; (b) Comparison using the cuckoo search algorithm.
Micromachines 13 01325 g013
Table 1. Biometric variables used as elements of the polynomial model.
Table 1. Biometric variables used as elements of the polynomial model.
Biometric VariablesNomenclature
Height at Withers sensed by Kinect®HWK
Rump Height sensed by Kinect®RHK
Body Length sensed by Kinect®BLK
Body Diagonal Length sensed by Kinect®BDLK
Body Total Length sensed by Kinect®BTLK
Girth Semi-Circumference sensed by Kinect®GSCK
Abdomen Semi-Circumference sensed by Kinect®ASCK
Body Weight EstimatedBWE
Table 2. Search parameters used for the genetic algorithm.
Table 2. Search parameters used for the genetic algorithm.
ParameterValueDescription
Population size200Number of individuals (random solutions)
Termination condition: fitness evaluations consumed limit≤40,000Maximum number of times the fitness function is evaluated
Biological pressure85%Percentage of individuals that reproduce
Elitism10%Percentage of best individuals whose reproduction is guaranteed
Mutation probability30%Probability that an individual will mutate
Crossover typeSingle-point crossoverA random point in a parent is selected to combine the two parents
Selection methodRank selectionThe individual with the best performance has the best rank; the individual with the best rank has a higher probability of reproducing
Coefficient search range[0–1]Float limits values for each coefficient
Exponent search range[0–5]Integer limits values for each exponent
Table 3. Search parameters used for the cuckoo search algorithm.
Table 3. Search parameters used for the cuckoo search algorithm.
ParameterValueDescription
Termination condition: fitness evaluations consumed limit≤40,000Number of times the fitness function is evaluated
Nests200Population size
Eggs a n Random coefficients and exponents
Pa25%Probability of foreign eggs being discovered
Coefficient search range[0–1]Float limits values for each coefficient
Exponent search range[0–5]Integer limits values for each exponent
Table 4. Results of the coefficients and exponents obtained for both algorithms.
Table 4. Results of the coefficients and exponents obtained for both algorithms.
CoefficientsGACSA
a 1 0.0570.198
a 2 0.2090.198
a 3 0.2200.023
a 4 0.0090.189
a 5 0.5980.422
a 6 6.4 × 10 4 0.035
a 7 0.0260.0419
a 8 44
a 9 32
a 10 45
a 11 15
a 12 22
a 13 44
a 14 43
Table 5. Statistical errors of the models obtained by the GA and CSA.
Table 5. Statistical errors of the models obtained by the GA and CSA.
EstimatorGACSA
RMSE (%)7.687.55
R 2 (%)79.2379.98
MBE (%)0.332.26
MAPE (%)9.459.97
Table 6. Cross-validation with 10 runs for the GA and CSA.
Table 6. Cross-validation with 10 runs for the GA and CSA.
EstimatorGACSA
RMSE (%)8.839.68
R 2 (%)72.4666.59
MBE (%)1.430.95
MAPE (%)10.8311.2
Table 7. Mathematical models.
Table 7. Mathematical models.
TechniqueEquationReferences
Agarwal’s formula a W = ( G i r t h × l e n g t h ) / Y  [76]
Schaeffer’s formula b W = ( L × G 2 ) / 300  [76]
Logistic model c Y = A ( 1 + e K t ) M  [77]
Gompertz c Y = A e x p ( B e k t )  [78]
Von Bertalanffy c Y = A ( 1 B e k t ) 3  [77]
aY is equal to 9.0 if the girth is less than 65 inches; Y is equal to 8.5 if the girth is between 65 and 80 inches; Y is equal to 8.0 if the girth is over 80 inches. b L is the length of the animal from the point of the shoulder to the pin bone in inches, and G is the chest girth of the animal in inches. c A is the body weight (asymptotic), namely the value of t approaches infinity; B is the scale parameter (the value of the integral constant); e is the logarithm base (2.718282); k is the average rate of growth of the body until the animal reaches body maturity; M is the value of the function in the search for the inflection point (curve shape); t is the time in units of the month.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Camacho-Pérez, E.; Chay-Canul, A.J.; Garcia-Guendulain, J.M.; Rodríguez-Abreo, O. Towards the Estimation of Body Weight in Sheep Using Metaheuristic Algorithms from Biometric Parameters in Microsystems. Micromachines 2022, 13, 1325. https://doi.org/10.3390/mi13081325

AMA Style

Camacho-Pérez E, Chay-Canul AJ, Garcia-Guendulain JM, Rodríguez-Abreo O. Towards the Estimation of Body Weight in Sheep Using Metaheuristic Algorithms from Biometric Parameters in Microsystems. Micromachines. 2022; 13(8):1325. https://doi.org/10.3390/mi13081325

Chicago/Turabian Style

Camacho-Pérez, Enrique, Alfonso Juventino Chay-Canul, Juan Manuel Garcia-Guendulain, and Omar Rodríguez-Abreo. 2022. "Towards the Estimation of Body Weight in Sheep Using Metaheuristic Algorithms from Biometric Parameters in Microsystems" Micromachines 13, no. 8: 1325. https://doi.org/10.3390/mi13081325

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop