Deep learning improves mastitis detection in automated milking systems

1173

Source: WCDS Advances in Dairy Technology

Automated milking systems (AMS) are already used in 10% of Canadian dairy farms and >20% of dairy farms in Western Canada, with indications of increasing adoption. Therefore, there is increasing need for accurate, early automated disease detection. Although many AMS models incorporate chemical sensors to assess milk, including detection of mastitis, udder health often declines in the year after transitioning. AMS generate much more data than milk characteristics. For example, some animal behavior data may be novel indicators for disease onset, with great potential to improve mastitis detection when analyzed with state-of-the-art machine learning methods.

Detailed disease recording for individual animals were collected from 13 commercial AMS dairy herds in Ontario for the first 50 days of lactation. The following animal and herd-level features not directly measured were generated using AMS measurements: number of attempted visits, latency to exit milker, daily milk temperature, and number of cows per robot each day. Farms were allocated into 3 groups: 9 farms for training and model development, 2 farms to act as model-testing sets and 2 farms to serve as a hold-out validation set for model performance.

Deep learning models were used to predict daily probability of an animal being diagnosed with mastitis. Deep learning models use a series of connected neurons to identify complex relationships between predictor variables and the outcome of interest. Recurrent neural networks capture complex, time-dependent relationships and base predictions on individual animal patterns. Using a prediction window of 7 days centered around the day of diagnosis, models achieved 92% accuracy (8% false-positive and falsenegative). Using a more practical prediction window of 3 days, accuracy decreased to 86% (13% false-positive and false-negative). Furthermore, a combination of milk characteristics and behavioral traits resulted in prediction accuracy of 85%, 9% higher than when using milk characteristics alone.

Impact. AMS generate much data and novel opportunities. Earlier detection of mastitis would decrease long-term impacts on udder health, reduce antimicrobial use and improve milk production, milk quality and profitability.