Can clots in milk be detected using data from the VMS?

This research conducted by Dorota Anglart and Charlotte Hallén Sandgren from DeLaval and Ulf Emanuelson and Lars Rönnegård from Swedish University of Agricultural Sciences was published in Journal of Dairy Science.  

Changes in milk homogeneity such as clots are typical signs of clinical mastitis and bad milk quality. Therefore, visual inspection of milk by pre-stripping quarters before milking is recommended and practiced in many countries.

“This method is not applicable in the VMS and there would be several benefits finding methods that could automatically determine the homogeneity of the milk, preferably also before the milk ends up in the bulk tank”, says Dorota Anglart, Farm Management Specialist, DeLaval.  

To investigate this, data from the VMS such as milk yield, flow, conductivity, and OCC (online somatic cell counter) was used as input to machine learning models, trained to detect and predict cow milkings that contained clots. The reference data was collected at four different DeLaval farms, where 21 335 quarters of 624 unique cows were inspected.

“This data collection was quite labor intensive and unique in its kind”, says Dorota as she sends an extra thanks to colleagues in Sweden and in the Netherlands for helping.

The results showed that the models correctly classified milkings where no clots were observed to a very high degree (specificity of 98-100 %) while the ability to detect milkings with clots was low (sensitivity of 26 %). As an example, if ten out of 100 milkings contained clots, the system would only give two false positive alerts but also only find three of the ten milkings with clots.

The results also showed that misclassification rate for cow milkings with heavier cases of clots were lower. “We believe that this indicates that the possibility to correctly classify cases of clots could improve if the definition of which cases needs to be detected are somewhat modified. In this study, all cases were included, however, mild cases may not be valuable or meaningful for the farmer to find. The occurrence of clots is a rare event (2.4 % of milkings in this study) which also makes it harder to predict. Although the prediction performance for the definitions of a case used in this study was poor, we are learning and developing new ideas along the way”, concludes Dorota.

We congratulate the team to the publication of “Detecting and predicting changes in milk homogeneity using data from automatic milking systems”, in Journal of Dairy Science 1 June 2021, from DeLaval Dorota Anglart and Charlotte Hallén Sandgren, from Swedish University of Agricultural Sciences Ulf Emanuelson and Lars Rönnegård.