WASHINGTON — Shoplifters beware: Closed-circuit cameras in stores might be observing more than you think. As facial recognition software gets better, the battle against retail theft is moving into high tech.

Retail stores with facial recognition systems can spot convicted or admitted shoplifters in about the time it takes to walk two paces into an establishment.

“We can match a face against the database of 25 million people in just under a second. Two or three years ago, that was just unheard of,” said Peter Trepp, chief executive of FaceFirst, an Encino, California, firm that is a leader in retail surveillance tools.

Civil libertarians are up in arms over widespread use of facial recognition software, fearing that errors could victimize innocent shoppers, but industry experts say the use of the software is here to stay.

That’s because theft remains a bane to the nation’s 3.8 million retail establishments, which suffered $48.9 billion in losses in 2016, the most recent year for which the National Retail Federation tallied estimates. Average stores lose between 1 and 3 percent of revenue to theft each year, experts say.

“Most people when they envision what retail theft looks like, they probably envision someone taking something off the shelf and hiding it in their jacket,” said Malay Kundu, chief executive of StopLift, a Cambridge, Massachusetts, start-up.

But Kundu said less than half of retail losses come from shoplifters or organized retail crime gangs. More losses occur from employee theft, often at the checkout counter. In this area, too, surveillance technology is advancing.

Kundu’s start-up provides a service that weds ceiling cameras over checkout lanes with artificial intelligence to send alerts when the system detects cashiers failing to scan products.

“If you’ve got a friend or family member or a fellow employee who is the cashier, they can give you things for free just by not scanning them. It goes right into the bag,” Kundu said.

Using the cameras and highly advanced software, Kundu said clients report a reduction in such inventory losses of as high as 40 percent. His company says its technology has already confirmed more than 2.7 million incidents of scan avoidance.

The use of high-tech anti-theft technology remains in its infancy, experts said.

“It’s not well-embedded in retail yet €¦ (but) it’s becoming more affordable,” said Karl F. Langhorst, executive vice president of Alto US, a Miami subsidiary of a Chilean company that uses computer analytics to combat theft in 7,000 stores in 100 cities.

Skeptics of facial recognition software say they worry about reports of errors, especially with non-white customers.

“These algorithms were less accurate on people of color and women,” said Jeremy Gillula, the tech policy director at the Electronic Frontier Foundation, a San Francisco group that advocates for privacy rights in the digital age.

Hundreds of thousands of cameras already gaze on passersby at airports, schools, stadiums, hotels, casinos and at retail outlets like convenience and liquor stores and gas stations.

“You’re being recorded almost everywhere you go these days. No one’s up in arms about that. No one’s marching on Washington,” Trepp said.

But major retailers worry about liability and consumer skittishness.

“It’s true that shoplifters don’t engender sympathy,” said Jay Stanley, a senior analyst with the speech, privacy and technology project of the American Civil Liberties Union, a group that advocates for individual rights. But Stanley said people convicted once of retail theft could find it difficult to enter retail outlets without intense scrutiny.

“Now, instead of being shut out of one mom-and-pop store, you get shut out of hundreds,” Stanley said.

Change is washing over retail, as stores adopt self-checkout, employ fewer clerks and watch the experimentation by Seattle-based giant Amazon, which earlier this year opened Amazon Go, a concept store filled with cameras and sensors. Shoppers there grab prepared foods off shelves and walk out without passing a cashier. Computers later notify customers of what they’ve been charged.

Other retailers worry about possible glitches in surveillance technology.

“If you for some reason have a mistake in your database or someone interprets your information incorrectly and some innocent person all of a sudden comes up that they committed a crime, you’re opening yourself up to liability,” said Terry Sullivan, president of the Loss Prevention Foundation, a nonprofit in Matthews, North Carolina, that educates retail employees about how to fight theft.

“There’s a lot of moving pieces to that,” he added.

Among major retailers, only a few acknowledge using facial recognition. Among them is Lowe’s, the home improvement and appliance chain.

“In some stores, we may use facial recognition technologies to identify known shoplifters,” the retailer’s privacy and security statement says.

Cameras have to be placed near entrances for facial recognition software to succeed.

“Lighting has to be appropriate. Resolution has to be higher in quality,” said Roger Rodriguez, a facial recognition expert who left the New York Police Department after two decades to join Vigilant Solutions, a Livermore, California, company that sells platforms of license plate readers and facial recognition to law enforcement.

Retailers still debate whether consumers should be told facial recognition is in use.

“Legally, you don’t have to have signage,” Trepp said. “You don’t have to say anything to anybody in most of the states of the United States. There is no federal law.”

Rodriguez said retailers should tell shoppers anyway to dissipate fears, and advertise positive uses, such as for finding missing children or identifying elderly people with Alzheimers.

“I do believe it is the wave of the future,” echoed Sullivan of the Loss Prevention Foundation.