PredictinB statg Tus of dairy cows from mid infra-red spectral data using machine learning

Lead Research Organisation: Scotland's Rural College
Department Name: Research

Abstract

Bovine tuberculosis (bTB) is a chronic, infectious and zoonotic (i.e., it can be transmitted to humans) disease endemic in the UK and other countries, and presents a significant challenge to the UK cattle sector particularly in the south west of England and south Wales. The Department for Environment, Food and Rural Affairs (DEFRA) lists bTB as one of the four most important livestock diseases globally. The continued spread of bTB among cattle in England and Wales has been a socioeconomic disaster for over 40 years, causing catastrophic and devastating damage to farming businesses both large and small. In 2017 the number of animals in the UK slaughtered due to bTB was in excess of 43,500. The disease has proven difficult to completely eradicate using techniques that are socially acceptable and at a cost acceptable to the UK taxpayer. Current costs are estimated at over £175 million per year with an average cost of £34,000 per bTB outbreak per farm. The continued polarised debate on the role of wildlife as a farmed cattle disease reservoir is making progress slow. This project seeks to develop a non-invasive tool created from routine milk recording of dairy cattle to predict bTB status from milk analysis (by spectrophotometry) by exploiting state of the art Deep Learning techniques. Deep learning is part of a broader family of machine learning methods based on learning data representations, as opposed to task-specific algorithms (an algorithm is a process followed to solve calculations). Deep learning works by imitating the way that the human brain works and involves feeding a computer system a large volume of data, which it can use to make decisions about other data. This method of analysis has been successfully deployed by our group to predict pregnancy status in dairy cows with high accuracy and hence expectations are high that bTB leaves a signal in milk that can be detected with Deep Learning applied to MIR spectral data.

The involvement of a commercial partner (NMR, National Milk Records) that is extensively active in the bTB area ensures that results can be rapidly applied to maximise impact in the short term. Furthermore, NMR has a long history of supporting dairy farmers in herd management (including disease) and so the results of this project will be exploited in a familiar context for dairy farmers ensuring its widespread uptake.

Technical Summary

Using a Deep Learning approach we will develop a computer pipeline for routine prediction of bTB status from milk MIR spectra, a by-product of routine milk recording.

Individual cow records from multiple sources will be collated into a central database at SRUC. Records will include animal and herd identification, lactation information, pedigree, bTB skin test status, date of birth/death, movements and MIR spectra. Currently, after routine predictions for milk fat and protein have been carried out, the spectral data are stored for prediction of other important traits such as fatty acids and body energy.

Deep learning (a sub class of Machine Learning) will be utilised to analyse historic national bTB test results and milk MIR spectral data. Data will be modelled using deep convolutional neural networks following a supervised approach and validated in the first instance using SRUC's officially TB-free Langhill herd. Further validation will come from applying the model to a variety of different datasets set up to test predictions both between and within herd. Thereafter, the prediction pipeline will used to investigate whether the milk MIR can be used to determine the point at which a cow became infected with bTB. If successful this would offer the potential to significantly reduce the length of bTB breakdowns by allowing the removal/isolation of infected cows from the herd sooner than is the case currently.

The computing system will be constructed so as to allow for immediate deployment by NMR, the UK's largest milk recording organisation, in a commercial setting with on-going support from SRUC. A number of options will be considered including the use of a specialised GPU powered server vs. Cloud based server for model training or localised offline model training followed by real-time prediction. The objective is to construct a set of processes that allow real time predictions of bTB status at a cost that will be economically realistic and feasible for NMR.

Planned Impact

The impact of the proposed work is expected to be multi-faceted as detailed below:

Milk recording companies and other organisations involved in livestock breeding (e.g. breed societies, levy boards, breeding companies): A successful outcome of the project is expected to increase the return on investment in milk recording by using the same milk sample to predict a range of additional traits; explicitly bTB status. The industrial partner (NMR), in particular, will further benefit from being able to immediately and directly commercialise the outcomes in the form of additional services to farmers and to create new and novel services to assist dairy farmers in managing animal disease. Recording also allows monitoring bTB prevalence and so the efficacy of the testing and culling scheme.

Government: bTB is expensive for both government and taxpayer. It consumes finance that could be better utilised in other areas to generate more income (and tax). The potentially reduced incidence of major disease outbreaks will create a more vibrant and efficient dairy system by allowing reduced restrictions and less risky trading of cattle. The removal of infectious animals earlier is expected (but not yet known) to lower the general level of infection and potentially, the cow to wildlife transmission thereby altering the dynamics of bTB spread.

Farmers: At present over 3,700 herds have a breakdown status and in the last year (2017) alone over 43,500 animals were slaughtered as a result of testing positive for bTB. This has profound implications for farmers not only in a business sense but also psychologically. No farmer wants to have rampant bTB on their farm and so any initiative that helps in the early identification and rapid removal of potentially infectious animals from the dairy herd will find widespread approval. Most importantly, the optimal utilisation of genetic resources in short term selection will enhance the long term sustainability of the supply chain. Currently, high values animals are being lost to the selection pipeline through this disease.

Consumers: The successful implementation of the proposed testing framework will enhance the efficiency of the dairy industry and the profitability of the sector. The benefits of improved efficiency and robustness of agricultural systems has benefits right across the entire supply chain as seen recently when supply chains were disrupted due to extreme weather. Consumers will benefit through tax revenue being utilised for alternative initiatives.

The UK science base: The methods developed and project data produced will contribute to the increased research capacity within the UK (and beyond). The scope of the project is aligned with the BBSRC Strategic Research Priority 1 (Agriculture and Food Security) and successful completion will contribute to the competitiveness and excellence of the UK science base as well as its positioning at the frontiers of delivering novel tools to address the challenges of global agricultural production. Of particular note is the use of Deep Learning with large scale agricultural animal data to gain new insights to improve food production.

Training: The proposed research will feature in training courses that the applicants are regularly invited to present e.g. farmer training days, "Vetnomics" and undergrad teaching. The PDRA working on the project will have the opportunity to be trained in a cutting edge area of research on the use of Deep Learning to predict new disease phenotypes from milk mid infra-red spectral data, while interacting with other scientists in a world-leading research environment as well as with a leading commercial partner intent on application and making a difference.

Policy: The reduction of bTB in the dairy herd is a vital objective of DEFRA and the outcomes of this project have the potential to contribute to the 25 year TB Eradication Strategy without compromising long-term competitiveness of the dairy herd.
 
Description We have found that bTB skin test status can be predicted using cows milk mid infra-red spectral data. Using already collected data that is not included in model development we have internally validated the predictions to be of very high accuracy and warrant further validation using new data so far uncollected from herds in breakdown.
Exploitation Route The use of synthesising data for use in machine learning requires the data to NOT be used in validation. The synthetic data has features that can be recognised by the model leading to unfeasibley high accuracies. Further research could be undertaken to investigate the possibility of detecting a wide range of features in the cows milk. This might include diseases such as Johnes, BVD but also other important characteristics like antibiotic presence. This is one of the first reported uses of Deep Learning in animal agriculture and could lead to an increase in the use of machine learning to agricultural data.
Sectors Agriculture, Food and Drink,Digital/Communication/Information Technologies (including Software),Government, Democracy and Justice,Retail

 
Description The commercial partner has been advertising the project to their customers and it has been very well received (and anecdotally dominated all of their farmer meetings). It has also led to a reappraisal of the use of spectral data by NMR and they are now considering future traits of interest such as methane emissions and feed intake. We have begun discussions on how to apply the same technique to analysing bulk tank milk samples that are taken every day to see if any signals for TB can be found. Also, we are looking at detecting antibiotic contamination of milk in the bulk tank sample.
First Year Of Impact 2021
Sector Agriculture, Food and Drink
Impact Types Economic

 
Description Innovative bovine TB diagnostics programme
Amount £99,000 (GBP)
Funding ID SE3328 
Organisation Department For Environment, Food And Rural Affairs (DEFRA) 
Sector Public
Country United Kingdom
Start 01/2021 
End 01/2022
 
Description Orchard Fund
Amount £15,000 (GBP)
Organisation Scotland's Rural College 
Sector Academic/University
Country United Kingdom
Start 01/2023 
End 03/2023
 
Description SFC UIF 2020/21 Orchard 3
Amount £50,000 (GBP)
Organisation Government of Scotland 
Department Scottish Funding Council
Sector Public
Country United Kingdom
Start 11/2020 
End 07/2021
 
Title Automated Processing and Phenotype Extraction of Ovine Medical Images 
Description A generative adversarial network (GAN) to perform image-to-image processing steps needed for ovine phenotype analysis from CT scans of sheep. Key phenotypes such as gigot geometry and tissue distribution were determined using a computer vision (CV) pipeline. 
Type Of Material Improvements to research infrastructure 
Year Produced 2021 
Provided To Others? Yes  
Impact The combined GAN-CV pipeline is able to process and determine the phenotypes at a speed of 0.11s per medical image compared to approximately 30 min for manual processing. This pipeline represents the first step towards automated phenotype extraction for ovine genetic breeding programmes. 
URL https://www.mdpi.com/1424-8220/21/21/7268
 
