This work was done for a client under confidentiality. Client names and internal tooling are not shown.
The problem
Layout, staffing and footfall decisions were being made without data. The cameras were already there; what was missing was a system that could turn their streams into counts, paths and dwell times, running continuously on site.
Decisions come from where people walk.
Constraints
Architecture
A smaller detector for fixed hardware
- Context
- Edge devices set a hard ceiling on compute; adding hardware per site wasn't an option.
- Decision
- A YOLO person detector compressed with knowledge distillation and pruning, then converted to ONNX for the edge runtime.
- Trade-off
- Some headroom in raw accuracy, traded for a model that runs on every stream at once.
- Detect. The distilled, pruned detector finds every person in each frame.
- Track and re-identify. A multi-object tracker follows each person within a feed and links them across cameras.
- Aggregate. Tracks become footfall by zone, dwell time, queue density and live crowd heatmaps.
What broke
Two problems took most of the effort.
- Keeping one person as one person. Following someone across different cameras, and through the moments when other people blocked them, was the hardest part. I tried several re-identification approaches to link them.
- Speed. The first versions were too slow for live use. The detector needed a lot of optimisation before it ran near real time on the edge hardware.
Where it landed
Many feeds processed concurrently in real time on edge hardware, producing the footfall, dwell, queue and heatmap data the sites used for layout and staffing decisions.
What I'd do differently
I would follow what is now standard practice for multi-camera tracking and re-identification. The tools have moved on since this was built, and I would start from the current approach.
References
- Hinton, Vinyals and Dean, Distilling the Knowledge in a Neural Network, arXiv 1503.02531.