Classification of Cattle Behaviours Using Neck-Mounted Accelerometer-Equipped Collars and Convolutional Neural Networks

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.

[1]  Andrew Zisserman,et al.  Speeding up Convolutional Neural Networks with Low Rank Expansions , 2014, BMVC.

[2]  Yoshua Bengio,et al.  Deep Sparse Rectifier Neural Networks , 2011, AISTATS.

[3]  Greg Bishop-Hurley,et al.  Behavioral classification of data from collars containing motion sensors in grazing cattle , 2015, Comput. Electron. Agric..

[4]  P. Fricke,et al.  Expression and detection of estrus in dairy cows: the role of new technologies. , 2014, Animal : an international journal of animal bioscience.

[5]  Ivan Andonovic,et al.  Identification of the Rumination in Cattle Using Support Vector Machines with Motion-Sensitive Bolus Sensors , 2019, Sensors.

[6]  Xiangyu Zhang,et al.  Channel Pruning for Accelerating Very Deep Neural Networks , 2017, 2017 IEEE International Conference on Computer Vision (ICCV).

[7]  B. A. Wadsworth,et al.  A validation of technologies monitoring dairy cow feeding, ruminating, and lying behaviors. , 2016, Journal of dairy science.

[8]  Aaron Ingham,et al.  Cattle behaviour classification from collar, halter, and ear tag sensors , 2017 .

[9]  Daniel V. Smith,et al.  A comparison of autoencoder and statistical features for cattle behaviour classification , 2016, 2016 International Joint Conference on Neural Networks (IJCNN).

[10]  David G. Renter,et al.  Evaluation of three-dimensional accelerometers to monitor and classify behavior patterns in cattle , 2009 .

[11]  Naoshi Kondo,et al.  Classification of multiple cattle behavior patterns using a recurrent neural network with long short-term memory and inertial measurement units , 2019, Comput. Electron. Agric..

[12]  M. L. Stangaferro,et al.  Use of rumination and activity monitoring for the identification of dairy cows with health disorders: Part III. Metritis. , 2016, Journal of dairy science.

[13]  A Haeussermann,et al.  Feeding characteristics and rumination time of dairy cows around estrus. , 2015, Journal of dairy science.

[14]  Joan Bruna,et al.  Exploiting Linear Structure Within Convolutional Networks for Efficient Evaluation , 2014, NIPS.

[15]  J. van Leeuwen,et al.  Neural Networks: Tricks of the Trade , 2002, Lecture Notes in Computer Science.

[16]  Song Han,et al.  Deep Compression: Compressing Deep Neural Network with Pruning, Trained Quantization and Huffman Coding , 2015, ICLR.

[17]  Lutz Prechelt,et al.  Early Stopping - But When? , 2012, Neural Networks: Tricks of the Trade.

[18]  Nils Zehner,et al.  System specification and validation of a noseband pressure sensor for measurement of ruminating and eating behavior in stable-fed cows , 2017, Comput. Electron. Agric..

[19]  B. Sonck,et al.  Classification of ingestive-related cow behaviours using RumiWatch halter and neck-mounted accelerometers , 2019, Applied Animal Behaviour Science.

[20]  Brad J. White,et al.  Predicting bull behavior events in a multiple-sire pasture with video analysis, accelerometers, and classification algorithms , 2017, Comput. Electron. Agric..

[21]  Leslie N. Smith,et al.  A disciplined approach to neural network hyper-parameters: Part 1 - learning rate, batch size, momentum, and weight decay , 2018, ArXiv.

[22]  Ali Farhadi,et al.  XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks , 2016, ECCV.

[23]  J. Roelofs,et al.  Estrus detection tools and their applicability in cattle: recent and perspectival situation , 2015 .

[24]  Suyog Gupta,et al.  To prune, or not to prune: exploring the efficacy of pruning for model compression , 2017, ICLR.

[25]  Nitish Srivastava,et al.  Dropout: a simple way to prevent neural networks from overfitting , 2014, J. Mach. Learn. Res..

[26]  Sergey Ioffe,et al.  Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift , 2015, ICML.

[27]  Hanan Samet,et al.  Pruning Filters for Efficient ConvNets , 2016, ICLR.

[28]  Zhiqiang Shen,et al.  Learning Efficient Convolutional Networks through Network Slimming , 2017, 2017 IEEE International Conference on Computer Vision (ICCV).

[29]  D Bar,et al.  Rumination Collars: What Can They Tell Us , 2010 .

[30]  H. Barkema,et al.  Technical note: Accuracy of an ear tag-attached accelerometer to monitor rumination and feeding behavior in feedlot cattle. , 2015, Journal of animal science.

[31]  M. Kolehmainen,et al.  Cow behaviour pattern recognition using a three-dimensional accelerometer and support vector machines , 2009 .

[32]  Jianxin Wu,et al.  ThiNet: A Filter Level Pruning Method for Deep Neural Network Compression , 2017, 2017 IEEE International Conference on Computer Vision (ICCV).

[33]  Edward A. Codling,et al.  Classification of behaviour in housed dairy cows using an accelerometer-based activity monitoring system , 2015, Animal Biotelemetry.

[34]  Ashfaqur Rahman,et al.  Convolutional Neural Network for Time Series Cattle Behaviour Classification , 2016, TSAA '16.

[35]  Geoffrey E. Hinton,et al.  Distilling the Knowledge in a Neural Network , 2015, ArXiv.

[36]  Michael Carbin,et al.  The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks , 2018, ICLR.

[37]  Luc Martens,et al.  On the use of on-cow accelerometers for the classification of behaviours in dairy barns. , 2017, Research in veterinary science.

[38]  Md. Sumon Shahriar,et al.  Behavior classification of cows fitted with motion collars: Decomposing multi-class classification into a set of binary problems , 2016, Comput. Electron. Agric..

[39]  Jose Javier Gonzalez Ortiz,et al.  What is the State of Neural Network Pruning? , 2020, MLSys.

[40]  Babak Hassibi,et al.  Second Order Derivatives for Network Pruning: Optimal Brain Surgeon , 1992, NIPS.

[41]  Ming Yang,et al.  Compressing Deep Convolutional Networks using Vector Quantization , 2014, ArXiv.

[42]  M. Gauly,et al.  Are automated sensors a reliable tool to estimate behavioural activities in grazing beef cattle? , 2019, Applied Animal Behaviour Science.

[43]  Frank Hutter,et al.  Decoupled Weight Decay Regularization , 2017, ICLR.

[44]  Song Han,et al.  Learning both Weights and Connections for Efficient Neural Network , 2015, NIPS.

[45]  Yann LeCun,et al.  Optimal Brain Damage , 1989, NIPS.

[46]  Greg Bishop-Hurley,et al.  Dynamic cattle behavioural classification using supervised ensemble classifiers , 2015, Comput. Electron. Agric..