Loading…

Mastitis detection with recurrent neural networks in farms using automated milking systems

•Recurrent neural networks can effectively identify dairy cows with mastitis.•Including additional variables improves detection over milk characteristics alone.•Within-day changes in behaviour and milk are key indicators of mastitis onset.•Between-farm variability is likely a major limiter for model...

Full description

Saved in:
Bibliographic Details
Published in:Computers and electronics in agriculture 2022-01, Vol.192, p.106618, Article 106618
Main Authors: Naqvi, S. Ali, King, Meagan T.M., Matson, Robert D., DeVries, Trevor J., Deardon, Rob, Barkema, Herman W.
Format: Article
Language:English
Subjects:
Citations: Items that this one cites
Items that cite this one
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:•Recurrent neural networks can effectively identify dairy cows with mastitis.•Including additional variables improves detection over milk characteristics alone.•Within-day changes in behaviour and milk are key indicators of mastitis onset.•Between-farm variability is likely a major limiter for model generalizability. Mastitis is the most important disease in the dairy industry. With widespread adoption of automated milking systems (AMS) in Canada, there is an increasing need for automated detection of mastitis in AMS farms. The main objective of this study was to develop a recurrent neural network (RNN) model for the detection of clinical mastitis (CM) in dairy cows on farms using AMS. Producer-recorded treatment records and AMS data were collected over 3 time periods from a total of 89 dairy farms in 7 provinces across Canada. In addition to developing effective models for the detection of CM, our study also evaluated different windows around the day of diagnosis when the cow would be considered CM-positive to guide practical implementation of models. We also compared numerous subsets of variables including milk and behavioural characteristics, cow traits and farm-level/environmental variables to determine their importance and impact on model performance. Data were randomly divided into a training and a hold-out test set, consisting of all records from 66 and 23 farms, respectively. A 10-fold internal cross-validation was also employed on the training set for model development. When comparing different windows of time around diagnosis, considering animals as CM-positive for 3 d prior to recorded diagnosis resulted in the most timely and effective detection of CM with a per-case sensitivity of 89.8% (range: 83.3–96.0%), and per-day specificity of 84.3% (range: 83.4–85.8%) over the validation folds. These levels of sensitivity and specificity were achieved when using all recorded variables and their daily variances, although the inclusion of behavioural variables and farm-level/environmental variables provided marginal performance improvement over using milk traits alone. Performance of the model was worse on the hold-out test set with a per-case sensitivity of 83.5% (range: 77.9–86.3%) and a per-day specificity of 80.4 % (range: 78.1–82.4%), likely due to farm-specific heterogeneity not encountered in the training data. Over 90% of cases of severe CM (defined by an increase in milk temperature over the pre-CM baseline) were identified by the model, indicat
ISSN:0168-1699
1872-7107
DOI:10.1016/j.compag.2021.106618