In Northern India last week, seven members of a family were buried alive in their home by a mudslide caused by heavy rains. In July, a landslide at a jade mine in Myanmar killed 27. Early this year, debris flows in Southern California killed more than 20 people.

Landslides, mudslides, debris flows—all geologic hazards involving earth, mud or rocks moving quickly downhill—can happen almost anywhere there are slopes. As they occur suddenly and seemingly without warning, they’re often deadly. Though estimates vary, these events kill nearly 5,000 people a year.

But Australian researchers may have found a way to detect landslides as far as two weeks in advance, giving residents time to evacuate and engineers the opportunity to shore up slopes. Using AI and applied mathematics they’ve developed a software that can identify the subtle signs of an impending slide, signs that would be invisible to the naked eye.

“Right now, a lot of the predictions [about where landslides will happen] are based on someone’s gut instinct on the location,” says Antoinette Tordesillas, a professor at the School of Mathematics and Statistics at the University of Melbourne, who co-led the research. “We don’t rely on gut instinct. We want to develop an objective method here.”

To develop the software, Tordesillas and her team used radar data from mining companies, which produce extremely detailed information of the surface movement of slopes. The team took the data and looked for patterns, eventually figuring out which networks of movements indicated unstable locations. They also used data from a landslide-prone Italian volcano to help develop the algorithm.

“It’s a very big data set, and this is an effort that is basically like finding a needle in a haystack filled with needles,” Tordesillas says. “It’s not just finding any pattern, because there are so many patterns that come out in data on landslides. The challenge is finding the one pattern that can give you a clue on the location where this event is to happen in the future.”

The software can also incorporate data about other landslide risk factors, like rainfall and erosion, making the targeting even more precise. The data used for monitoring can come from radar based on the ground, on satellites or even in drones.

Tordesillas and her team hope the software will help some of the world’s most vulnerable populations.

“Landslides are a global problem,” she says. “But especially it’s become really prevalent in Third World countries in what’s called ‘garbage cities.’”

These garbage cities, Tordesillas explains, are landfills with populations of squatters who live amidst the trash, picking through it for things to sell or trade. Globally there are about 15 million people living in such conditions. Garbage cities are especially prone to landslides, and they’re inherently unstable.

“You’re talking about mounds of garbage comprising loosely bound solids, rubbish,” Tordesillas says. “The difference between those areas and a natural slope is that in a natural slope the geological material has had millennia to congeal and solidify to form a stable material.”

While landslides affecting wealthy areas like Southern California make headlines, garbage city landslides are often not even reported, as the squatter villages are illegal. Tordesillas hopes her team’s software could help give early warning to these residents.

“This sounds promising,” says Michael Hamburger, a professor of geophysics at Indiana University who studies landslides, of the technology.

Monitoring landslide-prone areas produces massive amounts of data, Hamburger says, and scientists need better ways of analyzing the data. Technologies like the University of Melbourne software stand to help make this analysis happen more quickly.

But only areas being monitored could be helped by the software, and most landslide-prone areas aren’t monitored at all, Hamburger says. “It’s a tiny percentage [that is monitored],” he says, “and over the world there are millions and millions of square miles, particularly in mountainous regions, and particularly in the developing world, that are systematically prone to landslides that are definitely not being monitored in any systematic way.”

Tordesillas hopes data can one day eventually be collected via small portable devices, perhaps even phones, making monitoring more accessible for more locations.

“We can then take that data and return within minutes a probability of a collapse happening,” she says.

The team also hopes to test their tools for structural health monitoring, predicting the collapse of structures like bridges or dams.

With recent collapses like the bridge in Genoa, Italy that killed more than 40 and the Florida bridge collapse that killed six still fresh in our collective mind, the world might want to cross its fingers for the technology’s success.