Skip to main content
SLU:s publikationsdatabas (SLUpub)


Following dairy cattle and studying social interactions between animals using image analysis and machine learning

Guzhva, Oleksiy; Nilsson, M.; Herlin, Anders Henrik; Ardö, Håkan; Åström, Karl; Bergsten, Christer


The efficiency of an automatic milking system (AMS) relies on a passage rate of cows through the waiting area. In an enclosed waiting area, cows of different rank compete for entering the milking station and they are exposed for a variety of social interactions. In order to assure high number of visits per cow per AMS unit it is important to understand hierarchy between animals and social interactions that might occur during waiting times. The competition between cows of a different rank to enter the AMS unit could also result in a number of aggressive interactions, which could compromise the individual performance of cows and endanger their health and welfare. The aim was to monitor the waiting area in a free stall dairy by the use of three surveillance cameras to detect occurrence of social interactions by using improved image segmentation and tracking methods. The surveillance system observed 250 cows having free access to any of four milking stations during 24 hours over a period of two weeks. A classification system, investigating features from pairs of cow shape models, was developed. The identification of social interactions using the system and crosscheck with ethogram containing descriptions of all the interactions was tested on a set of video sequences. The social interactions were identified based on collision of geometrical shapes segmented from the image and positively identified as cows by experienced observers. The system showed the potential for further development and variability of results depending on a complexity of observed interactions.


animal tracking, dairy cows, image analysis

Publicerad i

Utgivare: Centre for Animal Movement Research, Lund University


Animal Movement International Symposium: bridging the gap between modelling and tracking data