Cameras for healty hooves data and models copyright anne reitsma Vision Robotics

Technology in livestock farming

6 November 2023

Once every two months, we introduce you to a specialist. We offer some insight into the person, their research, and their expectations. This time, we talked to Claudia Kamphuis, senior research associate at Wageningen Livestock Research about technology in livestock farming, particularly cows on dairy farms. “Simply unleashing an AI expert on a herd of cows is a tricky thing.”

Claudia Kamphuis has a dream. She hopes that by 2050, there will still be a place for Dutch livestock farming, especially dairy farming, because that is where her heart lies. Farming with respect for livestock farmers from government and society, and respect for the animals from farmers. “If we want to make this possible, we must monitor animal health, and for that we need to learn to understand animals better,” says Kamphuis, researcher at Wageningen Livestock Research and Vision + Robotics. We do not speak cow, chicken or pig language. So farmers need tools to help them better interpret whether an animal is comfortable or not. “Sensors, barn camera systems, and self-learning software offer the opportunity to take animal health and welfare monitoring to the next level in the coming years.”

Technology in livestock farming is a labour saver

Technology on the farm first emerged in the mid-1970s. Through a sensor attached to the cattle’s collar, farmers could feed them more individual concentrated feed. Five years later, the first milk meters appeared, soon to be followed by step counters. Labour saving was also the reason behind the introduction of milking robots in the early 1990s. This greatly boosted the application of sensor technology and cow data collection, says Kamphuis. Today farmers also use step counters and neck transmitters for measuring draft detention. They also use sensors that record eating and rumination behaviour, as well as the temperature, salt content, colour, and fat and protein content of milk.

Cameras could identify precursor signs of lameness in cows on dairy farms

To monitor animal health, we often take normal and abnormal behaviour as a starting point. Such as predicting when a cow is in heat and therefore when she can be inseminated. The conductivity of milk provides information on whether a cow has udder infection or not. Kamphuis: “These are all derivatives of something.” With a camera, you can see what’s going on in real time. You can objectively, continuously and non-invasively monitor an animal’s welfare and health 24 hours a day on a variety of aspects, by monitoring the animal’s behaviour and allowing your own decisions to be directly based on this information. Kamphuis mentions lameness, a condition that can significantly impair an animal’s welfare. Of course, if you see a cow dragging its leg, you don’t need a sensor or a specialist to conclude that it is lame. But this is about the grey area between a healthy and a crippled foot. “It’s really tricky to see that subtle transition between a normal and a ‘there’s something going on here’ foot. Besides, it also takes time to closely observe all those ladies in the barn.” Corporate blindness also often plays a role in the loss of this ability to see these fine-tuned differences. Fortunately, there are experts who can help. Like a hoof trimmer, a podiatrist for cows. This is a specialist who trims cows’ hooves back into shape so they can walk upright again. “Suppose a livestock farmer could use cameras to identify the precursor signs of lameness. This would allow them to look at the hoof sooner, or call in a hoof trimmer in time, which would help reduce the negative impact of lameness. And it would make for happy ladies in the barn.” Because lameness is something you can see coming. Kamphuis: “If you walk the wrong way, your hip will start hurting, and you’ll definitely sprain your ankle at some point. One thing follows another.”

How can AI and Computer Vision technology help detect lameness?

She recently completed a research study at the Dairy Campus, working on an algorithm to use AI to detect deviations from the normal gait pattern of cows, assisted by a tracking system and eight cameras in two positions, in the barn and free range area. This allowed her to accurately monitor all 110 cows 24/7. Using AI and Computer Vision, she followed the cows over time. “One of the things you look for in a cow to determine whether she’s lame is whether her head is bobbing up and down,” says Kamphuis. In the video footage, when you see the cow walking by from the side, and you know you have to find the head, you have to put a keypoint on top of the head, and one near the mouth. That way you can check over time to see where the keypoints are in the image, and create a derivative of the head going up and down. Of course, every human has their own gait, as does every cow. But even so: “When you capture these images over time and you suddenly see an anomaly, you know: this is something I need to look at.” In total, the researchers measured 17 keypoints on a cow’s body. Two of these were on the head, three on the back (one on the withers, one in the middle of the back, and one at the base of the tail), and 12 distributed over the four legs and hoofs. This is also how you can determine the curvature of the back; a lame cow is slightly hunched over as she walks. “If the farmer recognises the onset or a milder form of lameness this way, through subtle changes in gait pattern, they can start treatment earlier. By doing so, you not only improve the health and welfare of your cows, but you also ensure more efficient milk production, a better yield, and ease of labour.”

Cow keypoints machine vision Vision Robotics

Prevention is better than a cure. That is the reason why she wanted to study Animal Science, says Kamphuis. “As a vet, you make sick animals better. I was more interested in what you can do to prevent disease in the first place.” No, she did not grow up on a farm. She was a horse girl from early childhood, though. Her parents thought it was a rather expensive hobby. They said: “Claudia, if you absolutely want to work with a horse, go and find one yourself.” And so she did, with two of her girlfriends. Nine kilometres outside her home village of Oldenzaal, they rang the doorbell of the first farm where they saw horses prancing through the meadow. Could they perhaps take care of the horses? I guess so, answered the farmer. This was in Beuningen. “I’ve been visiting that family since I was nine years old.” They have a dairy farm. You sit at the table with these people, you hear things, and you see how hard and with how much passion they buckle down, while the laws, regulations, and preconditions keep getting stricter and stricter, and the gap between city dwellers and livestock farmers keeps growing. “It was at that table that my commitment and love for dairy farmers was born.

