System uses artificial intelligence to detect wild animals on roads and avoid accidents

Just as drivers in Brazil can be warned of traffic congestion ahead or a vehicle parked on the hard shoulder, notifications may soon pop up on their smartphone or on their car’s computer screen to warn them in real time that an anteater, wolf or tapir is crossing the highway. No human will necessarily need to see the animal in question or press a control button to send the warning.

For this to be possible, a key step is construction of a computer vision model that automatically detects Brazilian wild animals. Researchers have accomplished this, as described in an article published in the journal Scientific Reports.

“The species were selected in accordance with the metrics recommended by the Brazilian Center for Road Ecology Studies [CBEE, at the Federal University of Lavras, UFLA]. According to this center’s estimates, some 475 million animals are killed on Brazilian roads every year. We created a database of Brazilian species and trained a number of computer vision models to detect them,” said Gabriel Souto Ferrante, first author of the article. He conducted the study as part of his master’s research at the University of São Paulo’s Institute of Mathematics and Computer Sciences (ICMC-USP) in São Carlos.

According to Rodolfo Ipolito Meneguette, a professor at ICMC-USP, Ferrante’s supervisor and last author of the article, groups in other countries have been working for some time on systems that detect wild animals with the use of artificial intelligence, but models built abroad are not good at detecting Brazilian animals. Moreover, few are designed to identify animals on roads, an application that requires fast detection in environments where visibility may often be poor.

“Drivers also run a significant risk in collisions with large animals. They often have insufficient time to take action to avoid them. Our system uses roadside cameras coupled to a portable computer and is innovative in that respect,” he said.

Instant detection

To develop a system that recognizes Brazilian species, the researchers first built a database of Brazilian mammals that are most likely to be hit by road traffic, locating and downloading from the internet 1,823 photographs in the public domain (without copyright protection). Where necessary, the images were edited to remove “noise” (random variations in color, brightness, etc.) that could hinder identification of the species, or to assist identification by including a diversity of angles.

The researchers then tested different versions of YOLO (You Only Look Once), a computer vision algorithm widely used for real-time detection of objects, including wild animals. One of its advantages is single-stage detection, the most suitable type for real-time identification of large animals, as speed is favored over accuracy. Another factor that influenced the choice was the possibility of running the system on so-called edge devices, such as tablets and portable computers with relatively limited resources.

Videos of animals recorded by the researchers in São Carlos Ecological Park were used to test the efficiency of the system. Future updates to the database will include images of animals captured by forest camera traps and roadside cameras.

Curiously, older versions of YOLO were better at detecting animals. “The models correctly detected the species in 80% of images taken during the day with the animal appearing clearly,” Ferrante said. Typical computer vision problems (such as poor detection at night, in wet weather or when the animal is partially hidden) persist and will be the focus of future studies.

New images will be included in the database, and partnerships with toll road operators and city governments will enable the system to be tested in real-world situations, including integration with existing technologies.

In 2020, the group led by Meneguette developed an application that informs drivers about traffic conditions using real-time data collected by road users’ smartphones in Catanduva, a city in São Paulo state. The difference from apps like Waze or Google Maps is that in this system the municipal traffic authorities can input data.

“One possibility would be to couple our animal detection system to this app, which we already have, and thereby enhance animal and driver safety,” Meneguette said.

More information:
Gabriel Souto Ferrante et al, Evaluating YOLO architectures for detecting road killed endangered Brazilian animals, Scientific Reports (2024). DOI: 10.1038/s41598-024-52054-y

System uses artificial intelligence to detect wild animals on roads and avoid accidents (2024, April 9)

Don't miss the best news ! Subscribe to our free newsletter :