16/03/21 |   Research, Development and Innovation  Animal production  Automation and Precision Agriculture

Algorithm individually identifies cattle in the field through images

Enter multiple e-mails separated by comma.

Photo: Cláudio Bezerra

Cláudio Bezerra - The study used three models of neural network architecture for the identification of Pantaneiro cattle

The study used three models of neural network architecture for the identification of Pantaneiro cattle

  • The technology allows the individual identification of the animals through computer vision.

  • It can replace ear tags and branding used today to identify cattleIt can replace ear tags and branding used today to identify cattle

  • The technology dispenses with current modern equipment like electronic IDs, which have become more expensive with the dollar exchange rate.

  • It can expedite tracking and legal requirements like the Animal Waybill

  • Researchers adapt system so that it also works on cell phones.

  • Technique will now be tested with Nelore cattle, the most produced breed in Brazil

The cattle-farming of the future has already been making experiments to make the individual identification of animals in the field viable with the use of images, which will in turn make ear tags, tattoos and branding used for this purpose obsolete. The technology is similar to facial recognition, often used in large airports to find criminals. It comprises a conventional system of cameras set up in the field, troughs, or even on drones, which can capture images to identify each animal in a few seconds.

Scientists were successful with the Pantaneiro cattle breed. By using convolutional neural networks (CNN), the study resorted to three neural network architecture models for the identification of Pantaneiro cattle. 

The work was led by the computer scientist Fabrí­cio de Lima Weber, during his master's degree at the Mato Grosso do Sul State University (UEMS). Weber says that in addition to animal welfare, one of the advantages of the image-based identification system is savings. “The ear tags used today are imported and the dollar exchange rate has been rather unstable. The farmer who uses this system also needs to also buy the reader to decode the code printed on the ear tags. When an animal loses its tag in the pasture, it needs to be replaced”, the specialist details. 

“The image-based system will expedite animal shipments and the issuing of GTAs [acronym in Portuguese for livestock waybill]”, explains Weber, already glimpsing at the opening of the Bioceanic Route, which will link Brazil to the port of Chile and facilitate boarding livestock to Asia. Previous studies had already assessed ascertaining animal weight through images of their backs.

According to Urbano Gomes Pinto de Abreu, a researcher at Embrapa Pantanal and co-author of the publication, they used images captured from videos by four surveillance cameras. “Then we extracted images from given frames that contained the object of interest: the back, the profile, the side and the face of each head of cattle”, he reports.

Publication and team

A study in this line of research has already been published in the paper Recognition of Pantaneira cattle breed using computer vision and convolutional neural networks in the journal Computers and Eletronics in Agriculture

The other authors are Vanessa Aparecida de Moraes Weber, Geazy Menezes, Adair da Silva Oliveira Junior, Daniela Arestides Alves, Marcus Vinícius Morais de Oliveira, Edson Takashi Matsubara e Hemerson Pistori. 

The classification stage compared three known models in the deep learning literature: InceptionResNetV2, Resnet-50 and DenseNet201. The experimental findings show that the model architectures used in the research reached excellent results, with accuracy of up to 99.86%. “The results indicate that the models assessed can support researchers and farmers in the recognition of Pantaneiro cattle. It is a method that contributes to animal welfare”, asserts the scientist from Embrapa.

According to the authors, there was evidence that convolutional neural network models could form the basis of a computer vision system that automatically identifies animals.

The experiment mobilized 51 Pantaneiro breed animals of various ages and from both sexes. The images that form the dataset were collected by the Aquidauana Pantaneiro cattle Center (Nubopan), at Mato Grosso do Sul State University (UEMS).

 

27,000 images

The collected videos were analyzed and divided into 212 shorter videos, from which the frames that contained images of the animals were extracted to form the database with 27,849 images of Pantaneiro cattle.

The three architectures showed accuracy rates that ranged from 98.87% to 99.86% and picture processing time from 13 hours and 14 minutes (minimum) and 54 hours and four minutes (maximum). Such calculations took place in two stages: machine learning, when it captures and processes the images to create a database; and validation, when unknown images are added to the machines for recognition and identification.

After the success of the experiment with the Pantaneiro cattle, Abreu reports that the next stage will be to research algorithms that allow developing the same technique to identify images of Nelore cattle, which is the most representative beef breed in Brazil.

However, before that, Weber intends to develop an app so that the identification of the studied Pantaneiro cattle can soon appear on a cell screen. “If the farmer is at an agricultural trade show, for instance, they can access an animal's data through the app and learn the history of the breed, for example, additional information from a database”, the computer scientist exemplifies. He underscores that the Pantaneiro cattle is considered to be endangered and the ongoing projects aim at their conservation in situ.

Cattle farmer: “The system would be a dream!”

The cattle farmer Leonardo de Barros, from the Santa Clara farm, in the Pantanal around the town of  Nhecolândia (Corumbá-MS), says that this identification system with images would be "a dream”. “If there was a way to transmit the data via bluetooth directly to the computer, without typing or scanning anything, that would be a dream”, he affirms.

According to him, the ear tags that identify the animals pose some difficulties. “Sometimes it does not read right, the animal loses the ear tag, people have to reapply it. Not to mention the stress of containing the animals to make such identification”, Barros explains.

The cattle farmer says that he buys ear tags at least twice a year and between 7% and 8% of the devices end up lost in the field, which compromises the data. He is also confident that the image-based system would ensure animal welfare. “Today, with the ear tag system, the animal needs to be contained at least three or four times in its lifetime. We have to detain them to place the tag, and then again to read the data. This stresses the animals and can hurt them.”

Another risk is the occurrence of diseases as a result of the ear piercing. “A fly can land there and bring larvae to the region. Then you have to heal it. The image system would bring enormous advantages”, he reasserts.

Barros' expectation is that the data caught by the images can have commercial effects, since they would allow for traceability with precise information about each head of cattle. “Imagine a way to know when that cow has given birth, when it was weaned, the cares it has received. I would really like to have this system in my farm”, the farmer declares.

His only concern regards the cost of setting up the camera system. “I can imagine that it should not be very cheap, but it has to have functionality”, he says. Nevertheless, for him, the identification through images would have  “so many advantages that [he] can't even begin to describe”. 

Photo: Leonardo de Barros

 

Ana Maio (MTb 21.928/SP)
Embrapa Southeastern Livestock

Press inquiries

Mariana Medeiros, translation - English
General Secretariat

Raquel Brunelli (MTb 113/ MS)
Embrapa Pantanal

Further information on the topic
Citizen Attention Service (SAC)
www.embrapa.br/contact-us/sac/