It's a problem that has been challenging bear biologists for decades. How on earth do you tell two grizzly bears apart. They almost all have that characteristic dish-shaped nose, a hump on the back of their neck that packs a mighty digging muscle, and long curving claws that can be up to 15cm long.

Magyarul

As someone who has spent much of the last 15 years deep in the Canadian wilderness working as a naturalist, taking tourists from all over the world, a small handful at a time, out to view wild grizzly bears in wilderness settings, I sympathise with the biologists. Even from fairly close quarters grizzly bears can look incredibly similar, and I cannot count the number of times I have been surprised to find that a bear I thought I was familiar with turned out to be a completely different animal.

Back in the old days the biologists would tell bears apart the old-fashioned away. They set crafty traps with snares and bait and, when they caught a bear, they tranquilised it with a dose of anaesthetic loaded onto the end of a pole as the bear snapped and lunged.

Once the bear was out for the count, the biologist took blood samples, weighed the bear, pulled one of its teeth out (a way of determining its age) and then tagged it with a radio collar which could be monitored from a detector held aloft in a light airplane that circled above the bear's suspected location.

 This method was - even in the best of cases - brutal, especially for the animal involved. Bears sometimes chewed off their own legs to get out of a snare and were invariably traumatised by the experience. The mere act of trapping a bear affected its subsequent behaviour so much that it contaminated the data that the collared bear was supposed to provide. I once spent a week with a bear biologist undertaking exactly this work, using four-year-old cow blood from a slaughter-house as bait. The blood made road-killed skunk smell good by comparison. Living bunked in a dirty trailer, it was a smelly, arduous and thankless business. 

Fortunately for the bears another technology eventually came along that was less intrusive. DNA analysis meant that instead of actually catching a bear you could set up an attractant with a piece of barbed wire around it. As the bear moved towards the attractant - dead beaver scent was a favourite for this - it would unknowingly leave a tuft of hair on the wire. This could then be sent to the lab for analysis. Unsurprisingly this was an expensive business. 

And for several years that is where things stood. So imagine my excitement when I was approached some five years by Mel Clapham, a young grizzly bear scientist from the British Columbia coast, and asked if I wanted to help develop a new way of monitoring bears. As the owner of a wilderness lodge in a remote interior BC valley, she said, I would be a perfect partner in the project, which aimed to collect as many photos and as much video of wild bears as possible. All my lodge had to go was cough up a few thousand dollars a year, and then, under Mel's supervision, carefully place trail cameras in places where bears like travel. The federal government was impressed with her proposal they agreed to match-fund the project. Once the images and footage were collected, the rest of the work, if her theory was right, would be done by computers. Mel found two software engineers in California happy to help out pro bono. The basis of the hunch Mel and the software engineers were working on was that if facial recognition software could work for humans, dogs and a few other animals, perhaps it could work for bears. We all knew that a bear's hairy face would make it far harder than analysing people, but if it did work we might just have a smart 21st-century and highly affordable method for identifying and counting bears. 

And if bears could be better counted, we would know more about their populations. And if we knew that they could be better protected, especially in areas where their numbers were low.  

We set up our first cameras the very season that Mel approached us. Using my experience of a decade of watching wild grizzly bears, I too Mel to likely spots. One criterion for the data was that the cameras had to catch the bears head-on, not sideways, for the software to work. Almost immediately footage began to flood in. And I soon realised that, even if the project never achieved all of its lofty aims, we had struck a small gold mine. Whereas before we had only been able to guess which animals were using which trails, now we saw grizzly bears, black bears, moose, elk, cougar, wolves, lots of deer and even a beaver. To add another level to our understanding I began to study animal tracking lore too. And, after many hundreds of hours of learning, I travelled down to the US with my two best wilderness guides and we all certified as wilderness animal trackers. When, last month, Mel finally published her first of two papers on the findings of the camera study, the results were electric. The study came back with an 84 percent accuracy rate of identifying bears. And it was only going to get better with time and more data.

The news burst like a bombshell in the bear biology world. Other media picked up the story too. The New York Times ran a long article. Canadian Broadcasting Corporation and several others ran stories. The combination of cutting edge technology and grizzly bears was too good a tale to miss. For years now we have been collecting $100 from every guest that comes to the lodge, which gives us a fund at the end of each season to promote bear conservation and science and lobby for better protection. Getting a ban on grizzly bear hunting in British Columbia in 2017 has been our biggest achievement to date. But we have also secured funds from Prince William's Royal Foundation to bring military veterans with mental trauma to the lodge for wilderness and nature therapy.  

Now it seems another of our projects is also beginning to pay off. Most of the data used so far for the software has been from coastal collections sites not ours. But our funding was crucial.

And late next year Mel is preparing to publish a new paper with our data included. If the results are as good as we hope we will potentially be able to use modelling, deep learning and video footage to count bear populations all over the world.

The software will be open-source and free-to-use. And, for bear conservation, that really will be a breakthrough.

The author is a former war correspondent, journalist, currently based in Budapest as guest lecturer of MCC Media School.

Cover photo: smithsonianmag.com