Commit Graph
82 Commits
Author SHA1 Message Date
ilaandClaude Opus 4.8 ea24fc4c4b feat(v2): compact monitor status row, small buttons, screenshot gallery
Right panel now shows connection+detection status on one line, small
start/stop buttons on one line, event text with the red-note inline, and a
3x3 reverse-chronological gallery of recent confirmed screenshots filling
the rest. Double-clicking a thumbnail opens a full-image overlay. Gallery
items are collected off the UI thread from confirmed updates (deduped by
event id) and each ImageOp is built once and cached. Cross-compiles for
Windows; no new deps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 20:58:45 +08:00
ilaandClaude Opus 4.8 8440bdefdf chore(tasks): start T-307 V2 monitor UI polish and screenshot gallery
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 20:56:22 +08:00
ilaandClaude Opus 4.8 09f7ecad67 fix(v2): drop rw_timeout ffmpeg option rejected by the RTSP demuxer
Field ffmpeg reported 'Option rw_timeout not found' and exited, causing a
reconnect loop. rw_timeout is an avio/protocol option, not an RTSP demuxer
option; the RTSP socket timeout is build-specific (-stimeout / -timeout).
Omit it for portability — a dead TCP connection still ends decode and
triggers reconnect. Keeps transport and low-latency flags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 20:36:51 +08:00
ilaandClaude Opus 4.8 99226c7479 fix(v2): log redacted ffmpeg/ffprobe stderr on stream failure
The stream worker discarded ffmpeg stderr, so reconnect loops were opaque.
Capture stderr and log it with the RTSP URL/credentials redacted, so the
real cause (auth, timeout, option, URL parse) is diagnosable without
leaking the source address.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 20:31:00 +08:00
ilaandClaude Opus 4.8 f58728cddd chore(v2): vendor dependencies for offline/China builds
go mod vendor pins onnxruntime_go v1.12.1, Gio and the rest into v2/vendor
so go run/build work without hitting proxy.golang.org (blocked/slow in
China). Verified: CGO_ENABLED=1 go build -mod=vendor ./internal/spike and
GOOS=windows go build -mod=vendor ./internal/ui both pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:35:01 +08:00
ilaandClaude Opus 4.8 97c1c4a974 fix(v2): pin onnxruntime_go to v1.12.1 to match onnxruntime 1.19.2 DLL
v1.31.0 requested ORT_API_VERSION 26 (onnxruntime 1.26); the field DLL is
Python 3.8's onnxruntime 1.19.2 (API 19), so GetApi(26) returned NULL and
init failed. v1.12.1 targets ORT API 19, matching the existing DLL with no
download. Verified: native cgo build of internal/spike compiles ort.go
against v1.12.1; Gio UI still cross-compiles for Windows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:04:09 +08:00
ilaandClaude Opus 4.8 539a6026a0 fix(v2): log the real error behind ONNX/engine/pipeline init failures
The controller discarded the wrapped error and showed only a generic
message. Log the actual cause (e.g. onnxruntime version mismatch) to the
console so field startup failures are diagnosable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:18:25 +08:00
ilaandClaude Opus 4.8 5075f7ae4d docs: T-306 done, Gio window verified on Windows
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:28:48 +08:00
ilaandClaude Opus 4.8 4188a2b06c feat(v2): migrate UI from Walk to Gio
Rewrites internal/ui/window.go in Gio, keeping the Window interface
(NewWindow/Run/Present/PresentAlert/ReportIssue) and the pure-Go ViewModel.
Background updates mutate shared state under a lock and Invalidate; the Gio
loop renders the latest frame. Dual tabs, widget.Image for render's RGBA, a
self-drawn confirm dialog and a MessageBeep sound. Drops lxn/walk (and the
TTM_ADDTOOL/comctl class of problems). Verified via GOOS=windows CGO_ENABLED=0
build of the UI packages; full app build needs Windows+CGo for onnxruntime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:26:19 +08:00
ilaandClaude Opus 4.8 18e1331f8f chore(tasks): start T-306 migrate V2 UI Walk->Gio
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:20:54 +08:00
ilaandClaude Opus 4.8 8d71889d9c docs: adopt Gio for V2 UI after spike passed on Windows; add T-306 migration
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:16:40 +08:00
ilaandClaude Opus 4.8 43ec154075 feat(v2): Gio UI spike, cross-compiles CGo-free for Windows
Adds cmd/gio-spike: a minimal Gio window (dual tabs, an *image.RGBA video
area, start/stop) that avoids the Walk TTM_ADDTOOL/comctl manifest problem
entirely. Verified via GOOS=windows CGO_ENABLED=0 go build (11MB single
exe). Windows visual smoke pending. Existing Walk ui-spike left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 08:45:21 +08:00
ilaandClaude Opus 4.8 677a0d587b chore(tasks): start T-305 V2 Gio UI spike (Walk TTM_ADDTOOL)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 22:49:01 +08:00
ila 536396f373 feat(v2): add realtime command and release tooling 2026-07-22 21:28:57 +08:00
ila a98005e631 feat(v2): implement operator monitoring window 2026-07-22 21:24:10 +08:00
ila 8e093acb9b feat(v2): compose realtime monitor pipeline 2026-07-22 21:20:13 +08:00
ila d183170554 feat(v2): add annotated evidence and alert dispatch 2026-07-22 21:17:50 +08:00
ila 3edda4fb62 feat(v2): add reconnecting FFmpeg stream source 2026-07-22 21:15:25 +08:00
ila 70d9c5c73e feat(v2): add safe runtime configuration 2026-07-22 21:13:03 +08:00
ila 8aa36c508a docs(plan): add T-304 delivery plan 2026-07-22 21:10:38 +08:00
ila 2ae3415fbf chore(tasks): start T-304 Go demo delivery 2026-07-22 21:08:01 +08:00
ila ca971306eb docs(t303): record demo fall false negative 2026-07-22 20:49:41 +08:00
ila 1298369054 feat(v2): add fall event regression engine 2026-07-22 16:18:16 +08:00
ila 258fa49259 chore(tasks): start T-303 Go event regression 2026-07-22 16:05:36 +08:00
ila 22aadf2b26 feat(v2): complete Go inference and UI spike 2026-07-22 16:01:28 +08:00
ila 104608751a chore(tasks): start T-302 Go spike 2026-07-22 15:46:49 +08:00
ila b013263dae docs(progress): record T-301 ONNX consistency 2026-07-22 15:14:41 +08:00
ila 2bfca1b244 feat(v2): lock ONNX pose export baseline 2026-07-22 15:14:26 +08:00
ila 2544456549 chore(tasks): start T-301 ONNX consistency 2026-07-22 15:12:29 +08:00
ila 084082055d feat(v1): add demo runbook and release package 2026-07-22 15:10:11 +08:00
ila 3b263a87ea chore(tasks): start T-205 demo release package 2026-07-22 15:05:58 +08:00
ila 30437f0479 docs(acceptance): complete T-204 field validation 2026-07-22 15:05:31 +08:00
ilaandClaude Opus 4.8 8b33f61112 feat(v1): chinese screenshot labels via Pillow with ASCII fallback
annotate_frame draws Chinese labels (e.g. '确认摔倒 P-0001') using a CJK
font via Pillow when available (Windows uses Microsoft YaHei), and falls
back to the ASCII cv2 label when Pillow or a CJK font is missing. 86 tests
pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:10:07 +08:00
ilaandClaude Opus 4.8 c5e4d87b42 chore(tasks): start T-213 chinese screenshot annotation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:08:01 +08:00
ilaandClaude Opus 4.8 6e69518742 feat(v1): latest-frame-only reader thread for low-latency RTSP
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>
2026-07-22 00:04:00 +08:00
ilaandClaude Opus 4.8 b32c36fc44 chore(tasks): start T-212 latest-frame-only reader for low latency
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:02:01 +08:00
ilaandClaude Opus 4.8 d3cd8ecb55 feat(v1): edit detection sensitivity from the settings tab
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>
2026-07-22 00:00:51 +08:00
ilaandClaude Opus 4.8 922609f236 chore(tasks): start T-211 sensitivity params in settings
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:58:52 +08:00
ilaandClaude Opus 4.8 578aa49f99 docs(T-204): record false-positive pass on real stream (no tuning needed)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:55:40 +08:00
ilaandClaude Opus 4.8 43e8168390 docs: mark T-204 in progress in current-state
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:53:23 +08:00
ilaandClaude Opus 4.8 2688f2d449 feat(v1): add event-log summary tool for acceptance evidence
v1/report.py reads events.jsonl and lists each confirmed event with its
latency (flags the 1-3s target) and screenshot, or reports a clean pass
when empty. Supports T-204 latency records and false-alarm counting.
78 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:52:59 +08:00
ilaandClaude Opus 4.8 68f30d416f chore(tasks): start T-204 false-positive verification and tuning
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:51:59 +08:00
ilaandClaude Opus 4.8 0973ada78d docs: sync current-state task status after T-203 done
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:50:00 +08:00
ilaandClaude Opus 4.8 f1a8d0ea47 test(v1): lock reconnect and disconnect-no-alarm behavior; close T-203
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>
2026-07-21 23:49:21 +08:00
ilaandClaude Opus 4.8 b35082a643 fix(v1): use ASCII screenshot annotation to avoid garbled text
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>
2026-07-21 23:38:53 +08:00
ilaandClaude Opus 4.8 7029468037 chore(tasks): start T-210 fix garbled screenshot annotation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:37:18 +08:00
ilaandClaude Opus 4.8 b1f0e8aeb4 feat(v1): relax fall sensitivity for low overhead cameras
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>
2026-07-21 23:29:16 +08:00
ilaandClaude Opus 4.8 5f29a8e60f chore(tasks): start T-209 relax overhead fall sensitivity
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:23:45 +08:00
ilaandClaude Opus 4.8 bf86b5612f feat(v1): per-frame fall decision diagnostics overlay
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>
2026-07-21 23:14:05 +08:00
ilaandClaude Opus 4.8 2eeaba0ab8 chore(tasks): start T-208 per-frame fall decision diagnostics
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:10:53 +08:00