Moscow is adding facial-recognition technology to its network of 170,000 surveillance cameras across the city in a move to identify criminals and boost security.

Since 2012, CCTV recordings have been held for five days after they're captured, with about 20 million hours of video stored at any one time.

"We soon found it impossible to process such volumes of data by police officers alone," said Artem Ermolaev, head of the department of information technology in Moscow. "We needed an artificial intelligence to help find what we are looking for."

Moscow says that the city's centralized surveillance network is the world's largest of its kind. Britain is notorious for its use of CCTV cameras but precise figures are difficult to obtain. A 2013 report by the British Security Industry Association said there were as many as 70,000 cameras operated there by the government.

Moscow's facial-recognition technology was designed by Russian startup NTechLab. The system cross-references a digital fingerprint of images from the Interior Ministry's database against a those captured by cameras at entrances to apartment buildings, Ermolaev said. A two-month trial of the system earlier this year resulted in six criminals being detained, he said.

NTechLab's accuracy has been recognized by the U.S. Department of Commerce and the University of Washington. The Moscow-based company released a mobile app called FindFace last year that became a big hit in Russia. Consumers would take a photograph of strangers in public spaces and the tool would identify those in the picture by matching their faces to profiles on Russia's largest social network, VKontakte, with a 70 percent accuracy rate.

Facial recognition technology has been creeping into the consumer market for a number of years, with increasing accuracy and acceptance by users. Microsoft's Windows 10 operating system can be unlocked when an authorized user sits in front of a computer's webcam and Samsung Electronics includes similar technology in its smartphones. Apple said that its flagship iPhone X would swap a fingerprint security sensor with facial recognition.

Ermolaev said that the Moscow government is already spending about 5 billion rubles ($86 million) a year to maintain its video surveillance system. Deploying facial-recognition to all of 170,000 cameras would have tripled these costs, he said, so the technology will be applied selectively within districts where it's currently most needed.

Such systems are legal in Russia, says Mikhail Zyuzin, an IT expert at the Moscow-based Academy of Information Systems. It causes concerns about personal privacy, however. "If the system is hacked by third parties, they could potentially get access to information on where you live, where you go and what routes you take," he said.

Ermolaev says the data is kept in a closed system accessible only to a limited number of users. Additionally, the software will only compare images from CCTV cameras to information already in police databases.

"We live in an open world," Ermolaev said. "It's easy to track that Laura from the sixth apartment is being visited often by Mike from a neighboring building without the city's surveillance cameras."