Beijing authorities are now turning to a new technology designed to slow the shoplifters. Temple of Heaven’s bathrooms were outfitted with toilet paper dispensers that utilize facial recognition software, the BBC reported.

AD

Six dispensers, designed by the Shoulian Zhineng company, were recently placed at the entrance to the restrooms. Those seeking relief must first stare into a computer attached to the machine for three seconds. It records their image before spitting out a two-foot long sheet of tissue paper.

AD

“The sheets are too short,” Wang Jianquan, a 63-year-old retiree, told the New York Times.

And the machines are slow, too. They take 30 seconds to dispense the paper, according to a China Radio International report (though a GIF created by the New York Times makes it seem much faster). If you need more paper, let’s hope you’re not in a rush. The computer won’t dispense a second round of paper to the same person for nine — potentially excruciating — minutes.

AD

“If we encounter guests who have diarrhea or any other situation in which they urgently require toilet paper, then our staff on the ground will directly provide the toilet paper,” a park spokesman told the Beijing Wanbao newspaper.

“We brainstormed many options: fingerprints, infrared and facial recognition,” Lei Zhenshan, marketing director for Shoulian Zhineng, told the New York Times. “We went with facial recognition, because it’s the most hygienic way.’’

AD

Many people seem pleased that the Temple of Heaven has cracked down on toilet paper theft.

“They should have done this decades ago,” Zhang Shaomin, a local retiree who often visits the site, told CNN.

AD

Others thought such technology denigrated the complex, which has religious significance in China and is a United Nations Educational, Scientific and Cultural Organization World Heritage Site.

“Is there not a solution somewhere between ‘put up a sign’ and ‘install the sort of thing Bond villains use to secure their secret vaults’?’’ Jeremiah Jenne, an American historian, told the New York Times.

Purchasing six machines at the price of $720 apiece to protect toilet paper might strike many Americans as odd, but the Chinese share a much different relationship with their country’s public facilities. As Wu Qingqi, a park visitor, told CNN, locals often leave their own homes to use a public bathroom, further increasing the usefulness of these electronic guardians of toilet paper.

AD

AD

“I think it’s necessary,” Wu said. “There are many people wasting public resources.”

As Peter S. Goodman wrote for The Post in 2005 of China’s public bathrooms:

In a public toilet — be it at the park, on a main thoroughfare, at the airport or in a train station — the air is often so foul that you limit your breathing. The smell wafts out into the surrounding neighborhood. You keep your eyes turned upward, to avoid fixing on the squalid floor. Most toilets have no toilet paper. Many lack running water. Everywhere, flushing seems optional. People with major business to attend to must typically execute it in full view of everyone else over a big gulley without privacy walls. Sit-down toilets? Rare.

That’s why the country announced a “toilet revolution” in 2015, a plan to bring both its facilities and the general etiquette of their patrons up to “the standards of the international traveler.”

More than 12.5 billion yuan ($1.9 billion) was expected to be spent constructing tens of thousands of new public toilets and renovating older ones to include not just “Western-style toilets and deodorization technology” but also potentially big screen televisions, ATMs, WiFi and sofas.

Meanwhile, authorities planned to dole out punishments — such as blacklisting locals from certain facilities — for poor lavatory decorum.

AD

“Many people spend a lot of time dressing themselves, but they do not spare a second to flush the toilet,” Li Shihong, deputy chief of the China National Tourism Administration, told China Daily. “Toilet civilization has a long way to go in China.”

AD

The toilets have long caused some in the Chinese government anxiety.

In 2005, Gu Chenghua, then-secretary general of the Toilet Association — which Goodman described as “a super-grouping of 41 government bodies, plus companies that make toilet paper, bathroom deodorizer, soap and the toilets themselves” — told The Post: “When people are not at home, a public toilet is an indispensable public facility. Through the public toilet, you can see the degree to which the city is developed and civilized. We need to ensure that people have a comfortable experience as they relieve themselves.”

Perhaps facial recognition software is another step toward achieving that goal.