This is some real pajama trauma.

Government officials in Suzhou, China, have reportedly apologized after using facial recognition to “shame” people for wearing pajamas in public, and posting their personal information online.

On Monday, the urban management department for the city, which is located in the Anhui Province, published surveillance photos of seven residents wearing PJs outside, sharing their names, government ID numbers and locations where the fashion offenses occurred online, The New York Times reports.

JAPANESE FASHION HOUSE ACCUSED OF CULTURAL APPROPRIATION FOR PUTTING MODELS IN CORNROW WIGS: 'RACIST SHOW!'

“Uncivilized behavior refers to when people behave and act in ways that violate public order because they lack public morals,” a now-deleted post on popular Chinese messaging app WeChat read, reported the Times. “Many people think that this is a small problem and not a big deal. Others believe public places are truly ‘public,’ where there is no blame, no supervision and no public pressure.

“This has brought about a kind of complacent, undisciplined mindset,” the post allegedly continued.

The government's pajama-shaming is said to have sparked “nationwide ire,” as many citizens complained that the agency overstepped its boundaries in trying to make a fashion statement.

Government officials in Suzhou, China have reportedly apologized for “shaming” people who were wearing pajamas in public.

Government officials in Suzhou, China have reportedly apologized for “shaming” people who were wearing pajamas in public. (iStock)

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

“Facial recognition technology should be used with caution. They should really be restricting access,” Weibo user Xiu Li De Xiao Wo wrote online, the outlet reports.

“When celebrities wear pajamas to an event, they are called fashionable. But when ordinary people wear pajamas to walk around on the streets, they are called uncivilized,” another commenter named Cai Shen Jie agreed.

By Monday night, government officials backtracked on their initial declaration, removing the initial post and publishing an apology.

"We wanted to put an end to uncivilized behavior, but of course we should protect residents' privacy,” authorities said, per the BBC report on the pajama-shaming incident. In the future, the agency said it plans to blur people’s images.

CLICK HERE TO GET THE FOX NEWS APP

Furthermore, a report from the state-controlled Global Times explained that the city of Suzhou had been campaigning for the title of “National Civilized City,” which inspired local officials to issue the pajama proclamation in the first place.

China is the most heavily surveilled country in the world, with one camera installed for every roughly four people in 2018. By 2021, China's installed base is expected to hit 567 million cameras, while the U.S. will rise to 85 million.

Brooke Crothers contributed to this report.