For over a year, authorities simply couldn’t identify the mentally ill man they’d found wandering in a train station -- until facial recognition figured out who he was, allowing him to return to his family.

The man was found in a tunnel in Chongqing’s railway station in January 2017. Poorly dressed and only able to mumble the word “money,” he was sent to hospital, according to local media cited by the South China Morning Post.

Using the man’s apparent local accent as a guide, hospital staff tried reading out the names of all the counties in Sichuan province to prompt his memories -- but still, nothing.

The breakthrough came when local officials got in touch with a company that was trialling facial recognition technology.

That company was able to match him with public records, allowing the man to be reunited with his brother.

While similar technology has been used in China for a variety of purposes -- from speeding up check-in at Beijing’s airport to catching a criminal among thousands of concert goers -- there are hopes it can be applied to “humanitarian applications” more in the future.

One of those is helping find the missing children, in a country where up to 70,000 are kidnapped every year.

Microsoft and Baidu have been working with Chinese NGO Baobei Huijia (Baby Come Home) to use AI to help locate missing kids -- where it is already paying off: Baidu says it was able to help reunite a child missing for two decades with only two images, taken six years apart.

But China’s massive investment in facial recognition is also causing fears about privacy. The country is building a national database of faces and a network of security cameras, with the goal of identifying a person within seconds.