Computer vision on the cameras you already have: what two proofs of concept taught us
Most buildings already have the sensor. Parking garages, offices, warehouses, retail floors, construction sites — the cameras went in years ago for security, and they see everything the operation would like to count: how many cars are inside, how many people are in a zone, whether the person entering the yard is wearing a hard hat. Turning that footage into numbers used to need dedicated hardware — turnstiles, infrared beams, manual clickers. Now it needs a model, an edge device, and a set of decisions that matter more than the model.
What the pipeline is
The shape is the same for almost every counting or compliance problem:
- Detection. A model that finds people, vehicles, or equipment in each frame. Open detectors in the YOLO family are good enough that this is rarely the constraint.
- Tracking. Each detected object gets a persistent identity across frames, so a person walking past three times counts as one person walking past three times. Trackers like ByteTrack or SORT do this.
- Zones and gates. Virtual lines and regions drawn on the camera view: an entry line, an exit line, a restricted area. Occupancy is arithmetic on top — entered minus exited.
- Where it runs. On an edge device next to the camera when latency, bandwidth, or privacy say so; in the cloud when they don't. The video never has to leave the building; only counts and timestamps do.
- What comes out. A live number, a dashboard, an alert when a threshold is crossed, and a feed into whatever runs the building — signage, lighting, a facilities workflow.
What actually breaks
Camera placement, before anything else. An overhead camera counts a crowd; an angled one loses people behind other people. Most accuracy problems attributed to the model are placement problems.
Occlusion and crowding. People crossing, turning, sitting, standing in groups. Recall drops in exactly the scenes you most want counted. Top-down views and a robust tracker help; so does not promising precision the scene can't support.
Drift. Lighting changes with the season, a wall gets painted, an entrance moves, the camera gets bumped. A system that was right in March is quietly wrong in November unless someone checks it against a manual count now and then.
False positives. The potted plant that gets counted as a person until the confidence threshold moves. Thresholds are a decision per site, not a default.
What never gets recorded
Counting people is not identifying them. The systems worth building detect a person, not which person: no faces, no re-identification across cameras, no stored video — metadata only, counts and timestamps, with retention and access decided before the first camera is connected. Do that and occupancy analytics is an operations tool. Skip it and it is surveillance with a dashboard, whatever the vendor calls it.
What we learned from two proofs of concept
We built two of these as research, not for clients, to find out where the work actually is.
Parking occupancy. One overhead camera on a garage; a detector for vehicles on the overhead view and a benchmark harness to measure it. We got the detection working and stopped before the part that turns detections into a count per space — the occupancy adapter was specified, not built, and no benchmark results were committed. That is the finding, not a footnote: the vision was the short part; the arithmetic that makes it a product was where the work actually was.
PPE compliance. A pretrained person detector with heuristics for whether a hard hat and a high-visibility vest are present — explicitly not a trained PPE classifier, and the README says so. It produced detections and flagged violations frame by frame on a small run; it was never measured for accuracy, and the limits were written down per dataset before anyone was tempted to quote a number. No facial recognition by design: the model detects equipment on a person, not the person.
Three things held across both. The model was the shortest part of the work; camera angle, lighting, and where the virtual lines went decided what the detector could see. The distance between "it detects" and "it counts" was the whole project. And the second POC raised a question the first didn't: a compliance camera changes how it feels to work under it, and telling the crew what is detected, what isn't, and what is stored is part of the design, not a memo afterwards.
What production adds: integration with the building or site systems, a validation routine against manual counts, a drift check on a calendar, and — for anything that watches people at work — a workforce conversation before the deployment, not after.