Technology is continuing to develop and improve our day-to-day lives. The usage of technology has also been utilized in the beef industry, such as with RFID tags, genomic testing and robotics. The newest technology to enter the ring is artificial intelligence (AI), which is continuing to develop for the use of facial recognition in cattle, which is being implemented, and which can contribute to a national disease animal traceability program with a developing app called CattleTracs.

Sip olivia
Freelance Writer
Olivia Sip is a freelance writer based in Minnesota.

What is facial recognition?

Facial recognition has been used to identify human faces through biometric technology, which maps facial features from a photograph or video and compares the information with a database of known faces to detect a match. This technology can be used as a password to open our cellphones and is used for global entry for U.S. Customs.

Joe Hoagland, founder of the American Black Hereford Association, Black Hereford Holdings Inc. and developer of the cattle facial recognition app CattleTracs, funded a project on facial recognition in quarter horses. This project was inspired by the need for pedigree verification within the quarter horse industry, since eartags or anything on the animal or in the animal isn’t desired in horses. Hoagland, along with other researchers, wanted to identify quarter horses with the human version of facial recognition to try to find a solution to this problem. Of course, there were roadblocks within this project to get good photographic data on the horses.

In human beings, photographic data is collected as a full headshot and biometric measurements of the head, such as space between the eyes, distance from the earlobe to the point of the chin and distance from the nose to the top of the upper lip. This approach was used to get a grasp on the distinguishing features of the horse's skull. Getting adequate data on a horse was a challenge. Hoagland, broadening his research, then reached out to KC Olson, Kansas State University (K-State) animal scientist, to see if facial recognition could be done with cattle. Olson then put a team of researchers from K-State together to evaluate the concept of facial recognition for cattle.

Typically, when we ID cattle, we utilize visual forms of identification such as eartags and tattoos, which are prone to breakage and loss over time, including RFID tags that go in the ear. Chips under the skin also tend to migrate, and brands can become unreadable over time. Some of these can also be falsified; this is why facial recognition seemed like a valid idea, explains Olson.

Advertisement

K-State research

Olson began research in the winter of 2019-20 with Dr. Dan Thomson. Olson and Thomson had students take short video clips of 700 feeder cattle in low resolution, taking a panoramic view of each calf’s head. These short videos were about seven seconds a piece, about 27 frames per second, in moderate resolution for cellphone cameras. From these videos, computer scientists at K-State analyzed over 1,000 total videos and each individual image of the cow’s head. Forty percent of these photos were uploaded to a neural network – a type of AI that can learn from data to recognize faces. Once cattle faces are recognized, the system teaches itself which biometric features of the bovine head are the most distinguished. Another 40% of the photos were withheld from this step and used to refine the machine’s learning technique; the last 20% of the photographs were used as test validation that the neural network wasn’t exposed to. “The computer had to make a judgment if it had seen a particular animal before or if it hadn't,” says Olson.

59583-sip-photo-1.jpg

Joe Hoagland started with facial ID in horses before branching out to cattle. Photo provided by Joe Hoagland.

Hoagland explains that with same-day identifications, they were able to accurately identify 94% of the cattle faces. “Facial recognition, like most facial analytics, is a question of probabilities; there are always going to be some that you are not sure of,” he says. With this positive result, Hoagland and researchers shared it to the industry. There was then immediate interest from animal health experts with the goal of tracking cattle diseases and from ranchers to collect data on their own cattle, utilizing it for marketing.

With research at hand, the app CattleTracs was developed. Use of this app will be a way to trace disease in the beef supply chain and for cattle producers to age and source verify their product. CattleTracs is currently being enhanced to continue to collect and build a database, which is the biggest challenge, explains Hoagland.

Deploying cattle facial recognition in Brazil

Hoagland is currently working with the European Commission on a project for them to deploy CattleTracs in Brazil. The European Union (EU) is not accepting products produced in areas of deforestation and is requiring producers who send beef to Europe to prove that the beef was produced somewhere else. Under regulation, any trader or operator who places or exports commodities from the EU market must be able to prove that the products did not originate from deforested land. In CattleTracs, the photographs of the cattle are tagged with the date and GPS location of where the photograph was taken. This technology is in the process of being modified to be used in Brazil to prove the cattle are there and were produced there. This is what Europe needs to allow Brazil to export to Europe; if Brazilian producers can’t do that, the EU will prohibit Brazilian beef from coming into the EU, explains Hoagland. “This is a slow process in Europe because there are a lot of approvals required,” he says.

Hoagland is currently taking a course studying cryptographic hash functions, which are the basis for blockchain technology. This technology is primarily used in the finance sector for digital currencies such as bitcoin. "We are using this technology to provide third-party verification for these cattle photographs taken in Brazil so that they can’t be altered," explains Hoagland. “This is like a digital currency transaction in a sense.” These photos will be secured so they can’t be manipulated or Photoshopped, providing security for the users of the app. “Using blockchain makes it impossible to say that a photograph was taken somewhere else,” says Hoagland.

The future of CattleTracs

One of the best applications for AI is photo analytics. According to Hoagland, when looking at facial recognition, there are two types of algorithms. “One is to ask the question of the algorithm, ‘who is this,’ out of a huge database, which is never going to be 100 percent. Another algorithm that can be used in facial recognition is to ask the question, ‘Is this who we think it is?' which is much more accurate.” 

A trial with a major beef packer was conducted to determine if the algorithm could identify cattle over time as they grew in the feedlot. Cattle were entered when they first came to the feedyard and when they were about to be harvested, gaining 500 pounds and changing the biometrics of the animal. Facial recognition has two components: one is the biometrics, such as the angles, distances and key features of the face, and the other is a texture analysis that compares binary pixel patterns, explains Hoagland. “Each pixel of the photograph is compared to the pixel next to it for color differences, to detect changes in color patterns.” This component is very useful when entering cattle that have red faces with different shading and in dairy cattle with black and white patterns on their faces. “Any cattle that have patterns are easily recognized, but the solid black cattle, with very little texture difference from one pixel to another, especially around the eye feature, is not enough of a change to really create any patterns,” he says. Facial recognition on solid black cattle as they age and if they pick up mud in a feedlot is problematic and changes the hair pattern, distorting facial recognition and not being able to be identified by the algorithm, explains Hoagland.

“The biggest challenge right now is tracking solid-black hided cattle as they age,” says Olson. Hoagland also explains that with facial recognition in cattle, it is sort of stalled out until the camera functions of cellphones improve. It is believed that we are two to three years away from having the technology to catch up with what we need. “However, right now we are keeping focused on the blockchain technology in Europe to track cattle,” says Hoagland.