Detecting Lameness

April 2023

AI software identifies lameness early in dairy cows.

A collaborative research and development effort by software development scientists at Iris Data Science, Pāmu dairy farms, and a team of South Otago vets, has resulted in an AI tool that accurately identifies lameness in dairy cows before it can become a bigger problem. It is currently being offered to farmers through a newly formed stand-alone company, OmniEye. To get to this stage, an enormous amount of research carried out by vets, scientists, and farmers lies behind this new tool.


Lameness in dairy cows is a significant issue estimated to cost the primary industry up to 500 million dollars a year in animal health costs and production losses. In an effort to decrease the impact of lameness in the dairy industry, Ministry for Primary Industries (MPI) has funded a number of research projects through the SFFF fund, investigating the national prevalence, duration and risk factors of lameness and determining practical interventions for farmers. 


Lameness can be caused by multiple factors including genetics, calving, body condition, prior injury, wet weather, farm infrastructure, aggressive stock handling, hygiene, time on unstable or uneven substrates, reduced lying times, and walking long distances to milking. It can be a result of injury or infection due to disease, bruising, ulcers, or skin conditions such as dermatitis. It causes animals to suffer pain and reduces milk production, adversely affects the reproductive health of cows and the image of the dairy industry, increases animal health costs, and decreases job satisfaction for staff who care for their animals. Complicating matters further, evolutionary pressure on these herd animals has made cows good at ‘hiding’ their injuries, so lameness can be difficult to pick up, particularly in its early stages.


In 2018 Greg Peyroux, from data science company Iris Data, was working on a facial recognition camera and software project for sheep and other livestock, with the help of Ag and foodtech accelerator and investor, Sprout Agritech.  When Covid19 shut the country down, Greg spent his time in isolation talking with farmers, MPI officials, researchers, life-stylers, and others, what they thought would be the best use of smart cameras on farm. The clear winner was a need to identify behaviours that indicated health and/or production problems. Greg was aware of some research around lameness in dairy goats and thought a model could be developed for dairy cows. In 2019 he was introduced to the Pāmu team, not too far from his Dunedin based company’s headquarters.


Rob Ford who worked for Pāmu in 2020, and is connected with Sprout, introduced Iris Data to Justin Pigou, Dairy Business Manager at Pāmu (Landcorp Farming Ltd) and Matt Hamilton,  Landsdown’s farm manager. Landsdown forms part of the Waitepeka Dairy Complex that includes two dairy units and a dairy support property. Located at Romahapa, Landsdown is 262ha effective, milking 680 cows at peak and producing between 350 and 385kgs MS. 


Justin confirms lameness in dairy cows is a multi-million-dollar problem. It can cause losses of up to $500 per cow per lactation, and it is not unusual for herds to have between 70 – 80 cases a year. Justin says Pāmu became interested in the development of an AI approach when initial conversations suggested a more reliable tool could be created, enabling lame cows to be identified earlier and more accurately than could have been by dairy workers all too human, or less experienced, eyes. It could also free up time for other important farming tasks.


Early identification of lameness means reduced suffering for animals, speedier resolution of potential problems and less intervention required (particularly use of antibiotics). Early trials carried out on Pāmu properties indicate that AI diagnosis is earlier and more accurate than humans. The required equipment does not interfere with handling or flow of cows through the milking shed. The other benefit is its relatively low cost. As Justin says, if it saves two or three cows from becoming very lame, it has paid for itself.


In 2019, initial discussions were held around developing a pilot programme. The majority of research and development was undertaken at the Landsdown farm at Waitepeka, starting in 2020, then expanded not long after to the Dunns farm next door. An additional eight farms in the North Island were added from late 2021.


A collaborative approach was taken from the beginning and local Balclutha vet, Hamish Moore, prepared information about lameness for Greg to consider, deciding what was needed to be recorded on camera, and how to teach a machine to interpret an individual cows’ movement. Greg explains the machine was taught to recognize how healthy quadrupeds move, and then how to identify lame cows, the extent of that lameness, then send the right information to assist milking staff to identify, draft out and treat animals as required.


Greg says many thousands of data points are used to rapidly assess the movement of cows as they return to their paddock after milking, and a score is made from zero to three, depending on any observed lameness. The scoring system is promoted by DairyNZ, so is familiar to most dairy farmers. To test the accuracy of identification during the development phase, a selection of recorded videos was sent to vets around the country, to calibrate the machine learning against experienced veterinarians. Hamish Moore and his team at Clutha Vets are also involved in ongoing assessment, providing confidence in the AI system. 


A daily report is produced and fed into the farm management system, with animals identified that may need to be drafted out the following day and checked. Justin Pigou says the project has generated more general discussion about lameness, and a raised awareness of the variety of factors that cause it. He adds there is potential for a similar machine learning approach for identifying animals in heat, assessing body condition scores, and the like. The system has been rolled out to about 35 farms across the country to date, 10 of which are Pāmu operations.


DairyNZ Healthy Hoof Lameness Scoring video: