Automatic counting and positioning of slaughter pigs within the pen using a convolutional neural network and video images

Research output: Contribution to journalJournal articleResearchpeer-review

Pen fouling is an undesired behaviour of slaughter pigs, which increases labour costs for the farmer, worsens the hygiene and welfare of the pigs, and has negative environmental consequences. Previous research suggests that monitoring the positioning behaviour of grower/finisher pigs within their pen has the potential to be used in early warning systems that can alert the farmer to an impending pen fouling event 1–3 days in advance. For such a warning system to be feasible, monitoring of the pigs’ positioning behaviour must be automated. To this end, we present a novel yet relatively simple method, namely a convolutional neural network (CNN) with a single linear regression output node. The proposed CNN takes partial images of a pen, corresponding to the different areas of the pen, and outputs an estimated count of the number of pigs in the partial image. By inputting three partial images corresponding to the three areas of the pen, the model can estimate the number of pigs in each area. The trained CNN generally performs well when applied to data from unseen test pens, with mean absolute errors of less than 1 pig and coefficients of determination between observed and estimated counts above 0.9. In cases where the trained model underperforms on the test pens, fine-tuning by transfer learning can be applied; we show that an initially underperforming model can be fine-tuned on one day's worth of test set data (26 labelled images), after which it will produce near-perfect estimates on all subsequent days in the same test set.

Original languageEnglish
Article number106296
JournalComputers and Electronics in Agriculture
Volume188
ISSN0168-1699
DOIs
Publication statusPublished - 2021

Bibliographical note

Publisher Copyright:
© 2021 The Author(s)

    Research areas

  • Convolutional neural network, Growing pigs, Machine vision, Pen fouling, Positioning behaviour

Number of downloads are based on statistics from Google Scholar and www.ku.dk


No data available

ID: 275826777