Kamphuis completed her study programme in Animal Science in Wageningen in 2004. This was followed by a PhD at Utrecht University on how to improve automatic mastitis detection. She used machine learning to analyse all the collected data. She then boarded a plane to DairyNZ’s Milk Harvesting and Farm Automation Team in New Zealand to explore how to use information and automation technology to reduce labour and increase productivity on dairy farms. In 2013, she was offered a postdoctoral researcher position at WUR Business Economics, working on sensors and precision farming. Her projects and research, she agrees, are always somehow linked to data analysis and how to use this in research on animal husbandry. “The study programme in Animal Science doesn’t train you in AI. For that, you have to go to a Technical University. I suspect that those students have no knowledge of animal husbandry and probably cannot picture it at all.”

AI and data technology in livestock and dairy farming

AI and data specialists are lining up to work in plant sciences, while the challenges within the animal world are considerably more interesting, she says. This starts in the most practical way in the barns themselves. Barns tend to have a lot of iron fences that often get in the way of a good internet connection. As do changing barn conditions, light and dark, spiders and flies, dust, moisture, and pests. “Without downplaying plant science and the challenges in that field, the great advantage of plants is that they do stay in one place, while animals don’t. That only adds to the challenges.” People have no problems identifying cows, also based on camera images. This is Klaartje 46 and Sabine 52. To do so, you look at the spotting pattern of the cow, since that is quite unique. Within one barn, you don’t often have cows with the same ‘spots’. Now that’s easy when talking about Holstein Friesian cows. But Jersey cows are all brown. And Limousin and Charolais cows are also strikingly similar. “So then you can use cameras to look at the cows’ faces, at how far apart the ears or eyes are.” Or you can use computer vision to read the ear numbers, if the animal has a fixed position in the barn. Cows also often wear a tag. You can link the signal from that RFID system to the camera, allowing you to track an individual cow. “And what about the challenges of a barn with 40,000 chickens, which are visually indistinguishable and constantly moving?”

Understanding cow behaviour is key to successful AI and Machine Learning technology in livestock farming

Knowledge of an animal is important to understand its behaviour. And that is what she is doing, says Kamphuis. “My domain is animal science. I bring knowledge of the animal to the technology. You do need to know that a cow is a herd animal, and that there is a hierarchy within each herd. This helps you understand what to look for with the camera. And AI or machine learning might show you cow behaviour you don’t know yet.” In any case, “simply unleashing an AI expert on a herd of cows is a tricky thing.” She explains that she once did a project with a technical company whose data specialists looked only at the graphs. They came back very excited with an analysis that they themselves found really interesting. “We see that the cows have a certain pattern when it comes to milk production. They all go up a bit first and then back down in their milk yield.” That is nothing special, as any cow expert will tell you, because it’s a natural lactation pattern. The data experts had seen something else that struck them, she recalls. “For all the cows we followed, we’re missing four to six weeks of data. For some cows in January, for others in April.” “They found this strange, but it’s not, because cows do not give milk during those weeks. They go through a dry spell to recover before moving on to a new lactation cycle. So no data error, just normal behaviour.”

Cameras for healty hooves data and models copyright anne reitsma Vision Robotics

Precision livestock farming

What she notices is that researchers are still primarily looking at solutions for all animals in a barn. If it’s too hot in a barn, the fans are turned on. But maybe there is a cow who thinks: ‘I like the heat, and hell, now someone has suddenly turned on that fan’. While another cow might be saying: ‘Finally, why couldn’t they turn that thing on earlier?’ “How great would it be if the animals got to decide for themselves what they need when.” If it gets too hot, add some extra coolness, and if not, let the heat be. This is called Precision Livestock Farming. Monitoring individual animals in a group rather than the whole group. “You can use sensors to measure a cow’s heart rate. So also whether it might be too hot or too cold.” People get information about their bodies through the watches they wear. “You can put those same sensors around a cow’s ankle to measure its heart rate, sweat production, and breathing. Although it’s best to do this in non-invasive ways.”

There is plenty to measure in and around the barn, with sensors, cameras, and step counters. “But we’re not yet making optimal use of all this data,” says Kamphuis. Her work centres on discovering how this can be done better and in what ways machine learning can assist farmers in making better use of all that data, because that link is still missing. For example with MIR data, mid infrared data. A MIR analysis is made of each milk sample from all Dutch cows. All these samples are then combined into multidimensional data. “That is a lot of data, but the challenge is how to really use it.” That sounds very silly, because why would you collect so much data if you know you won’t be doing anything with it anyway. “Because researchers think that maybe all that data is very valuable, but they simply don’t know how to get to this value yet. So, they say, let’s save it all, and we can interpret it correctly later, and use it to develop tools for automated recognition of behavioural patterns.”

AI and Computer Vision technology to improve livestock welfare and health

The Dutch Council on Animal Affairs (RDA) has formulated six guiding principles for animal-worthy livestock farming: good nutrition, good environment, good health, natural behaviour, respect for the animal’s own values as a being that can experience pain and pleasure, and a positive emotional state. This makes it even more important to understand animals better, says Kamphuis. She expects cameras and AI to play a big role in this. But how? “The most important thing remains that livestock farmers can use new technology to improve the health and welfare of their animals more easily and quickly. This leads to sustainable dairy farming with respect for the animal. And that is what I strive for.”

(Photo header and photo cows in barn copyright Anne Reitsma)

Claudia Kamphuis Vision Robotics

dr. C (Claudia) Kamphuis

Researcher Big Data

Categories: LivestockTags: ,

Contact dr. C (Claudia) Kamphuis