Yellow-cab drivers overcharged nearly 2,000 passengers last year by setting their meters to the higher suburban rate for in-city trips — the very same scam that rocked the industry two years ago.

City officials are stunned by the infractions, given the intense publicity given to the scam in 2010.

“How could you not have heard about this?” asked one. “How could you not read about this?”

The unwary riders were fleeced even though the Taxi and Limousine Commission ordered the installation of automatic warnings on passenger screens anytime a driver hit the out-of-town “Rate 4” button instead of the in-town “Rate 1” button. Rate 4 charges passengers double.

But even with the alerts — which last from 30 seconds to a minute before disappearing — the ripped-off passengers didn’t complain.

Instead, the violations were uncovered by TLC workers combing through GPS data on taxi trips. They found 1,936 overcharges committed by 1,320 drivers in 2012.

There were more Rate 4 violations uncovered by the techies than any other except for the failure to use E-ZPass at tolls, which cabbies are required to do to save a couple of bucks for their fares.

Most of the drivers — 1,097 — ran up only a single Rate 4 violation.

Though the TLC and the cab industry haven’t yet eradicated Rate 4 violations, the number uncovered last year is a monumental drop from two years ago, when 175,020 such violations took passengers for more than $1.1 million in overcharges between 2008 and 2010.

Bhairavi Desai, director of the Taxi Workers Alliance, said the steep drop in Rate 4 violations shows that the vast majority of drivers hit the wrong button by accident last year, an argument she also made in 2010.

Desai said that until replacement meters were installed a couple of weeks ago, it was easy to innocently mistake the Rate 4 button for the “end trip” button positioned close by.

TLC spokesman Allan Fromberg rejected that explanation out of hand. “We believe that drivers should at this point be well aware of their circumstances and how to operate their equipment,” Fromberg said.

So many cabbies were caught taking passengers on inflated-fare rides two years ago that overwhelmed TLC officials prosecuted only 2,304 with 10 or more violations.

No driver is getting the benefit of the doubt this time.

Every driver was brought up on charges. More than 30 percent of the violations were settled before trial, with the culprits agreeing to pay fines. Seven drivers who racked up three or more offenses within 36 months lost their licenses.

TLC chairman David Yassky said it doesn’t make much sense for cabbies to try to beat technology that can monitor every move the cabs make.

“We’ll keep the pressure on, and hopefully see this particular form of abuse trickle down to zero, where it should be,” he said.