Now you see me: Convolutional neural network based tracker for dairy cows

Oleksiy Guzhva, Håkan Ardö, Mikael Nilsson, Anders Herlin, Linda Tufvesson

Research output: Contribution to journalArticlepeer-review

11 Citations (SciVal)


To maintain dairy cattle health and welfare at commensurable levels, analysis of the behaviors occurring between cows should be performed. This type of behavioral analysis is highly dependent on reliable and robust tracking of individuals, for it to be viable and applicable on-site. In this article, we introduce a novel method for continuous tracking and data-marker based identification of individual cows based on convolutional neural networks (CNNs). The methodology for data acquisition and overall implementation of tracking/identification is described. The Region of Interest (ROI) for the recordings was limited to a waiting area with free entrances to four automatic milking stations and a total size of 6 × 18 meters. There were 252 Swedish Holstein cows during the time of study that had access to the waiting area at a conventional dairy barn with varying conditions and illumination. Three Axis M3006-V cameras placed in the ceiling at 3.6 meters height and providing top-down view were used for recordings. The total amount of video data collected was 4 months, containing 500 million frames. To evaluate the system two 1-h recordings were chosen. The exit time and gate-id found by the tracker for each cow were compared with the exit times produced by the gates. In total there were 26 tracks considered, and 23 were correctly tracked. Given those 26 starting points, the tracker was able to maintain the correct position in a total of 101.29 min or 225 s in average per starting point/individual cow. Experiments indicate that a cow could be tracked close to 4 min before failure cases emerge and that cows could be successfully tracked for over 20 min in mildly-crowded ( < 10 cows) scenes. The proposed system is a crucial stepping stone toward a fully automated tool for continuous monitoring of cows and their interactions with other individuals and the farm-building environment.

Original languageEnglish
Article number107
JournalFrontiers in robotics and AI
Issue numberSEP
Publication statusPublished - 2018

Subject classification (UKÄ)

  • Computer Vision and Robotics (Autonomous Systems)
  • Animal and Dairy Science


  • Animal identification
  • Animal tracking
  • Automatic milking systems
  • Computer vision
  • Convolutional neural network
  • Dairy cattle
  • Image analysis
  • Precision livestock farming


Dive into the research topics of 'Now you see me: Convolutional neural network based tracker for dairy cows'. Together they form a unique fingerprint.

Cite this