Tuning
Temporal smoothing, the FPS-versus-quality levers, small-object recall, and the tiling toggle.
Tuning Helios is config work, not code work: iterate until it works on the machine in front of you, then record the winning values in that machine's profile. The target is ≥ 20–30 FPS with legible, stable boxes.
Temporal smoothing
PPE and danger-zone state is decided by a rolling-window majority vote per track ID, so a violation or intrusion reads cleanly instead of strobing. Three knobs control it:
[default]
smoothing_window = 8 # frames in the rolling vote (~a quarter-second at 30fps)
smoothing_min_ratio = 0.6 # fraction of the window that must agree to hold a state
smoothing_evict_after = 15 # frames a vanished track survives before its history is droppedHow the vote behaves:
- Majority vote. A key is reported
Truewhen its true-count divided by its window length is at leastmin_ratio. - Fast onset. A brand-new key with a single sample reports that sample immediately — the window is effectively length 1 — so a violation flashes without waiting for the window to fill.
- Anti-strobe. Once the window is full, flipping an established state takes
ceil(window * (1 - min_ratio)) + 1consecutive dissenting frames. Withwindow = 4andmin_ratio = 0.6, threeTrueframes followed by oneFalsestill yieldsTrue(3/4 = 0.75 ≥ 0.6). - Bounded memory. A key absent for more than
evict_afterconsecutive frames is dropped, so long sessions do not accumulate state.
Tune it by symptom:
| Symptom | Fix |
|---|---|
| Violation / intrusion state strobes | Raise smoothing_window / smoothing_min_ratio |
| Violation takes too long to flash (over ~2 s) | Lower smoothing_window / smoothing_min_ratio |
Record the winning values in the machine's [profiles.<hostname>] table.
FPS versus box quality
All of these are config knobs; none requires a code change.
| Lever | Effect | Try |
|---|---|---|
model | bigger = better quality, slower | yoloe-11s-seg.pt, then -11m-seg, then -11l-seg |
imgsz | smaller = faster, less precise | 896 / 640 / 512 / 480 |
conf | higher = fewer boxes, less flicker | 0.20 – 0.40 |
target_fps | caps the loop (saves GPU) | 30 |
tracker | tracking algorithm used for counting | bytetrack.yaml (light) or botsort.yaml (occlusion) |
smoothing_window / smoothing_min_ratio | anti-strobe for PPE and zone state | 8 / 0.6 — raise to stabilize, lower to react faster |
The measured FPS shown next to the feed is smoothed over the full loop iteration, after throttling to target_fps — so a value pinned near your target means the loop has headroom, not that it is struggling.
The one-time costs — the AMP check and the model-weight downloads — happen on first run only. Pre-warm them before you need the demo; see Quickstart.
Small-object recall (imgsz)
Small items — especially safety glasses — are the hardest to detect. The first lever is imgsz: a larger inference size improves small-object recall at an FPS cost.
If hard hat or vest recall is weak, raise imgsz (for example 640 to 896) and re-measure FPS, then record the winning value in that machine's profile. Hard hat and vest are the reliable items to lean on; do not promise glasses.
The tiling toggle
Tiling is the second small-object-recall lever. Instead of one full-frame inference, the frame is sliced into overlapping tiles that are inferred independently and merged.
- It is exposed as a Tiling button in the UI and flips live on the server — no restart, no code change. The tooltip states the trade-off plainly: "Tiling improves small-object recall but disables tracking-based counting while on."
- It ships off by default, so the default path is byte-for-byte the tracked full-frame path.
tiling_enabledinhelios.tomlseeds the startup default only; the live toggle is authoritative afterward.tile_size(default 640) andtile_overlap(default 128) are config-only — there are no UI sliders.
Tiling costs you tracking
Tiles are inferred independently, so no tile carries a tracker ID. While tiling is on, cumulative line counting and the anti-strobe smoothing both fall back to instantaneous behavior. Turn tiling on when small-object recall matters more than stable counts, and off again when it doesn't.