Skip to content

Part 1 of 7 · Shelf price checker series ~6 min read

A shelf price checker on AWS for about $25 a month

The largest store in a five-store independent grocery chain had a price change process that everybody believed worked. Head office changed prices in the till system on Tuesday night, a list printed on Wednesday morning, and somebody swapped the labels. The first time anybody photographed every shelf and compared it with the till, 97 labels showed a lower price than the customer would be charged.

a grocery store aisle filled with lots of food
Photo by Osarugue Igbinoba on Unsplash

Key takeaways

  • A label that says less than the till is a legal problem. A label that says more is margin.
  • Photograph the shelf and read it blind. The model never sees the till price.
  • Compare against the price in force when the photo was taken, not the price now.
  • Unit pricing is a per-store obligation, because the small shop exemption is per store.
  • Designed on AWS for about $25 a month.

The whole system on one page

Before any code, here is the shape of what we are designing.

System: shelf photos, the till price file and promotions joined into a ranked swap listThree boxes across the top sit outside the AWS account. On the left, Shelf photos: taken on a phone, bay by bay. In the middle, Till price file: what the till charges, and from when. On the right, Promotions: mechanics, starts and ends. Shelf photos connect to the first component inside the account on each walk, the till price file connects to the second nightly, and promotions also connect to the second, each cycle. Inside the AWS account are three components in a row. Read the labels: what each label actually says. Match to the till: against the price at that moment. And Rank and route: worst first, in walking order. A note says manual checks go wrong in the middle box, because they compare a label seen on Wednesday with Friday's till price and call the difference an error.AWS ACCOUNTShelf photostaken on a phone,bay by bayTill price filewhat the till charges,and from whenPromotionsmechanics, startsand endsRead the labelswhat each labelactually saysMatch to the tillagainst the priceat that momentRank and routeworst first, inwalking orderon each walknightlyeach cycleManual checks go wrong in the middle box. They compare a label seen on Wednesday with Friday's till price, and call the difference an error.
Fig 1. Three things outside the account, three pieces inside it. The labels are read before anything is compared, and the read never sees the price it will be compared with.
  • Machine learning
  • Analytics
  • Front-end & mobile

Why labels drift in a business that is otherwise well run

Because a price lives in two places and only one of them is automatic. The till system takes a price change overnight, for every store at once, with an audit trail. The shelf-edge label takes the same change when a person with a printer and a roll of labels reaches that bay, and nothing records whether they did.

The process is usually fine on the day. Somebody prints the Wednesday list, works through it before the doors open, and misses a handful because a bay was being filled or the printer jammed. Nothing marks the handful, so they stay wrong until the next change to the same product, which for a slow line can be months away. Promotions make it worse: the start of one arrives with a box of point-of-sale material, and the end of one arrives with nothing at all.

What runs (the inside)

  • The walk. A phone, a browser page and a bay number. Staff photograph the shelves and every label in every photo is read. Part 2.
  • The match. Each label tied to a product, and to the price the till held at the moment of the photo. Part 3.
  • The ranking. Which mismatches to fix before opening, which this week, and which are a question for head office. Part 4.
  • The gap. A swap list in walking order, and a measure of how long labels actually lag the till. Part 5.

One store, one full walk

One full walk of the largest store from photos to mismatchesA horizontal row of five boxes joined by arrows. Five hundred and eighty-three photos, one per section, taken on a phone. Four thousand three hundred and sixteen labels found, about seven to a photo. Ninety-seven over, meaning overcharges where the till takes more than the label says. Fifty-eight under, meaning undercharges where the till takes less than the label says. And one hundred and forty-three unit price faults: missing, wrong, or still per hundred grams. A note says the third box is about six hundred and eighty-five pounds a week taken from customers who believed the label, and the fourth is about three hundred and seventy-seven pounds a week given away without anybody deciding to.ONE STORE, ONE FULL WALK583 photosone per section,on a phone4,316 labelsfound, about sevento a photo97 overthe till takes morethan the label says58 underthe till takes lessthan the label says143 unit pricesmissing, wrong,or per 100gThe third box is about £685 a week taken from customers who believed the label. The fourth is about £377 a week given away without anybody deciding to.
Fig 2. The same walk as one line. The first two boxes are the work; the last three are what nobody knew before it.
  • Management
  • Analytics
  • Front-end & mobile

In plain words

A member of staff opens a page on their phone, types the bay number printed on the end of the aisle, and photographs the shelves section by section. Each photo lands in the account with its store, its bay and its time, and a vision model reads every shelf-edge label it can see: the description, the price, the unit price and its unit, any promotion wording and end date, and the barcode where it is legible.

The model is told nothing about what the labels should say. It does not see the till price file, the promotions calendar or the previous walk. That is deliberate, and part two explains why a reader that knows the expected answer is a reader that finds it.

Each label is then matched to a product, by barcode where the label carries a readable one and by description, size and position in the bay where it does not. The comparison is with the price the till held at the moment the photo was taken, including any promotion live at that moment, because the price file keeps changing after the walk and a later price makes a correct label look wrong.

Every mismatch is classified by direction before size. A label lower than the till is a customer overcharged, which is where the legal exposure sits. A label higher than the till is margin given away. A missing or wrong unit price is a fault only in a store that has to show one. What comes out is a list for the store manager in the order the store is physically walked, with the overcharges marked at the top.

Design rules that shaped every decision

  • The label is read blind. The model never sees the price it is being checked against.
  • Compare against the price in force at the photo’s timestamp, never the current price.
  • Direction before size. An overcharge of 4p outranks an undercharge of 40p.
  • A correct label in the wrong place is a wrong price, so position is part of the match.
  • Store obligations are store data. Floor area decides whether unit prices are required.
  • Nothing changes at the till automatically. A person decides whether to fix the label or the price.

What it does not do

It does not set prices. The till price file is the system of record, and the checker’s only opinion about a price is whether the shelf agrees with it. Head office decides what a tin of tomatoes costs; this decides whether the customer in aisle four can find that out.

It does not print labels either. Every shelf-edge label system already has a print queue, and the output here is the list that feeds it, ordered by bay.

And it does not look at competitors. Whether your prices are right is a different question from whether your shelves say them, and mixing the two produces a report nobody acts on.

The next four posts walk through each piece: reading a label from a photograph, matching it to the till at the right moment, deciding which mismatch to fix first, and measuring the gap between a price change and a label change. One diagram per post, a cost breakdown, and an engineering reference at the end.

All posts