Adds _FrameGrabber which decodes in a background thread and keeps only the
newest frame; VideoSource drop_stale (STREAM only) returns the latest frame
so a slow consumer never builds a backlog. app enables it for streams.
REPLAY is unchanged. 82 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds write_local_event_tuning and a sensitivity group (confirm window,
horizontal angle, require-rapid-drop, require-lower-body) that persists to
the untracked local config and applies next start. 79 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a mid-stream drop recovery test and a pipeline test proving a
disconnected frame yields no events and interrupts a pending suspect
(stream loss never alarms). Live preview and fall detection on the real
Hikvision stream were confirmed on Windows. 74 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cv2.putText only supports ASCII (Hershey fonts); the middle-dot in the
label rendered as garbage on saved screenshots. screenshot_label builds
an ASCII-only 'ID STATE' string for the annotation; the Qt live-view
label is unchanged. 72 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds configurable event.require_rapid_drop (default off), require_lower_body
(default off) and horizontal_angle_threshold_degrees (default 45). With the
lenient defaults a sustained horizontal pose alone enters SUSPECT and confirms
after the confirm window, which is now the main false-positive guard; missing
knees/ankles no longer reject the pose. Thresholds flow into config_version.
End-to-end smoke confirms a lying pose; 70 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PersonAnalysis now carries the policy Evidence; view_model builds a Qt-free
per-person diagnostic line (acc/horiz/ang/rapid/cand/state, or the reject
reason) and VideoView overlays it in a corner. Read-only, no decision change;
locates where a real fall stops. 67 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Config gains source.transport (tcp/udp), timeout_seconds and low_latency;
build_ffmpeg_options assembles OPENCV_FFMPEG_CAPTURE_OPTIONS and app.py
sets it into the environment before opening the stream, so tuning lives
in config/settings instead of a launch script. Settings tab exposes a
dropdown/number/checkbox rather than the raw option string. 64 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Settings tab gains a camera group (host/port/channel/user/masked password),
a background connection-test worker that probes one frame off the GUI
thread and shows it in a preview, and a save button that writes the
structured source to the untracked config.local.json. 60 tests pass;
Qt shell compiles and needs a Windows smoke.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
VideoSource STREAM connects to the real camera (1920x1080, monotonic
timestamps) and a bad address goes to retrying without alarm. Credentials
stay in the SILVER_POSE_RTSP_URL env var only; no address in the repo.
GUI preview and live pose overlay remain to be smoked on Windows.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A: PoseAdapter.set_confidence_threshold is applied on start, so the
settings model-confidence field actually affects inference.
B: config source.mode ('stream'|'replay') is explicit; app no longer
guesses the source type from the URL prefix.
C: FallStateMachine takes a session_id and from_config generates a
unique one per run, so event ids never collide across restarts
(no screenshot overwrite or duplicate JSONL identity in a day).
51 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reconnect/state/idempotency logic is implemented and unit-tested; the
unmet acceptance is on-site Hikvision preview (T-203) and consented fall
and counter-example recordings with field safety (T-204, T-205). Not
marked DONE without real observable evidence.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AlertDispatcher de-duplicates by event_id and fires each side effect once
per CONFIRMED: annotated screenshot, one JSONL line (config_version,
source_id, no rtsp/credentials), sound and popup via injectable sink.
44 tests pass; real-frame artifact smoke verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Qt-free view_model builds monitor view state and isolates the settings
draft from the running config snapshot; gui.py/app.py are a thin PyQt5
shell that only renders already-decided FrameAnalysis. 39 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>