For 40-year-old Mao Ya, the facial recognition camera that allows access to her apartment house is simply a useful convenience.

"If I am carrying shopping bags in both hands, I just have to look ahead and the door swings open," she said. "And my 5-year-old daughter can just look up at the camera and get in. It's good for kids because they often lose their keys."

But for the police, the cameras that replaced the residents' old entry cards serve quite a different purpose.

Now they can see who's coming and going, and by combining artificial intelligence with a huge national bank of photos, the system in this pilot project should enable police to identify what one police report, shared with The Washington Post, called the "bad guys" who once might have slipped by.

Facial recognition is the new hot tech topic in China. Banks, airports, hotels and even public toilets are all trying to verify people's identities by analyzing their faces. But the police and security state have been the most enthusiastic about embracing this new technology.

The pilot in Chongqing forms one tiny part of an ambitious plan, known as "Xue Liang," which can be translated as "Sharp Eyes." The intent is to connect the security cameras that already scan roads, shopping malls and transport hubs with private cameras on compounds and buildings, and integrate them into one nationwide surveillance and data-sharing platform.

It will use facial recognition and artificial intelligence to analyze and understand the mountain of incoming video evidence; to track suspects, spot suspicious behaviors and even predict crime; to coordinate the work of emergency services; and to monitor the comings and goings of the country's 1.4 billion people, official documents and security industry reports show.

At the back end, these efforts merge with a vast database of information on every citizen, a "Police Cloud" that aims to scoop up such data as criminal and medical records, travel bookings, online purchase and even social media comments - and link it to everyone's identity card and face.

A goal of all of these interlocking efforts: to track where people are, what they are up to, what they believe and who they associate with - and ultimately even to assign them a single "social credit" score based on whether the government and their fellow citizens consider them trustworthy.

At this housing complex in Chongqing, "90 percent of the crime is caused by the 10 percent of people who are not registered residents," the police report said. "With facial recognition we can recognize strangers, analyze their entry and exit times, see who spends the night here, and how many times. We can identify suspicious people from among the population."

Adrian Zenz, a German academic who has researched ethnic policy and the security state in China's western province of Xinjiang, said the government craves omnipotence over a vast, complex and restive population.

"Surveillance technologies are giving the government a sense that it can finally achieve the level of control over people's lives that it aspires to," he said.

In this effort, the Chinese government is working hand-in-glove with the country's tech industry, from established giants to plucky start-ups staffed by graduates from top American universities and former employees of companies like Google and Microsoft, who seem cheerfully oblivious to concerns they might be empowering a modern surveillance state.

The name of the video project is taken from the Communist slogan "the masses have sharp eyes," and is a throwback to Mao Zedong's attempt to get every citizen spying on one another. The goal, according to tech industry executives working on the project, is to shine a light into every dark corner of China, to eliminate the shadows where crime thrives.

The Sharp Eyes project also aims to mobilize the neighborhood committees and snoopy residents who have long been key informers: now, state media reports, some can turn on their televisions or mobile phones to see security camera footage, and report any suspicious activity - a car without a license plate, an argument turning violent - directly to the police.

To the eyes of the masses, in other words, add the brains of the country's fast-growing tech industry.

Gilles Sabrié / The Washington Post At Megvii offices in Beijing, a designer prepares marketing material for a facial-recognition product. The company's marketing manager has said Megvii's Face program has helped police make thousands of arrests. At Megvii offices in Beijing, a designer prepares marketing material for a facial-recognition product. The company's marketing manager has said Megvii's Face program has helped police make thousands of arrests. (Gilles Sabrié / The Washington Post) (Gilles Sabrié / The Washington Post)

By 2020, China's government aims to make the video surveillance network "omnipresent, fully networked, always working and fully controllable," combining data mining with sophisticated video and image analysis, official documents show.

China is not alone in experimenting with these new technologies. The FBI's Next Generation Identification System uses facial recognition to compare images from crime scenes with a national database of mug shots. Police forces across the United States have been using algorithm-based techniques for several years to predict where crimes are likely to occur.

Chicago police identified and a court convicted a thief using facial-recognition technology in 2014, and Britain used a Japanese program called NeoFace Watch to spot a wanted man in a crowd in May.

The United States, with around 62 million surveillance cameras in 2016, actually has higher per capita penetration rate than China, with around 172 million, according to Monica Wang, a senior analyst in video surveillance and security at research consultants IHS Markit in Shanghai.

Yet it is China's ambition that sets it apart. Western law enforcement agencies tend to use facial recognition to identify criminal suspects, not to track social activists and dissidents, or to monitor entire ethnic groups. China seeks to achieve several interlocking goals: to dominate the global artificial-intelligence industry, to apply big data to tighten its grip on every aspect of society, and to maintain surveillance of its population more effectively than ever before.

"Deep learning is poised to revolutionize the video surveillance industry," Wang wrote in a recent report. "Demand in China will grow quickly, providing the engine for future market growth."

In the showrooms of three facial-recognition start-ups in Chongqing and Beijing, video feeds roll past on big screens, with faces picked out from crowds and matched to images of wanted men and women. Street cameras automatically classify passersby according to gender, clothes and even hair length, and software allows people to be tracked from one surveillance camera to the next, by their faces alone.

"The bigger picture is to track routine movement, and after you get this information, to investigate problematic behavior," said Li Xiafeng, director of research and development at Cloudwalk, a Chongqing-based firm. "If you know gambling takes place in a location, and someone goes there frequently, they become suspicious."