Could AI text alerts help save snow leopards from extinction?

Snow leopards cannot growl. So when we step towards one of these fierce predators, she's purring.
"Lovely," as she's called, was orphaned and rescued 12 years ago in Pakistan-administered Gilgit-Baltistan.
After years of relying on staff to feed her, she does not know how to hunt in the wild - and cannot be set free.
"If we release her, she would just go attack a farmer's sheep and get killed," Lovely's caretaker, Tehzeeb Hussain, tells us.
Despite laws protecting them, between 221 to 450 snow leopards are killed each year, the World Wide Fund for Nature (WWF) says, which has contributed to a 20% decline in the global population over the past two decades.
More than half of these deaths were in retaliation for the loss of livestock.
Now, scientists estimate that just 4,000 to 6,000 snow leopards are left in the wild - with roughly 300 of these in Pakistan, the third-largest population in the world.
To try and reverse these worrying trends, the WWF - with the help of Pakistan's Lahore University of Management Sciences (LUMS) - has developed cameras powered by artificial intelligence (AI).
Their aim is to detect a snow leopard's presence and warn villagers via text message to move their livestock to safety.

Tall, with a solar panel mounted on top, the cameras are positioned high among barren and rugged mountains at nearly 3,000m (9,843ft).
"Snow leopard territory," says Asif Iqbal, a conservationist from WWF Pakistan. He walks us a few more steps and points to tracks on the ground: "These are pretty new."
Asif hopes this means the camera has recorded more evidence that the AI software - which allows it to differentiate between humans, other animals and snow leopards - is working.
Trial and error
The WWF is currently testing 10 cameras, deployed across three villages in Gilgit-Baltistan. It has taken three years to train the AI model to detect these categories with impressive - if not perfect - accuracy.
Once we're back down the mountain, Asif pulls up his computer and shows me a dashboard. There I am, in a series of GIFs. It correctly detects I'm a human. But as we scroll down the list, I come up again, and this time I'm listed as both a human and an animal. I'm wearing a thick white fleece, so I forgive the programme.
Then, Asif shows me the money shot. It's a snow leopard, recorded a few nights prior, in night-vision. He pulls up another one from the week before. It's a snow leopard raising its tail against a nearby rock. "It's a mother leopard, looks like she's marking her territory," Asif says.

Setting up the cameras in rocky, high-altitude areas took a lot of trial and error. The WWF went through several types of batteries until it found one that could withstand the harsh winters. A specific paint was chosen to avoid reflecting light as animals pass by.
If the cellular service fails in the mountains, the device continues recording and capturing data locally. But the team has had to accept there are some problems they simply cannot solve.
While the camera lens is protected by a metallic box, they've had to replace solar panels damaged by landslides.
Doubt in the community
It is not just the technology that has caused problems. Getting the local community's buy-in has also been a challenge. At first, some were suspicious and doubted whether the project could help them or the snow leopards.
"We noticed some of the wires had been cut," Asif says. "People had thrown blankets over the cameras."
The team also had to be mindful of the local culture and the emphasis on women's privacy. Cameras had to be moved because women were walking by too often.
Some villages still have yet to sign consent and privacy forms, which means the technology cannot be rolled out in their area just yet. The WWF wants a binding promise that local farmers will not give poachers access to the footage.

Sitara lost all six of her sheep in January. She says she had taken them to graze on land above her home but that a snow leopard attacked them.
"It was three to four years of hard work raising those animals, and it all ended in one day," she says.
The loss of her livelihood left her bedridden for several days. When asked if she is hopeful the AI cameras could help in the future, she replies: "My phone barely gets any service during the day, how can a text help?"
At a gathering of village elders, leaders of the Khyber village explain how attitudes have changed over the years, and that a growing proportion of their village understands the importance of snow leopards and their impact on the ecosystem.

According to the WWF, snow leopards hunt ibex and blue sheep, which stops these animals from overgrazing and helps to preserve grasslands so villagers can feed their livestock.
But not all are convinced. One local farmer questions the benefits of the animals.
"We used to have 40 to 50 sheep, now we've only got four or five, and the reason is the threat from snow leopards and from ibex eating the grass," he says.
Climate change also has a part to play in why some feel threatened by snow leopards. Scientists say warming temperatures have led villagers to move their crops and livestock to higher areas in the mountains, encroaching on snow leopards' own habitat, making livestock more of a target.
Whether the villagers are convinced by the conservation message or not, the WWF tells us legal penalties have served as a strong deterrent in recent years. Three men were jailed in 2020 after killing a snow leopard in Hoper valley, about a two-hour drive from Khyber. One of them had posted photos of himself with the dead animal on social media.
While those involved in the camera project are hopeful their AI devices can have an impact, they know they cannot be the sole solution.
In September, they are going to start trialling smells, sounds and lights at the camera sites to try to deter snow leopards from moving onto nearby villages, putting themselves and livestock in jeopardy.
Their work tracking these "ghosts of the mountains" is not over yet.