description
Unattended-children rule: fire when at least one student is present AND no teacher is present, sustained for >= violation_rate_threshold (default 80%) of a sliding window (default 30 s). Per-frame counts come from detector classes or SGIE age scores (persons reclassified to adult/child); inter-frame time is clamped to 5 s so stream gaps can't inflate the violation time, and the window counts committed one-second buckets only. After the initial alert the rule re-fires as a reminder every reminder_interval_seconds (default 5 min) while the violation persists; when a teacher returns the cycle resets. Room-level accumulator — no tracker.
use cases
- childcare supervision — alert when children are left without any caregiver
- classroom coverage monitoring during operating hours
- reminder-style escalation for violations that persist (initial alert + periodic reminders)
limitations
- needs adult/child separation (detector classes or SGIE age scores)
- room-level only — does not identify which teacher left or track individuals
- by design slow (window-rate) — not an instant "teacher stepped out" alert
config parameters
general
| Parameter | Type | Default | Notes |
|---|---|---|---|
| window_duration_seconds * | integer | 30 | sliding window (seconds) (min 1) |
| violation_rate_threshold * | number | 0.8 | (min 0, max 1) |
| reminder_interval_seconds | integer | 300 | gap between reminder alerts (min 1) |
zone
| Parameter | Type | Default | Notes |
|---|---|---|---|
| cam_zones | array of array of pair of number | [] |
advanced
| Parameter | Type | Default | Notes |
|---|---|---|---|
| teacher_labels | array of string | ["teacher", "giao_vien", "co_giao", "adult"] | |
| student_labels | array of string | ["student", "hoc_sinh", "tre_em", "child"] | |
| age_classification_threshold | number | 0.3 | (min 0, max 1) |
| confidence_threshold | number | 0.5 | (min 0, max 1) |
| buffer_duration | integer | 33 | (min 10) |
golden replay cases
| Case | Frames | Expected events |
|---|---|---|
| no-teacher | 8 | 1 |