TOURING the headquarters of Megvii in Beijing is like visiting Big Brother’s engine room. A video camera in the firm’s lobby recognises visitors in the blink of an eye. Other such devices are deployed around the office. Some of the images they capture are shown on a wall of video called “Skynet”, after the artificial-intelligence (AI) system in the “Terminator” films. One feed shows a group of employees waiting in front of an elevator with a white frame around every face and the name of each person next to it. Quizzed on the Orwellian overtones of the set-up, Yin Qi, the startup’s chief executive, simply remarks that “this helps catch bad guys.”

Even if Mr Yin wanted to ponder the implications of the technology, he would not have the time. Megvii is busy building what he describes as a “brain” for visual computing. The firm has come a long way since its founding in 2011 (its name stands for “mega vision”). More than 300,000 companies and individuals around the world use its face-recognition technology, which is called Face++, making it one of the biggest such services. In December Megvii raised $100m, giving it a valuation of nearly $2bn and turning it into the world’s first billion-dollar startup from might be called the “facial-industrial complex”.

Providers in this field sell hardware and software tools to recognise faces and then connect those faces to other useful data. Although the market is fairly small—the most optimistic estimates put it at a few billion dollars—the technology has started to permeate the wider business landscape. The main reason is that the accuracy of facial recognition is rapidly improving, putting it on the same trajectory as speech recognition, which really took off when accuracy improved by a final few percentage points, to almost 100%. “Most people underestimate the difference between 95% and 99% accuracy—99% is a game-changer,” Andrew Ng, a noted AI researcher, has said about speech recognition.

What’s more, the smartphone will do for face recognition what smart speakers, such as the Amazon Echo, have done for speech recognition: make it acceptable to consumers. Millions of Chinese already “swipe” their faces on smartphones to authorise payments. On September 12th Apple is expected to unveil a new version of its iPhone, with technology that can reliably identify the owner’s face and then unlock the device, even in the dark. That will come only a few weeks after Samsung presented a new Galaxy Note with a similar but less sophisticated feature.

It makes sense to separate facial-recognition technology into two categories: the underlying capability and the applications that make use of it. Megvii’s Face++ belongs in the first category, as do similar offerings from SenseTime, another Chinese startup, NTechLab, a Russian firm, as well as Amazon, IBM and Microsoft. All provide face recognition as a cloud-computing service. Megvii’s customers can upload a batch of photos and names, and use them to train algorithms, which then can recognise those particular people. Firms can also integrate the recognition service into their own offerings, for instance to control access to online accounts. Megvii’s and SenseTime’s services are largely founded on good data. They have access to the Chinese government’s image database of 700m citizens, who are each given a photo ID by the age of 16. Chinese government agencies are also valuable customers—more and more of the country’s hundreds of millions of surveillance cameras will soon recognise faces. In Shenzhen facial recognition is used to identify jaywalkers; names and pictures go up on a screen. In Beijing the municipality has started using the technology to catch thieves of toilet paper in public restrooms (its system also prevents people from taking more than 60 centimetres of paper within a nine-minute period). Commercial applications, often powered by one of the cloud-computing services, are spreading even faster. On September 1st Ant Financial, a subsidiary of Alibaba, deployed its “Smile to Pay” system for the first time in a physical store: customers at a healthier version of a KFC restaurant, called KPRO, in Hangzhou, can settle their bill by looking at a screen (see picture). Xiaomai, a chain of convenience stores, has said it will use facial scans when people enter its stores in order to study their behaviour. Several Chinese banks now let users identify themselves at ATMs with their faces. The West is further behind. Some industries have long used a basic kind of face recognition, including casinos wishing to turn away notorious gamblers. But it is mainly big online companies that make (cautious) use of the technology. Facebook has gone furthest by having its members tag friends on photos so the firm’s algorithms can recognise them on other pictures. Google employs the technology in order to group pictures that users have uploaded to its photo service. Amazon’s new home speaker, Echo Look, also has a camera, which could presumably be made to recognise faces.

Other firms are testing the waters. JetBlue and other American airlines have taken initial steps to match passengers’ faces to passport photos, aiming to eliminate boarding passes. Lloyds Bank is not the only Western bank planning to copy Chinese ones and allow customers to use their faces to log into accounts. Uber, a ride-hailing firm, has a system requiring drivers in India to take a selfie before starting a shift. This should cut down on unregistered drivers impersonating registered ones. Nvidia, a chipmaker, has plans for facial recognition in its new Californian headquarters.

There is potential for products that lift sales, too. Video cameras could, for instance, recognise loyal customers and VIPs who deserve special treatment. They could detect dissatisfaction on shoppers’ faces and dispatch staff to intervene. Walmart, the world’s largest retailer, is said to be working on a facial-recognition system to improve customer service.

Unsurprisingly, perhaps, the spread of these services has already prompted efforts to thwart them. An Israeli startup, D-ID, which stands for “de-identification”, has developed software that slightly alters photos so that algorithms cannot recognise them. This allows people to share pictures of their faces without having to worry that they will be used to identify them. Others have suggest low-tech defences against sophisticated surveillance systems, such as glasses with hallucinogenic patterns on the frame of the specs, or simply wearing masks or make-up.

Yet it is unlikely that such “adversarial attacks”, in the lingo, will keep face recognition from being widely used. Mr Yin of Megvii expects the technology to become a commodity. This is why he has already set his sights higher. He is directing the firm’s computer-vision brain towards even more complex tasks, such as interpreting human behaviour and recognising objects.

In the long run Mr Yin wants his firm to develop into an “algorithm factory” that offers all sorts of building blocks for computer-vision services, which other firms will be able to combine and recombine in order to come up with ever more sophisticated offerings. Whether Megvii lives up to this ambition or not, the technologies it peddles will only spread.

Dig deeper

Leader:

What machines can tell from your face

Science and technology (1):

Advances in AI are used to spot signs of sexuality

Science and technology (2):

Researchers produce images of people’s faces from their genomes