Global Config
The top of the Detection Config page lets you tune how Lokawatch detects violations and dispatches alerts across all cameras. Get these settings right and you'll dramatically reduce noise without missing real incidents.
Confidence Threshold
The confidence threshold controls how certain the AI must be before it counts a detection as a violation.
When the AI model analyses a frame, it outputs a confidence score from 0 to 1 for each detection (e.g. "70% confident this person is not wearing a helmet"). The threshold is the minimum confidence required before an alert is raised.
| Setting | Value |
|---|---|
| Minimum | 0.05 |
| Maximum | 0.95 |
| Default | 0.25 |
How to tune it
| If you're seeing… | Try… | Effect |
|---|---|---|
| Too many false alarms (alerts for safe situations) | Increase threshold (e.g. 0.40–0.60) | Only high-confidence detections trigger alerts. Fewer false alarms, but may miss borderline violations. |
| Missed violations (real PPE breaches not detected) | Decrease threshold (e.g. 0.15–0.20) | More sensitive. Catches borderline violations, but may increase false alarms. |
| Good results on most cameras, one problematic camera | Leave global default; set a per-camera override | Fine-tune individual cameras without affecting the rest. |
Start with the default (0.25) and monitor your False Alarm Rate card on the main dashboard for 1–2 weeks. Adjust only if the rate is consistently above 20% or you are missing known violations.
Alert Cooldown
The alert cooldown is the minimum time (in seconds) that must pass before a second alert can be raised for the same camera.
This prevents alert flooding when a safety hazard persists in a camera's view. For example, if a worker is in a restricted zone for 10 minutes, you want one alert — not hundreds of repeated alerts every second.
| Setting | Value |
|---|---|
| Minimum | 10 seconds |
| Default | 300 seconds (5 minutes) |
How to tune it
| Scenario | Recommended cooldown |
|---|---|
| High-traffic areas (workers constantly in view) | 300–600 seconds — avoids flooding from a busy zone |
| Rarely-entered restricted zones | 30–60 seconds — you want to know every entry, quickly |
| Quick demos | 30 seconds — see repeated alerts fire without waiting long |
Setting cooldown below 10 seconds is not allowed — very low values can flood the violation log and overwhelm your Safety Officers with notifications.
Confirmation Window
The confirmation window is how long a violation must continuously persist before Lokawatch raises an alert — it filters out momentary mis-detections (a frame where the AI briefly misreads something) from real, sustained violations.
| Setting | Value |
|---|---|
| Minimum | 0 seconds (alerts immediately, no confirmation) |
| Maximum | 60 seconds |
| Default | 2 seconds |
This is a safety-policy tradeoff: a higher value means fewer false alarms from brief flickers, but a slower response to genuinely brief violations. Since Lokawatch samples roughly once a second, values above 3 seconds risk missing violations that come and go quickly.
Per-Camera Overrides
All three settings above — Confidence Threshold, Alert Cooldown, and Confirmation Window — can be overridden for individual cameras. Leave a field blank to inherit the global value. This is useful when one camera has poor lighting or unusual angles that affect detection quality.
See Detection Config for where to set per-camera overrides.