Using an artificial neural network to predict pig mass from depth images

I. C.F.S. Condotta, T. M. Brown-Brandl, R. V. Sousa, K. O. Silva-Miranda

Research output: Contribution to conferencePaperpeer-review


Automating the acquisition of animals’ mass would aid the producers by providing information about animals’ mass gain and marketing pigs at the correct mass. Previous image processing methods have an estimated error of 4.6%. The objective of this paper is to test different modeling methods to decrease the error associated with the mass prediction. Seven hundred and seventy-two depth images and masses were collected from a population of grow–finish pigs (equally divided between barrows and gilts and three commercial sire-lines – Landrance, Duroc, Yorkshire); four ages (8, 12, 16, and 20 weeks) were sampled. An artificial neural network (ANN) based-model was created and simulated in several realizations, to fine-tune its parameters using the supervised learning approach. The input variables to the model included body volume, dorsal area, average height, neck to tail length, hip width, shoulders width and last rib width. A cross-validation method was used with three different training, validation and testing protocols – 70% training, 15% validation and 15% testing. Training data were selected to ensure every age, sex, and sire-line were represented. The performance of these models was evaluated by comparing the predicted and measured pig mass using the linear regression parameters – the slope, the intercept, the mean error, the root mean square error (RMSE), and the determination coefficient (R2). The proposed ANN-based model showed a good performance on mass prediction tasks compared with a classical MLR-based model, and demonstrated a better capacity for persistent performance on previously unseen data.

Original languageEnglish (US)
StatePublished - Jan 1 2018
Externally publishedYes
Event10th International Livestock Environment Symposium, ILES 2018 - Omaha, United States
Duration: Sep 25 2018Sep 27 2018


Conference10th International Livestock Environment Symposium, ILES 2018
Country/TerritoryUnited States


  • Image analysis
  • Kinect® sensor
  • Mass prediction
  • Precision livestock farming
  • Swine

ASJC Scopus subject areas

  • Animal Science and Zoology


Dive into the research topics of 'Using an artificial neural network to predict pig mass from depth images'. Together they form a unique fingerprint.

Cite this