(WPRI) — Some grocery stores in Rhode Island and Massachusetts are using artificial intelligence to catch shoplifters.

The technology, called Stoplift, analyzes security video to automatically detect theft or errors at the checkout, according to Malay Kundu, the creator of Stoplift.

“It can actually tell what you’ve handled versus what you’ve rung up,” Kundu said.

The Cambridge businessman used to develop real-time facial recognition systems to look for terrorists in airports. He realized similar technology could be used at the checkout to tackle a $13 billion per-year problem for grocery stores in the United States.

“For every item that is stolen, they have to sell 50 more just to make up for that one item that was lost,” Kundu said. “As you can imagine, that’s really, very difficult for the retailer.”

When cashiers are in on it, Kundu calls it “sweethearting.”

“It happens where a cashier is hooking up their friends, family, fellow employee with stuff for free simply by not scanning it,” he said. “I’m giving a sweetheart deal, and it turns out that’s really the easiest way to steal.”

Kundu says Stoplift also catches shoplifters at self-checkout lanes.

“We’ll see quite a bit of people treating themselves to things for free without scanning them,” he said.

Theft can cost all consumers at the checkout.

Brian Vicente’s family has owned and operated grocery stores in Massachusetts for years. He said shoplifting, or even just distracted cashiers who miss scanning some items, can affect prices consumers pay.

“We bring in orders, and we have a certain amount of money we’re expecting to make on that,” Vicente said. “When we don’t make that amount of money on there, it has to come from somewhere else.”

Vicente said since he started using Stoplift in his stores, there has been a decrease in loss.

“The Stoplift eye is really deep,” Vicente said.

Though preventing shoplifting is the primary function, Stoplift can also reduce the time law-abiding customers spend in line, according to Kundu.

“The same technology that we’re using for identifying fraudulent behavior at a self-checkout turns out to be equally good at  identifying legitimate behavior,” he said.

Kundu said Stoplift reduces false alerts at the self checkout by as much as 90 percent.

“The classic case is you’ve got a lady at a self checkout, she’s got her handbag, she’s trying to ring up stuff and then she says, ‘just let me put this down,'” Kundu said. “When she puts it down, all of a sudden the self checkout says, ‘Hey! Unexpected weight increase and unexpected item in bagging area.’ We’re able to actually prevent that because we’re able to identify that the handbag is actually a non-merchandise item and so it’s not fraud. It’s just natural behavior.” 

When asked if Stoplift blurs any privacy lines, Kundu said Stoplift is no different than a surveillance camera.

“The cameras have been in stores for years,” he said. “They’re already recording the video, but right now, nobody goes and looks at it unless they realized that they’ve been stolen from.”

“The real thing here is, we’re utilizing their existing security measures to make sure they’re not getting robbed,” Kundu added.

In the future, customers may not have to go through the checkout. Kundu said his company is working on technology that would track the groceries consumers put in their carts and automatically charge them when they leave the store.