Industries · 6 min read
Retail queue analytics with the camera over the tills, measuring the wait rather than the crowd
Each shopper is tracked from joining the queue to reaching a till, the alert is minutes above target, and sun through the front windows breaks it first.
Summary
This post builds queue analytics on the ceiling camera a store already has over its tills: each shopper tracked from entering the queue polygon to leaving it, the wait computed per person, and the alert fired when the wait stays above target rather than when the crowd looks big. It covers drawing the polygon to exclude browsers and staff, and the afternoon sun through the front windows as the first thing to break detection. It is for store operations and retail technology teams.
Ayman Quadir · Head of Product · Sep 23, 2026

Checkout lane from a ceiling camera with a person and the products on the belt boxed, no faces, generated scene with detections from our model
On a Saturday at 11 am the queue at the tills in a mid-sized supermarket runs back past the magazine rack. The duty manager is in the office doing the rota, the customer service desk is busy, and the person who decides to open checkout 5 is whoever happens to walk past and notice. By the time the till opens, the people at the back have been waiting long enough to remember it.
The ceiling camera over the tills has been recording that queue for years. Asked the right question, it can say how long each person waited, and it can say it while they are still waiting.
Each shopper is tracked from joining the queue to leaving
The number a manager can act on at 11 am on a Saturday is a wait in minutes, and a wait needs the same person followed from the moment they join the queue to the moment they reach a till. A headcount cannot give that. Ten people in a fast-moving queue and ten people in a stalled one look identical in a single frame.
So the model finds every person on the camera and a tracker keeps the same identity on them across frames. The queue is a polygon drawn on the camera's view, and a person's wait starts when the bottom of their box enters it and ends when it leaves at the till end. The checkout queue monitoring use case is built on exactly this pairing: boxes plus tracking, because tracking is what turns a headcount into a number a manager can act on.
The tracker is where the errors live. A shopper who steps out to grab a forgotten item and steps back in is, to a careless tracker, a new person with a new short wait. Two people who swap places while chatting swap identities. A person hidden behind a trolley for a few frames vanishes and reappears as someone else. The labels for this camera are drawn by a person who has decided, in a written standard, what joining and leaving the queue means, because a queue is a social structure that the tracker has to be told about.
The polygon excludes the browsers and the staff
The magazine rack is beside the queue, and a person reading a magazine is in the frame and in no queue. The polygon is drawn tight to where the queue actually forms, which on this camera is a bend past the confectionery, and it stops short of the rack. A person who stands at its edge for a while before joining is a browser until their box crosses in.
Staff are the other contamination. A colleague restocking the confectionery walks through the polygon several times an hour, and each pass is a short wait that drags the average down. Staff wear a uniform, and a uniform is a class a person can label, so staff boxes are found and excluded before any wait is computed. In LexAnnotate you type "person, staff", Lexi puts a box on every frame, and a person checks each label before anything trains on it. The retail work behind our 4M+ annotations and validations comes from stores where the cameras were already on the ceiling.
A single snaking queue is measured more cleanly than one queue per till, and shoppers rate it fairer as well, which is a rare case of the measurement and the customer agreeing.
The alert is the wait above target, never the count
An alert in LexAlert is a rule written as a sentence, with a severity and a cooldown, approved before it goes live. For the tills it reads: the wait at the front of the queue above the store's target for longer than a set window, to the duty manager, with the frame. The frame shows the queue and the empty checkout 5, and the manager can open it or send someone from a phone on the shop floor.
My view is that the alert should reach the manager where they are, on the floor, and never only in the office. A queue alert read half an hour later is a report, and the store already has reports.
The cooldown stops the alert firing every few seconds while the queue stays long. One message when the wait crosses the target, one when it comes back under, and the duty manager knows the till they opened worked. The number that goes to the store's dashboard is the wait per person, stored against the time, so that Saturday at 11 am can be compared with the Saturday before and the rota adjusted.
Sunlight through the front windows breaks detection first
The tills sit near the front of the store, and the front of the store has windows. On a bright afternoon in March the sun comes in low across the floor and the ceiling camera sees shoppers as silhouettes against a bright stripe, then in shadow, then bleached again as clouds pass. The model that was trained on the store's own frames through a grey January doubts those frames, and a shopper it loses for a few frames becomes a broken track and a wrong wait.
The drift catalog files this under rain, fog and dust as transient covariate shift: conditions the model rarely saw arrive for an afternoon, detection thins out, and it recovers when the clouds do. The advice is to keep those frames, because a bright March afternoon is rare in the training set and worth more than another grey one.
LexData takes the queue model through its whole life. You type what to look for, Lexi puts a box on every frame, and a person checks each label before anything trains on it. The model then watches the camera over the tills, in the cloud, on your servers, or on a runner beside the recorder. Frames it is unsure of come back to a person, the corrections retrain it, and the new version replaces the old one with no downtime.
The doubted frames from that first bright afternoon come back to a person, the tracks are corrected, and the version that runs in April has seen the sun on the floor. The queue at 11 am on a Saturday is the same queue it always was. What changed is that somebody in the store knows how long it is before the people in it do.
See it on your own footage.
Start with your footageMore in Industries

Industries · 8 min read
Computer vision for construction site safety, a warning before the worker and the excavator meet
A pole camera boxes people and machines, draws a danger zone that moves with the excavator, and sends the frame when someone walks into it.
Ayman Quadir · Sep 23, 2026

Industries · 7 min read
Computer vision in agriculture, from the sprayer boom to the packing line
Weeds against beet rows at dawn, lesions on a leaf, bruises on a packhouse belt, and labels that go stale as the season turns.
Ayman Quadir · Sep 23, 2026

Industries · 6 min read
Computer vision applications on a factory floor, four jobs for the cameras already there
Defect detection, assembly verification, safety and inventory on one plant's cameras, with cosmetic against functional written into the labeling schema.
Ayman Quadir · Sep 23, 2026