1. Introduction
Body condition score (BCS) is a quantitative and subjective indicator of an animal's ability to deposit body fat, and it has been proposed as one of the methods to increase reproductive efficiency of herds. BCS does not increase reproductive efficiency by itself, but the evaluation of BCS and the management associated with these records allow improving the reproductive efficiency of the herd. These scores in cattle are evaluated by assigning an index on a scale that varies by breed and country. In Uruguay, a scale of classification of body condition by visual appreciation, developed for dairy cattle1, was adapted for Hereford cows. Most national scientific papers use this scale, which consists of 8 categories, where 1 represents a very skinny cow while 8 represents an extremely fat cow2. Extreme values of BCS are related to low productivity, lower pregnancy rate, and health risks.
Traditional methods of evaluation (palpation, visual assessment), although fast, require a trained assessor and have the disadvantage of being subjective, as it depends on each evaluator's assessment to assign a different score for the same cow3. The evaluation can be tedious when large numbers of animals are analyzed, and large volumes of data are generated in the field. Ferguson and others4) and Bewley and others5 determined that trained raters obtain equivalent results in direct observations as when analyzing photographic images, finding that 80% and 90%, respectively, of the ratings made from images matched the BCS observed in the field with an accuracy level of ± 0.25 points. Therefore, the use of more objective methods to determine BCS, independent of trained observers, would allow a better training of observers and a massive use in cattle farms.
There is currently an intense field of research worldwide aimed at developing objective methods for the determination of BCS, and different alternative techniques have been tested. In general, the advantage of automated or semi-automated methods lies in speeding up the evaluation process and achieving greater objectivity. In addition to this, there is a growing availability of information and communication technologies (ICT), which allows obtaining more and better information to support the decision making that farmers face daily.
Regarding the automation process of body condition measurement, there are works that require a manual selection of images to build the method to differentiate the levels of fat reserves of cows6)(7; while in others it is necessary to additionally identify reference points that facilitate the extraction of features from the images used5)(8. Other authors have implemented fully automated systems using thermal imaging9)(10.
Currently, work on body condition measurement based on 2D/3D sensors shows significant advances. The equipment using 2D cameras is based on capturing images mainly from rear or top views to analyze the dorsal area, obtaining a two-dimensional projection of the animal11)(12. On the other hand, the use of 3D sensors provides more information about the surface of the animal13)(14. Zin and others15, using 3D cameras, extracted surface roughness parameters for BCS prediction by regression analysis with 3D sensors. Machine learning techniques have also gained popularity in obtaining BCS from sensor data16. Song and others17 improved automated BCS classification using features related to 8 body regions. An important consideration about these approaches is that many labeled images with an equal distribution are required to achieve higher accuracy in the system, which limits their applications in small and medium-sized farms. Other considerations have to do with the higher cost of 3D sensors relative to 2D sensors, which means that for the time being they will not completely replace 2D tools in automatic BCS assessment16. While 3D sensors have their advantages over 2D sensors, the former have a higher cost, and the processing and related algorithms are more complex.
In Uruguay, methods have been developed to determine carcass variables (steak eye area, subcutaneous fat thickness, and intramuscular fat content) through the interpretation of ultrasound and RGB images18)(19)(20. Based on this background, the objective of this work was to develop a practical and more reproducible method to evaluate BCS, non-invasive for the animal, through a guided image classification process using images taken in the field.
2. Materials and methods
The experimental protocol (020300-000845-20) was approved and performed in accordance with the animal experimentation norms of the Comisión Honoraria de Experimentación Animal, CHEA, University of the Republic, Uruguay. The general idea of the methodology is the determination of BCS from photographic images. For the determination, a guided classification is performed by comparing a photo to be classified with respect to a set of previously calibrated images. This methodology is like the one proposed by Vizcarra and others2, but assisted by a bank of pre-calibrated images and guided by a software. Hereafter this software is referred to as cond_corp.
The work was carried out jointly by researchers from the Faculties of Agronomy and Engineering of the University of the Republic (Udelar, Uruguay), with the aim of linking knowledge and methodologies from different areas to achieve a technological tool that, in the medium term, could be applied by livestock farmers in Uruguay.
2.1 Determination of the image bank
The aim of the guided classification is to construct a set of images classified first by experts. This set is specific to each breed and can also be tuned for the different seasons of the year. Fieldwork was carried out in the Experimental Station of the Faculty of Agronomy (“Dr. Mario A. Cassinoni”, EEMAC), and in commercial farms, in the period between the years 2013 and 201921)(22)(23)(24)(25)(26.
At different times of the year, a total of more than 1000 images were taken of cows of different breeds (Braford, Hereford, Aberdeen Angus, and their crossbreeds) and age-categories. The images were taken in the livestock facilities, using the scale box, and the camera was installed at a fixed distance from the animals. Each animal was graded with a BCS by each observer by visual assessment.
In the initial stage of this work21 the information provided by images taken at different heights and distances with respect to the animal was evaluated. Photographic images taken at 3 combinations of heights, distances and angles were evaluated. The evaluation was made by observers trained in body condition scoring by answering the following questions:
Which areas of the animal do you observe to define BCS?
In which order do you observe these areas?
Are you able to define the degree of BCS by observing photographs?
Are you able to define the degree of BCS by observing only one photograph?
Which is the best combination angle/distance to determinate the BCS from the images?
Based on the answers obtained, the best location of the camera was defined, being the best placement at a height of 175 cm and a distance of 125 cm from the cow, with an angle of 54°, as shown in Figure 1.
2.2 Image database
In parallel to image acquisition, each cow was graded by 3 observers trained in BCS by visual appreciation, using the scale validated by Vizcarra and others2, also identifying the number of each animal. Since 2006, livestock breeders have been registering 100% of calf births through the National Livestock Identification System (SNIG)27. With the most representative images of each point of the scale, reference image bases were created for Braford, Hereford, Angus breeds and their crosses.
At this stage, a set of photos were collected (one photo per cow), corresponding to about 1000 different cows, labeled with the average BCS made by the expert observers by visual appreciation. Each photo was identified with the identification number (ID) corresponding to each animal.
Finally, to construct the program's database, the photographs with the greatest number of coincidences between the experts were used. Four image databases were created, for the Braford, Hereford, Angus breeds, and their F1 crosses, containing the three most representative images of every point of the observed scale (points from 2 to 6, each 0.25 units).
2.3 Classification methodology
The general idea of the methodology is to perform a guided classification based on the comparison of a photo to be classified with respect to a set of previously calibrated photos. This set forms the reference image database calibrated by an expert grader. In the first step, the image to be classified is compared with extreme BSC images. From these three images, the most similar one to the photo to be classified will be selected. The process continues by reducing the BSC range to be compared around the selected image. Again, the user will choose the photograph closest to the image of the cow to be graded, allowing the range of possible values to be narrowed at each stage until the result is defined.
Here we present the example of the classification tree for a typical database. In this case, extreme BCSs are 3 and 6 for the skinniest cow and the fattest cow, respectively. The entire process has five steps. In the first one, the distance between the images is 1 point of BCS (3.5 4.5 5.5). In the second step, the distance is reduced to 0.5 BCS points centered in the value selected in step 1. Third to fifth steps reduce the distance to 0.25 BCS points, making three repetitions with the same distance to take the average.
Figure 2 shows the grading process in schematic form, indicating the different options presented to the user in the successive stages. First, the user must choose the database corresponding to the breed he/she wants to qualify (Angus, Hereford, or crossbreeds). To exemplify the methodology, the decision tree to classify a cow with a BCS=5 is presented. The blue cells represent the available options, and the red boxes cells represent the possible values chosen by the user at each step. The result is rounded to the closest value.
In the implementation, each blue box is an image from the database. At each step, the program selects 3 photos, one from each strip. In this way, the observer has the chance to reach any value within the whole range of BCS. In steps 1 and 2, images of cows with contrasting BCSs are shown, since the objective of these steps is to orient the user towards a narrower range. The database can be tuned for a specific herd of cattle. In the proposed example using intermediate-fat cows, in step 1 the bands are 3 to 4, 4 to 5 and 5 to 6. The photos shown to the user correspond to the midpoint of each band.
Different range can be used for other breeds. For example, in the case of skinny cows, the image bases can be divided into 3 bands: from 2 to 3, from 3 to 4, and from 4 to 5. In step 2, each of the 3 stripes has an amplitude of 0.5 points, with the amplitude of the range of possible values being 1.5 points. In this step the user has a photo of a cow with the same BCS as the one selected in the previous step, and 2 photos spaced 0.5 points apart from it. As in the previous example, the objective of steps 3, 4 and 5 is to refine the final value of BCS. In these steps the range of possible values is 0.5 points of BCS. The user has a photo of a cow with the same BCS as the one selected in step 2 and 2 photos spaced 0.25 points apart from it. The BCS values of the images selected in these last three steps are averaged and the result is displayed.
As this is a subjective evaluation, accuracy was understood as the difference between consensus of a group of trained observers and the result obtained by one observer using the present methodology. The resolution or the smallest increment that can be detected by the methodology is limited to ±0.25 points of BCS. Photographs rated within this error range were incorporated into the program's image databases.
In this example, the results of steps 3, 4 and 5 are (4.75 5.00 5.00). The average is 4.92, rounded to 5.00.
2.4 Grading program
To apply the proposed methodology a prototype program for the guided grading of the BCS was implemented. The prototype was named cond_corp, and was developed from MATLAB® version R 2012b. The MATLAB® program is a mathematical software tool owned by Mathworks company, and its features include the implementation of algorithms and the creation of user interfaces.
Figure 3 shows the general look of the cond_corp software interface. The three options offered to the user can be seen, the image of the cow to be classified and the basic interface buttons.
There are four possible actions:
Selection of the database: the first choice to make by the user is the selection of the proper database. The button linked to this action is “DATABASE”.
Selection of the image to be classified: we select the proper image from the computer and the image in the “ACTUAL IMAGE” is refreshed. When this option is selected all previous calculus are erased. The button linked to this action is “IMAGE”.
Classification option: this option is made by a click on the selected photo. The partial result is indicated in the BSC box.
Save: when the fifth step is done, the program enables saving the result. The button linked to this action is “SAVE”.
The BCS results assigned to each cow are saved in a file together with the identification number allowing the traceability. In addition, the program generates a log file containing the options selected by the user at each step. Although this file is not intended to be read by an end user, it is very useful because it allows knowing the decision taken at each step and detecting possible errors, i.e., it is useful for training in the use of this tool. This procedure allowed the validation stage of the logic proposed for the development of the program.
2.5 Validation of the methodology with the cond_corp program implementation
The proposed methodology was validated through different works in which the BCS was rated by visual appreciation in the field and using the cond_corp program as classification guide.
Correlation coefficients (Pearson) and coincidence percentages were estimated (Proc MIXED, SAS V 9.4) between the ratings taken by visual appreciation vs. those obtained through images using the cond_corp implementation of the methodology. In the following section the results of different validations of the methodology and the software are presented.
3. Results and discussion
Four works were carried out to validate the proposed methodology23)(24)(25. The BCS ratings obtained in the cond_corp and their corresponding ratings by visual appreciation by experts were analyzed by calculating the degree of coincidence for each case by each observer, as well as the study of the correlation coefficients between the BCS values taken by visual appreciation (field) with those obtained using the guided classification.
The results indicated that ratings vary with observers as expected. However, as they acquire training using the classification software, the matches increase between experts by visual appreciation in the field and inexperienced users of the software.
For the Hereford database23, correlations between ratings by visual appreciation made by experts and those obtained using the cond_corp program by inexperienced users ranged from 0.20 to 0.74. Table 1 shows the correlations obtained by three inexperienced observers, between their ratings by visual appreciation and by means of the software, at three different times throughout the year (autumn, winter, and spring).
Correlation values were statistically significant (P<0.0001) and increased as the observer gained experience in using the program. On average, the correlations between visual appreciation ratings in time 1 were 0.36, while in the last measurement they increased to 0.59. It can be said that this software constitutes a rating guide, and, at the same time, a training module in the recording of this variable.
Azambuja and others22 discuss correlation as an indicator parameter for the validation of this software. Figure 4 shows the percentages of coincidence obtained, and the correlation coefficients between the observations of BCS by visual appreciation and by scoring in the software, from four different observers.
While the correlation shows the joint variation given by the BCS between field and desk of each of the observers, the percentages of coincidences would indicate the degree of accuracy achieved by each of the observers. There are differences between the ratings registered by the different observers. While three of them showed high percentages of coincidences (74 to 84%), one of them presented only 23%. Throughout the work, in all cases the correlation coefficients increased from the first to the last measurement (on average from 0.43 to 0.60), so it is possible to establish that the higher correlations observed in the third measurement are the result of greater visual training achieved using the cond_corp program. Again, this work can be indicating an increase of training level for BC scoring with the use of this program.
However, the authors emphasize the importance of a correct selection of the photographs taken to obtain the best image of each cow at the time of grading with the software.
In this sense, the work developed by Oborsky and Pachón25 presents the behavior of these coincidences in the qualification of photos taken with cell phone cameras and without keeping the distances or positions established as optimal21.
The percentages of coincidence between ratings also varied between observers, but in a range of 30 to 50%. The importance of using high resolution images where the different anatomical regions are clearly visualized to qualify the cows is emphasized.
Finally, with the aim of testing whether the cond_corp software could be used as a trainer in the qualification of BCS in breeding cows, a final experiment was designed. In this case, starting from untrained raters, the matches of their ratings in the software with respect to a trained observer were studied in BCS ratings at different times over 1 year.
The work developed by Gaimari and Peñagaricano26 demonstrated that cond_corp can work as a field grading tutorial. This work consisted of three different stages. Initially, observers graded 90 cows by visual appreciation. Subsequently, images of those same cows were scored using the software, and finally they returned to score by visual assessment in the field. In the first stage, the untrained observers had correlations that ranged from 0.43 to 0.46 between their visual assessment determinations and those of the trained observer. This correlation value increased significantly after using the software, with values ranging from 0.83 to 0.86.
Throughout all the tests carried out for the validation of this method of BCS qualification using images, the importance of the quality of the images (definition and position of the animals), as well as the representativeness of the different points of the scale in the program's photographic database were emphasized. The grading of several images leads to the acquisition of some training by the observers in the use of the program.
Finally, this work was of an exploratory and descriptive nature in relation to the scope of this tool for obtaining digital records in cattle production systems. Future lines of research should include a greater number of data that allow more adequate statistical processing to obtain conclusive results.
4. Conclusions
It was possible to develop a method for classifying breeding cows by body condition using a pre-classified image guide (cond_corp software). This hypothesis was validated by different experiments and classifiers.
The degree of agreement of ratings between visual appreciation and cond_corp increases over time for different raters.
It is important that the images be taken using the parameters defined as optimal for later visual interpretation. When the images were taken by cell phones without considering optimal distances or positions, matches between BCS ratings reduced by visual appreciation or by cond_corp software. The importance of the lighting and the environment must be investigated. All experiments were conducted using natural light with “similar” conditions.
The experiments confirm that as the observer uses the software, his/her accuracy in subsequent BCS grading by visual judgment improves.