The system seems to be working: Since last May, the number of jaywalking violations at one of Jinan’s major intersections has plummeted from 200 a day to 20. Cities in the provinces of Fujian, Jiangsu, and Guangdong are also using facial-recognition software to catch and shame jaywalkers.

Across the country, other applications of the technology are proliferating. Many exist somewhere in the range between helpful and unsettling: A “smart boarding system” from the tech giant Baidu reduces airport check-in to a one-second face scan; at KFC China’s “smart restaurant” in Beijing, customers stand in front of a screen, have their face scanned (again, Baidu is part of the joint endeavor), and receive menu suggestions based on their age, sex, and facial expression (“crispy chicken hamburger,” roasted chicken wings, and a Coke for a 20-something male’s lunch; porridge and soy milk for a middle-aged woman’s breakfast). A female-only university dormitory has even employed facial recognition to keep nonresidents out.

The technology’s veneer of convenience conceals a dark truth: Quietly and very rapidly, facial recognition has enabled China to become the world’s most advanced surveillance state. A hugely ambitious new government program called the “social credit system” aims to compile unprecedented data sets, including everything from bank-account numbers to court records to internet-search histories, for all Chinese citizens. Based on this information, each person could be assigned a numerical score, to which points might be added for good behavior like winning a community award, and deducted for bad actions like failure to pay a traffic fine. The goal of the program, as stated in government documents, is to “allow the trustworthy to roam everywhere under heaven while making it hard for the discredited to take a single step.”

All sorts of data will feed into this new program, but facial recognition (along with gait analysis and voice recognition, also enabled by rapid advances in machine learning and cloud computing) has the potential to one day give it something like omniscience. China’s government and commercial sectors make available to each other the endless streams of personal information they gather. Because companies have access to vast amounts of consumer data, industry experts predict that in the coming months Chinese facial-recognition software will become even more accurate. Western companies may be exploiting the same machine-learning technology, but nobody is rolling it out like the Chinese.

According to Maya Wang, a senior researcher for Human Rights Watch’s Asia division, China’s domestic surveillance is far more advanced than most Chinese citizens realize. “People in China don’t know 99.99 percent of what’s going on in terms of state surveillance,” she says. “Most people think they can say what they want and live freely without being monitored, but that’s largely an illusion.”

This article appears in the April 2018 print edition with the headline “Big in … China: Machines That Scan Your Face.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.