Blog
Multi-frame confirmation: how we cut false positives by 80%
The first version of Lexerus sent an alert every time the model detected a suspicious behaviour. Within a week of internal testing, we'd drowned ourselves in noise.
The model was accurate on clean frames — but real RTSP streams aren't clean. Compression artefacts, lighting flickers, partial occlusion, and motion blur all produce detections that look plausible in isolation but aren't.
The sliding window
Our solution was a per-camera, per-person sliding confirmation window. When a suspicious behaviour is first detected for a tracked person, we start a 5-second timer and a counter. Every subsequent frame in which that behaviour is detected increments the counter. If the counter reaches the threshold (default: 3) before the timer expires, the detection is confirmed.
If the timer expires without enough confirmations, the counter resets. The person might still be flagged at a lower suspicion level, but no alert is dispatched.
Tracking people across frames
For confirmation to work, we need to know that frame 1 and frame 3 are showing the same person. We use a lightweight centroid tracker — no biometrics, no face recognition, just bounding-box proximity and IoU matching between frames.
This is deliberately simple. It fails when two people cross paths or a person moves quickly across the frame. But in the retail environments we're targeting — people browsing near shelving, self-checkout areas, fitting-room corridors — it's reliable enough and adds no meaningful compute overhead.
What the tuning taught us
We tested confirmation thresholds from 2 to 10 frames across a range of camera types and environments. At 2 frames, false positives were still common. At 5+, we started missing real incidents because the person had moved on. Three frames in a 5-second window hit the best precision-recall balance for our target environments.
That said, environments with high foot traffic (busy supermarket checkouts) benefit from slightly higher thresholds, while sparse environments (electronics sections, fitting rooms) can go lower. This is now configurable per-store in detection settings.