Automated detection of lameness in dairy cattle

Joaquin Ventura & Fernando Diaz

Lameness is an important source of loss for dairy farms, and producers often underestimate their actual impact, which is estimated at about 35% of the animals. Economic losses can be between $300 and $600 per case, due to the loss of milk production and increased healthcare costs.

On large farms it is difficult to detect the problems of cow lameness early and a system that would allow it to be automated would be very useful and help reduce the costs associated with this problem. Automated systems however have the disadvantage that they find it very difficult to distinguish individual variations in cow behavior, so it would be a major advance to develop an algorithm that recorded and stored the behaviors of each animal and was able to distinguish individual changes.

This was the objective of a study by a Belgian scientific team, published in Animal in February 2020, which also analyzed the importance of the duration of the period during which data are collected by the algorithm to determine whether a cow suffers lameness. The lameness detection system of the study was based on the assessment of the position of the back of the animals.

The data were collected by observing for 15 months the cows in a herd of 2,000 cows located in Sweden. Individual profiles were generated that were used to assess whether deviations from the physiological position of the back occurred suggesting a lameness problem: arching of the spine was scored between 1 and 5, so that 1 was a physiological position, and 5 was a clearly arched position that related to a severely lame cow.

To validate the effectiveness of the algorithm, its results were compared with those of a direct individual observation scored by the Sprecher scale, which was carried out during the last six weeks of the study.

The algorithm automatically detected lameness with reasonable performance

The algorithm developed in this study showed specificity of 82%, sensitivity of 79%, accuracy of 82% and precision of 36%, when the data collection period to create the profile for each cow was unlimited (within the duration of the study).

In general, the algorithm’s ability to detect lameness improved as the observation period increased to create the individualized profile for each cow, with 200 days being the optimal period. Accuracy was higher with a data collection period of 50 days (87.3%), while precision was maximized with a period of 250 days (46.1%).


The authors were able to develop an algorithm to automatically detect lameness on dairy farms with reasonable performance. In addition, the study showed that the duration of the period during which cows are observed to create the individual profiles is critical for an optimal performance of the detection algorithm.


  • Jarratt G. The true cost of lameness. Dairy News (20/02/2020)
  • Piette, D., Norton, T., Exadaktylos, V., & Berckmans, D. 2020. Individualised automated lameness detection in dairy cows and the impact of historical window length on algorithm performance. Animal 14: 409-417.

© 2021 Dellait Dairy Knowledge Center. All Rights Reserved.

Sign up for our Weekly Newsletter

Nutretain Silage Inoculants

Maximize your forage potential with Nutretain,

25 years of proven succes