Vision Field Notes

Reducing False Alarms in Production Video Analytics

A detector that scores well on a validation set can still be unusable on a live camera. The reason is arithmetic. A camera produces tens of thousands of frames per hour at typical frame rates, and even a small per-frame false positive rate yields many false alerts per day. Multiply by many cameras and the operators learn to ignore the system. A system that is ignored has failed, whatever its mAP.

Log-log line chart of false events per camera per day against the share of frames with a false detection, for 15, 5 and 1 analysed frames per second. At 0.01 percent and 15 frames per second the result is about 130 events a day.
Caption: Pure arithmetic, not a measurement: without temporal filtering, even 1 false frame in 10,000 gives over a hundred events per camera per day at 15 analysed frames per second.

This article lists the practical levers for reducing false alarms, roughly in the order that gives the best return.

Start by classifying your false alarms

Do not tune blindly. Collect a sample of false alerts (save the frame, the detection, the confidence, the camera, and the time) and sort them into causes. Typical groups:

Each group has a different fix. A pile of reflections points to masks or retraining. A pile of one-frame blips points to temporal filtering. Counting causes tells you which lever to pull first.

Two frames with red boxes. Left: a woman walking in a hallway detected only as dog 0.50, and a frosted window detected as tv 0.32. Right: a white car seen from above detected as cell phone 0.95.
Caption: Wrong-object errors from a general COCO model on real clips: a person scored as a dog, a window as a TV, and a car seen from above as a cell phone with high confidence. Footage: Intel IoT DevKit sample videos (CC BY 4.0). Detections: YOLOv8n.

Lever 1: confidence thresholds, per class and per camera

The cheapest change is raising the confidence threshold. It trades missed detections for fewer false alarms, so make that choice deliberately with the precision-recall curve rather than by guesswork. See Confidence Thresholds: Tuning a Detector to Cut False Alarms. Two refinements matter in production:

Lever 2: temporal filtering

Real objects persist; many false detections do not. Require evidence over time before raising an event:

The cost is added delay before an alert. For many safety and security rules a delay of a few seconds is acceptable, but for others it is not, so choose per rule. Always work in time units, not frames, so the behaviour does not change when the frame rate does.

Two raster charts of detections per frame over 24 seconds for the classes person, dog, cat, tv and handbag. Top, raw: 10 person events and several short dog, cat, tv and handbag events. Bottom, after a 5 of 8 frames rule: 4 person events, cat and handbag removed, dog and tv still present.
Caption: A 5-of-8 rule on real detections removes the short blips (cat, handbag) and merges flickering person detections, but persistent mistakes such as the window scored as a TV survive. Those need a mask or retraining. Footage: Intel IoT DevKit sample videos (CC BY 4.0). Detections: YOLOv8n.

Lever 3: geometry and size filters

Cheap rules that remove many errors:

Lever 4: context and business rules

Many "false" alarms are correct detections that the business does not care about. Use schedules (an area is only restricted at night), allow lists where feasible, and combine conditions, such as "person in zone and no vehicle present". Alert design deserves its own treatment; see Designing Alert Rules: Schedules, Cooldowns and Escalation.

Lever 5: fix the model, with the right data

If the false alarms come from a repeatable visual pattern, the proper fix is training data. Collect those false positives, add them to the dataset as images with correct labels (often meaning no label for the confusing object, so it becomes background), and retrain. Hard negatives from your own cameras are usually more valuable than more generic data.

Be careful to keep a clean validation set that does not include the same clips you trained on; otherwise you cannot tell whether things improved. See Train/Validation Split for Video Frames: Avoid Data Leakage. Check annotation consistency too, since confusing labels can create the false positives you are trying to remove: Annotation Mistakes That Quietly Ruin Your Model.

Other model-side options include a larger model or higher input resolution when the confusion is about fine detail, and a second-stage classifier that verifies crops from the detector. Each costs compute, so apply them only after cheaper levers.

Lever 6: fix the image

Many errors begin at the camera. Check:

Moving a camera by a metre can remove more false alarms than a week of model work.

Monitor for drift

Performance in production changes. Seasons change the light and foliage, new equipment is installed, a sign is added, the camera gets bumped, and the lens ages. A system that was quiet in the month you tuned it may become noisy later.

Track a few signals per camera over time:

Signal What a change suggests
Alerts per day New false-alarm source, or a fault if it drops to zero
Average detection confidence Image quality change or domain shift
Detections per hour by class Scene change or camera moved
Share of alerts marked false by operators Direct quality measure
Time since last frame / frame change score Stream or lens problems

Give operators a one-click way to mark an alert as false or true, and save the frame. This feedback creates the labelled hard negatives for the next retraining round and a running estimate of precision from real use. Without feedback you are guessing.

A sudden fall to zero alerts is as suspicious as a rise. A blind or frozen camera produces no detections. See Handling RTSP Dropouts: Reconnects and Health Checks.

Test before you change

Every change in thresholds or filters moves both false alarms and missed detections. Keep a set of recorded clips with known true events and known false-alarm sources, and re-run it after each change, checking both sides. Cutting false alarms by raising a threshold is easy; proving that real events are still caught is the part that matters. Also use the process in A Pre-Deployment Testing Checklist for Vision Models before releasing changes.

Checklist

Next steps: read Designing Alert Rules: Schedules, Cooldowns and Escalation and Confidence Thresholds: Tuning a Detector to Cut False Alarms.