A mentally ill Chinese man who was missing for over a year has been reunited with his family with the help of China’s massive and controversial network of facial recognition systems.

Officials were unable to identify the confused man who was found wandering around in a tunnel of Chongqing railway station in January 2017, Chinese media reported.

The man, who mumbled the word “money” to questions about his origins, was admitted to hospital and remained in the care of authorities for over a year. Attempts to find his home based on his thick regional accent also failed.

A breakthrough came when officials contacted a technology firm working with local government on a facial recognition technology scheme.

The man was identified as a 31-year-old from Liangshan Yi autonomous prefecture in Sichuan after the technology compared a picture of the man’s face with public records.

The man was reunited with his brother at a shelter in the prefecture, the South China Morning Post reported.

China is pioneering the use of facial recognition technology, which works by building a ‘faceprint’ based on the distances between facial features, and comparing it to an identity database.

While the technology is used in China for a wide range of purposes – from opening doors to making purchases to even accessing public toilets – critics say it also has more sinister uses.