Classification of cattle behaviours using neck-mounted accelerometer-equipped collars and convolutional neural networks

Pavlovic, Dejan and Davison, Christopher and Hamilton, Andrew and Marko, Oskar and Atkinson, Robert and Michie, Craig and Crnojević, Vladimir and Andonovic, Ivan and Bellekens, Xavier and Tachtatzis, Christos (2021) Classification of cattle behaviours using neck-mounted accelerometer-equipped collars and convolutional neural networks. Sensors, 21 (12). 4050. ISSN 1424-8220 (

[thumbnail of Pavlovic-etal-Sensors-2021-Classification-of-cattle-behaviours]
Text. Filename: Pavlovic_etal_Sensors_2021_Classification_of_cattle_behaviours.pdf
Final Published Version
License: Creative Commons Attribution 4.0 logo

Download (1MB)| Preview


Monitoring cattle behaviour is core to the early detection of health and welfare issues and to optimise the fertility of large herds. Accelerometer-based sensor systems that provide activity profiles are now used extensively on commercial farms and have evolved to identify behaviours such as the time spent ruminating and eating at an individual animal level. Acquiring this information at scale is central to informing on-farm management decisions. The paper presents the development of a Convolutional Neural Network (CNN) that classifies cattle behavioural states ('rumination', 'eating' and 'other') using data generated from neck-mounted accelerometer collars. During three farm trials in the United Kingdom (Easter Howgate Farm, Edinburgh, UK), 18 steers were monitored to provide raw acceleration measurements, with ground truth data provided by muzzle-mounted pressure sensor halters. A range of neural network architectures are explored and rigorous hyper-parameter searches are performed to optimise the network. The computational complexity and memory footprint of CNN models are not readily compatible with deployment on low-power processors which are both memory and energy constrained. Thus, progressive reductions of the CNN were executed with minimal loss of performance in order to address the practical implementation challenges, defining the trade-off between model performance versus computation complexity and memory footprint to permit deployment on micro-controller architectures. The proposed methodology achieves a compression of 14.30 compared to the unpruned architecture but is nevertheless able to accurately classify cattle behaviours with an overall F1 score of 0.82 for both FP32 and FP16 precision while achieving a reasonable battery lifetime in excess of 5.7 years.