Combining Veterinary Research and Computer Vision for Early Disease Detection

Holstein Dairy cattle are brought into the milking parlor at the UW Dairy Cattle Center
Holstein Dairy cattle are brought into the milking parlor at the UW Dairy Cattle Center. A new computer vision model created by veterinary medical student Preston Cernek, intended for potential use in milking parlors globally, can examine the hooves of dairy cattle as they enter or stand in a parlor, helping to detect the disease digital dermatitis and identify cows in need of treatment.

Preston Andrew Cernek DVMx’21 stumbled across an opportunity he wasn’t anticipating the summer before last. “I was looking for a summer job and I literally just started knocking on people’s doors down at the production medicine department,” he recalls. Little did Cernek know that this hunt would land him a part in a research project with significant on-the-farm impacts.

One of the doors Cernek knocked on that day in the School of Veterinary Medicine was the office of Dorte Dopfer. An associate professor in the Department of Medical Sciences, Dopfer studies lameness in cattle and best practices to prevent and control diseases that cause lameness. She offered Cernek a role in a new and exciting research effort that would involve computer vision technology, training computers to interpret and understand the visual world. In this case, researchers would train computers to examine the hooves of dairy cattle as they enter the milking parlor on the farm. Examination of the hooves would help detect the disease digital dermatitis, identifying cows in need of treatment.

Digital dermatitis is a vicious disease, affecting 90 percent of U.S. dairy herds. It is linked to severe lameness and infertility in cattle and is one of the main causes of decreased milk production globally. Early detection is challenging on farms, which is where Cernek comes in.

veterinary medical student Preston Cernek
Preston Cernek DVMx’21

To assist in this project, Cernek trained himself in Python, a high-level computer programming language system, and “you only look once,” or YOLO, algorithms. Using Python, Cernek and collaborators in the Dopfer lab trained a computer vision model to detect digital dermatitis by scoring cows’ hoof lesions. With live camera footage, the system provides in real time a label for the life stages of digital dermatitis — visual references for the different phases of the life of an infection.

Cernek’s computer vision model can help facilitate detection of the disease more efficiently than people could. To test and refine the approach, Cernek and research specialist Kelly Anklam drove to a dairy farm in Eastern Wisconsin. At the farm, he and Anklam brought a laptop and camera into the rotary milking parlor. The camera, facing cattle’s backside, captured photos of each cow’s hooves as the animals slowly rotated past. Each photo went straight to the laptop, where the computer vision model labeled the image with a box surrounding portions of the hoof. These boxes are displayed in a multitude of colors, distinguishing if the hoof is healthy or not.

Cernek’s work on the project was supported by a veterinary student research fellowship from the Foundation for Food and Agriculture Research, in conjunction with the SVM’s Summer Scholars Program — an opportunity for current veterinary medicine students to gain research training.

In October 2019, he and Dopfer traveled to Munich to present their findings at BPT-Kongress, an annual meeting of veterinary practitioners. This fall, the Journal of Dairy Science published Cernek and his colleagues’ achievements. According to this report, their formula for a YOLO computer vision model labels hooves with a 71-88 percent accuracy rate, showing high efficiency in spite of rapid processing.

Methods such as these could fill knowledge gaps in livestock medicine and provide a new strategy for battling digital dermatitis while improving cattle welfare. Cernek continues to work toward his doctorate, while Dopfer and collaborators — which most recently includes 2020 Summer Scholars students Montana Lins DVMx’22 and Claiborn Bronkhorst DVMx22, and computer scientist Srikanthmadhavan Aravamuthan, who is pursuing a master’s degree in comparative biomedical sciences with support from the USDA — work to put this model into practice and pursue new opportunities to utilize computer vision technology to detect disease in livestock.

At just 25 years of age, Cernek has made important contributions to the commercial dairy industry, providing findings valuable to veterinarians and scientists worldwide.

Sam Lazar

« Back to News