Title Deep convolutional neural network 
Description a deep constitutional neural network has been developed, trained on binary data (0=no bTB; 1=bTB). 
Type Of Material Computer model/algorithm 
Year Produced 2019 
Provided To Others? No  
Impact Prediction of individual cow bTB status from routinely collected (non-invasive) mid infrared spectral data. Accuracy of 99% with a sensitivity = specificity = 0.99) 
 
Title bTB-MIR reference data 
Description A reference data-set has been created by aligning data from multiple sources (APHA bTB breakdown test results; NMR MIR spectral profiles; BCMS movements history). Due to the commercially and politically sensitive nature of the data, MIR spectra and bTB data, including corresponding animal/herd identification, lactation information, pedigree, skin test status, births, movements and deaths, will be retained by NMR (MIR), APHA (bTB) and within the group using the central database at SRUC to collate data from multiple sources. As such these data are unlikely to be made available by the partners outside of the project. Furthermore, written individual contracts will most likely be required for any data requests. 
Type Of Material Database/Collection of data 
Year Produced 2019 
Provided To Others? No  
Impact These reference data were used to train a predictive model, underpinned a deep convolution neural network, to predict bTB status of dairy cows from routinely collected milk samples. This method of prediction presents a completely non-invasive approach to alert a farmer of potential bTB affected cows. 
 
Description SRUC-NMR 
Organisation National Milk Records
Country United Kingdom 
Sector Private 
PI Contribution Expertise in data analysis and scientific research & development
Collaborator Contribution Data for use in analyses; expertise in milk recording and generation of MIR data; intellectual input
Impact Tools based on predicting hard to record phenotypes form dairy cow mid infrared spectral data.
Start Year 2013
 
Description SRUC-NVIDIA 
Organisation NVIDIA
Country Global 
Sector Private 
PI Contribution Expertise in genomics and agriculture
Collaborator Contribution Training staff
Impact 3-day "Hackathon" workshop with outreach to multiple organisations and research groups (SRUC, NVIDIA, The Roslin Institute, University of Edinburgh, University of Stirling, James Hutton Institute). Multi-disciplinary: Genetics, mathematics, statistics, computer science, medicine
Start Year 2020
 
Title Automated Processing and Phenotype Extraction of Ovine Medical Images 
Description A generative adversarial network (GAN) to perform automated image-to-image processing combined with a computer vision pipeline for automated extraction of key sheep phenotypes. 
Type Of Technology New/Improved Technique/Technology 
Year Produced 2021 
Impact The combined GAN-CV pipeline was able to process and determine the phenotypes at a speed of 0.11 s per medical image compared to approximately 30 min for manual processing and represents a major step towards automated phenotype extraction for ovine genetic breeding programmes 
URL https://www.mdpi.com/1424-8220/21/21/7268
 
Title milk-based (spectra) dairy cow phenotype prediction pipeline 
Description Alpha version of a pipeline enabling a rapid and automated approach to predict bTB and pregnancy status of individual cows from milk mid infrared spectral data generated via routine milk recording 
Type Of Technology New/Improved Technique/Technology 
Year Produced 2020 
Impact internal validation of study results. Further funding for development. Generation of undergraduate and postgraduate teaching materials and projects 
URL https://www.journalofdairyscience.org/article/S0022-0302(20)30619-6/fulltext
 
Description British Cattle Breeders Club annual conference 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Other audiences
Results and Impact Result presented to dairy farmers and those involved in the dairy industry. The presentation generated a lot of interest from delegates and requests for futher information
Year(s) Of Engagement Activity 2020
 
Description Farmers Guardian 
Form Of Engagement Activity A magazine, newsletter or online publication
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Industry/Business
Results and Impact Article published; increased interest in research
Year(s) Of Engagement Activity 2020
URL https://www.fginsight.com/news/news/british-cattle-breeders-club-conference-2020-103606
 
Description Farmers Weekly 
Form Of Engagement Activity A magazine, newsletter or online publication
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Industry/Business
Results and Impact Increased interest in milk recording
Year(s) Of Engagement Activity 2019
URL https://www.fwi.co.uk/livestock/health-welfare/livestock-diseases/bovine-tb/supercomputer-to-analyse...
 
Description Genetics of bTB workshop 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Annual workshop to discuss the genetics of TB resistance in cattle. Results presented generated much interest and discussion and requests for further information
Year(s) Of Engagement Activity 2019
 
Description Interview - Vet Times 
Form Of Engagement Activity A press release, press conference or response to a media enquiry/interview
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Professional Practitioners
Results and Impact Interview regarding the project published online and in print - increased interest in deep learning
Year(s) Of Engagement Activity 2019
URL https://www.vettimes.co.uk/news/sruc-research-to-delve-deeper-into-tb-milk-test/
 
