The facial recognition systems being built by SenseTime and Megvii use artificial intelligence to discern individuals from one another in images or video, by studying libraries of existing content. It is one of the more established machine learning techniques, which means that it has found some practical application in consumer products — such as Apple’s Face ID, which allows a user to unlock his or her iPhone by looking at it, or Facebook’s tools, which can recognize users in uploaded images.

Such software has proved controversial because of the privacy issues that it raises. Law enforcement’s use of it to identify criminals or track citizens, in particular, has drawn pushback.

But even if its citizens have such concerns, China’s government wants to use facial recognition to create a vast national surveillance system. And it has created an environment to foster its development.

The country’s push to become a technological powerhouse has created a wave of promising A.I. start-ups. Its desire to track its citizens has also meant that many of them have focused specifically on image recognition. And there are close ties between many of these start-ups and the government, which allows companies to apply their software to huge state data sets. The chief executive of SenseTime, which has contracts with the Police Department in Chongqing and China Mobile, told The Financial Times in January that the company had “processed 500 million identities for facial recognition. U.S. companies can’t test on so many customers.”

Similar arrangements have existed in the United States. But American technology companies have recently run into resistance when working with government agencies.

Amazon endured heavy lobbying from shareholders, the American Civil Liberties Union and staff about the use of its Rekognition software by police to identify people. Microsoft, too, has suffered blowback over a project to help develop A.I. for Immigration and Customs Enforcement. And Google ultimately decided not to renew a contract with the Pentagon that called for using image recognition to improve the performance of drone operations.

In the wake of those criticisms, Microsoft has actually called on Congress to regulate the use of facial recognition technology.

The nature of A.I. means that software systems can be improved by crunching through larger and larger data sets that can be provided by the government — from things like CCTV footage, driving license images, and more. China’s start-ups, then, are enjoying the benefits of improving their technology inside projects that America’s tech giants might be lobbying their own way out of.