A Computer Vision Pipeline that Uses Thermal and RGB Images for the Recognition of Holstein Cattle

Amey Bhole, Owen Falzon, Michael Biehl, George Azzopardi

Research output: Chapter in Book/Report/Conference proceedingChapterAcademicpeer-review

7 Citations (Scopus)
54 Downloads (Pure)


The monitoring of farm animals is important as it allows farmers keeping track of the performance indicators and any signs of health issues, which is useful to improve the production of milk, meat, eggs and others. In Europe, bovine identification is mostly dependent upon the electronic ID/RFID ear tags, as opposed to branding and tattooing. The RFID based ear-tagging approach has been called into question because of implementation and management costs, physical damage and animal welfare concerns. In this paper, we conduct a case study for individual identification of Holstein cattle, characterized by black, brown and white patterns, in collaboration with the Dairy campus in Leeuwarden. We use a FLIR E6 thermal camera to collect an infrared and RGB image of the side view of each cow just after leaving the milking station. We apply a fully automatic pipeline, which consists of image processing, computer vision and machine learning techniques on a data set containing 1237 images and 136 classes (i.e. individual animals). In particular, we use the thermal images to segment the cattle from the background and remove horizontal and vertical pipes that occlude the cattle in the station, followed by filling the blank areas with an inpainting algorithm. We use the segmented image and apply transfer learning to a pre-trained AlexNet convolutional neural network. We apply five-fold cross-validation and achieve an average accuracy rate of 0.9754 ± 0.0097. The results obtained suggest that the proposed non-invasive approach is highly effective in the automatic recognition of Holstein cattle from the side view. In principle, this approach is applicable to any farm animals that are characterized by distinctive coat patterns.
Original languageEnglish
Title of host publicationComputer Analysis of Images and Patterns
Subtitle of host publication18th International Conference, CAIP 2019, Salerno, Italy, September 3–5, 2019, Proceedings, Part II
EditorsMario Vento, Gennaro Percannella
Place of PublicationCham
Number of pages12
ISBN (Electronic)978-3-030-29891-3
ISBN (Print)978-3-030-29890-6
Publication statusPublished - 2019

Publication series

NameLecture Notes in Computer Science

Cite this