Description Invited Speaker European Federation of Animal Science (EAAP) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Meeting attended by experts from around the world to present and discuss the latest developments in the area of animal science. As an invited speaker more tie was available to showcase results from the project. Questions and discussion resulted from the presentation.
Year(s) Of Engagement Activity 2021
URL https://www.eaap2021.org/_files/ugd/068bd6_cc3adebbcf164ae78e45f1685d1a0771.pdf
 
Description Invited seminar speaker - Computational Genetics Discussion Group 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Invited seminar delivered virtually; Q&A and discussion session - increased interest in research area
Year(s) Of Engagement Activity 2020
 
Description Invited speaker International Workshop on Spectroscopy and Chemometrics 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Workshop and in-depth discussions. Increased interest in applying deep learning in chemometrics. requests for additional information after the event.
Year(s) Of Engagement Activity 2021
URL https://www.linkedin.com/posts/vistamilk_international-workshop-on-spectroscopy-and-activity-6769936...
 
Description Meeting with Cheif veterinary officer for Welsh assembly 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Policymakers/politicians
Results and Impact We were due to go to Cardiff to discuss the project and its findings but Flybe went bust so we had to conduct a teleconference with representatives of Welsh Assembly and Defra. We talked through the presentation that shows we can predict TB skin test status with high accuracy using milk mid infer-red spectral data. we discussed how to take it further and conduct a field trial in a live setting for herds that were under breakdown
Year(s) Of Engagement Activity 2020
 
Description NVIDIA DLI workshop 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach Regional
Primary Audience Professional Practitioners
Results and Impact Deep learning workshop; upskilled staff
Year(s) Of Engagement Activity 2020
 
Description Nvidia - Case Study 
Form Of Engagement Activity A magazine, newsletter or online publication
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Public/other audiences
Results and Impact Case study published by Nvidia - led to increased interest in research and deep learning applied to agriculture
Year(s) Of Engagement Activity 2020
URL https://nvdam.widen.net/content/fp03xmvekd/pdf/1523354-healthcare-web-sruc-case-study-engb.pdf?x.sha...
 
Description Nvidia - blog 
Form Of Engagement Activity Engagement focused website, blog or social media channel
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Public/other audiences
Results and Impact Blog post on official NVIDIA website
Year(s) Of Engagement Activity 2020
URL https://blogs.nvidia.com/blog/2020/12/15/ai-for-fighting-bovine-tuberculosis/
 
Description Open Access Government 
Form Of Engagement Activity A magazine, newsletter or online publication
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Industry/Business
Results and Impact increased interest in research project
Year(s) Of Engagement Activity 2021
URL https://www.openaccessgovernment.org/bovine-tuberculosis-ai/102648/
 
Description Presentation at NVIDIA GTC 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Industry/Business
Results and Impact Presentation given at NVIDIA's annual technology conference which attracted over 210,000 registrants from 195 countries. Requests for additional information and interest in the project.
Year(s) Of Engagement Activity 2021
URL https://www.nvidia.com/en-us/on-demand/session/gtcspring21-e31420/
 
Description Press Release 
Form Of Engagement Activity A press release, press conference or response to a media enquiry/interview
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Other audiences
Results and Impact Project was launched with a press release that resulted in print and online coverage nationally
Year(s) Of Engagement Activity 2019
URL http://www.sruc.ac.uk/news/article/2327/supercomputers_target_tb
 
Description SRUC-NVIDIA Hackathon 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach Regional
Primary Audience Professional Practitioners
Results and Impact Programming workshop to upskill staff and accelerate legacy code using GPUs; increased interest in HPC and GPUs
Year(s) Of Engagement Activity 2020
URL https://twitter.com/dadyo32/status/1230801421643264002
 
Description The Innovation Platform 
Form Of Engagement Activity A magazine, newsletter or online publication
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Industry/Business
Results and Impact Article published in The Innovation Platform Magazine (issue 5, March 2021, pp251-253). Increased publicity and interest in deep learning applied to agriculture
Year(s) Of Engagement Activity 2021
URL https://edition.pagesuite-professional.co.uk/html5/reader/production/default.aspx?pubname=&edid=221d...
 
Description The Scottish Farmer 
Form Of Engagement Activity A magazine, newsletter or online publication
Part Of Official Scheme? No
Geographic Reach Regional
Primary Audience Industry/Business
Results and Impact increased interest in research
Year(s) Of Engagement Activity 2019
URL https://www.thescottishfarmer.co.uk/news/17444085.supercomputers-target-tuberculosis/