SLU news

Better decision tools for farmers on cows with udder infections

Published: 23 March 2021
Cows by a milking machine. Photo.

Mastitis is a potentially fatal infection in the udder and the most common disease in dairy cattle worldwide. How can we better detect when cows have mastitis and give the correct treatment? John Bonestroo is working on his PhD project where he is investigating that.

Many dairy cows suffer from mastitis, which entails costs for the farmer and suffering for the animals. High cell counts are common in dairy farms and lead to poorer milk quality.

– The big challenge is to give the cow the right treatment and at the same time minimize the need for antibiotics and the risk of antibiotic resistance. Sensors can detect cows with mastitis, but the scientific data on how these cows should be handled is lacking, which is what I am investigating in my project, says John.

John is an industrial PhD student employed at DeLaval and SLU. His project is part of LivsID, SLU’s industrial PhD students within the food research area.

When does mastitis become chronic?

Right now, John is about halfway into the project.

– We have currently looked into the cut-off of when udder inflammation tends to be more chronic and do not recover. This is quite important to farmers as these problematic cows could cause additional treatments and can cause additional transmission of pathogens to other healthy cows. Minimizing the number of chronic cows in a herd is therefore very important, says John.

– The next step in the project is to build a simulation model that can simulate the farm and farmer decisions based on the data I have collected.

“I am really lucky I ended up in my current project”

John has a background in management and agricultural economics.

– When I attended my bachelor and master program at Wageningen University, I got highly interested in statistics and programming, which lead me to the path of data science and machine learning. During my program, I would find a lot of excuses to program whenever I had some freedom to shape projects. Now, I'm really happy and lucky that I ended up in my current project.

A huge amount of data

Has anything been difficult in the project?

– In the project, we needed to explore a lot of data and that took a lot of time. The sheer volume of data can be difficult to handle, and it can take a lot of computation time. Finding methods than can handle the amount of data has also been a challenge! Nevertheless, we currently have a clear idea where the go and I do not expect any major problems in the foreseeable future.

The value of an industrial PhD – analyzing for practical value

Who will benefit from the results of the project?

– The farmers! The project is quite practical in its setup and every time we start with a new paper or idea, we always ask ourselves: what is the use for it from the perspective of the farmer? I think that this shows the value of doing an industrial PhD, as you immediately start the recognize the practical value of an idea.

What are you up to after your PhD studies?

– I do not exactly know where I am going to end up, but I'd love to continue my efforts in Data Science and possibly tied to Data Science in dairy farming.

What do you do when you are not working?

– In my free time, I like programming on my hobby projects if I have the time,  which I rarely do unfortunately! You can also find me somewhat regularly in the gym. Nowadays, I just spent a lot of quality time with my family.


LivsID is an industry PhD-program at SLU, dedicated to research and education within food-related topics. The program involves nine companies and seven departments at SLU. The industrial PhD students are employed by the company where the project is based and conducted research in food-related applied areas. Through LivsID's activities, they also interact with each other and create a network between academia and companies. 

The program was initiated with support of the government as part of the National food strategy and established in autumn 2018 with initially 10 projects. One more project is associated. The program is running in Alnarp, Umeå and Uppsala.

Read more about the LivsID program here.


Portrait photo of a smiling man outdoors. Photo. John Bonestroo
Industrial PhD student at SLU and DeLaval