Supervised learning techniques for dairy cattle body weight prediction from 3D digital images

Grum Gebreyesus*, Viktor Milkevych, Jan Lassen, Goutam Sahana

*Corresponding author for this work

Research output: Contribution to journal/Conference contribution in journal/Contribution to newspaperJournal articleResearchpeer-review


Introduction: The use of automation and sensor-based systems in livestock production allows monitoring of individual cows in real-time and provides the possibility of early warning systems to take necessary management actions against possible anomalies. Among the different RT monitoring parameters, body weight (BW) plays an important role in tracking the productivity and health status. Methods: In this study, various supervised learning techniques representing different families of methods in the machine learning space were implemented and compared for performance in the prediction of body weight from 3D image data in dairy cows. A total of 83,011 records of contour data from 3D images and body weight measurements taken from a total of 914 Danish Holstein and Jersey cows from 3 different herds were used for the predictions. Various metrics including Pearson’s correlation coefficient (r), the root mean squared error (RMSE), and the mean absolute percentage error (MAPE) were used for robust evaluation of the various supervised techniques and to facilitate comparison with other studies. Prediction was undertaken separately within each breed and subsequently in a combined multi-breed dataset. Results and discussion: Despite differences in predictive performance across the different supervised learning techniques and datasets (breeds), our results indicate reasonable prediction accuracies with mean correlation coefficient (r) as high as 0.94 and MAPE and RMSE as low as 4.0 % and 33.0 (kg), respectively. In comparison to the within-breed analyses (Jersey, Holstein), prediction using the combined multi-breed data set resulted in higher predictive performance in terms of high correlation coefficient and low MAPE. Additional tests showed that the improvement in predictive performance is mainly due to increase in data size from combining data rather than the multi-breed nature of the combined data. Of the different supervised learning techniques implemented, the tree-based group of supervised learning techniques (Catboost, AdaBoost, random forest) resulted in the highest prediction performance in all the metrics used to evaluate technique performance. Reported prediction errors in our study (RMSE and MAPE) are one of the lowest in the literature for prediction of BW using image data in dairy cattle, highlighting the promising predictive value of contour data from 3D images for BW in dairy cows under commercial farm conditions.

Original languageEnglish
Article number947176
JournalFrontiers in Genetics
Number of pages15
Publication statusPublished - 2023


  • 3D images
  • bodyweight
  • dairy cow
  • machine learning (ML)
  • precision livestock farming (PLF)


Dive into the research topics of 'Supervised learning techniques for dairy cattle body weight prediction from 3D digital images'. Together they form a unique fingerprint.

Cite this