A CPU-only footfall counter for small retailers — with a hand-written track-stitching engine that fixes the double-counting problem every occluded scene creates.
Typical footfall deployments run large detection models on GPU servers or cloud inference — infrastructure a small shop can't justify. The question: how much accuracy survives on the laptop-class hardware they already own?
When a shopper walks behind a shelf, the tracker loses their ID. When they reappear, the system sees a "new" person — the same customer gets counted twice, and every downstream metric inherits the error.
YOLOv8n (the 3.2M-parameter nano model) with ByteTrack tracking, explicitly pinned to device='cpu' in the code. Real-time footfall counting on an ordinary laptop — no GPU server, no cloud, no inference bill.
When a track disappears, its last position is kept as a ghost ID. If a new detection appears within the stitch distance inside the memory window, the engine re-links it to the original person — one ID, one count. The double-counting problem is solved in logic, not hardware.
Counting happens by line-crossing geometry: the installer draws the entrance gate with sliders, and only tracks crossing it are counted. No fixed camera assumptions — the line adapts to each store.
Instead of a black box, the installer tunes the behavior per store: stitch distance (how far to search for a lost person), stitch memory (how long a ghost stays alive), and detection confidence — each with plain-language guidance in both languages.
The dashboard shows total visitors — and a second number most tools hide: path repairs, how many times the engine re-linked a returning customer. Making the fix visible builds trust in the count.
All processing is local and offline — video never leaves the store. The constraint that saved money (no cloud) also removed the hardest objection small retailers have about cameras.
The MVP proved the position: the answer to "we can't afford GPU analytics" isn't cheaper GPUs — it's better logic on standard hardware. That constraint shaped every technical choice in the build.