move_detect/edge
유창욱 01c7f4636e fix(edge): smooth keypoints per-track after tracking, not before (FIX 1)
edge/app.py run_once used ONE shared KeypointSmoother across all persons
BEFORE tracking assigned IDs. The smoother holds per-joint-index One-Euro
filter state, so with >1 person in frame the filter state was shared and
corrupted across different people, and same-timestamp calls within a frame
would pass through unsmoothed while still clobbering the shared state.
Multi-person scenes could get corrupted torso angles -> missed/false falls.

Add TrackSmootherPool (edge/smoothing.py) that lazily allocates one
KeypointSmoother per track_id. run_once now: tracks raw keypoints first,
then smooths each track's latest frame in place using its own pooled
smoother, and forgets a track's smoother when the track is lost (ties into
FIX 5 lost-track cleanup).

BEHAVIOR CHANGE: keypoints are now smoothed after tracking instead of
before. Single-person pipelines are unaffected (still one smoother, one
identity). Multi-person pipelines get correct, non-cross-contaminated
smoothing.

run_once signature: smoother param replaced with pool: TrackSmootherPool.
build_pipeline now constructs "pool" instead of "smoother".

Tests: tests/test_smoothing.py adds TrackSmootherPool identity/forget
coverage; tests/test_app.py adds test_two_persons_get_independent_smoothing
demonstrating each track's smoothed keypoints stay on its own side instead
of being pulled toward the other person.
2026-07-11 22:14:03 +09:00
..
adapters feat(edge): hardware adapter stubs + Pi bring-up/benchmark doc 2026-07-11 21:54:24 +09:00
detectors feat(edge): ZoneIntrusionDetector (foot-anchor point-in-polygon, debounce) 2026-07-11 21:05:42 +09:00
__init__.py feat(edge): data models (Keypoint, BBox, Person) + COCO indices 2026-07-11 20:13:00 +09:00
alert.py feat(edge): PostClient with HMAC+nonce signed event POST 2026-07-11 21:27:38 +09:00
app.py fix(edge): smooth keypoints per-track after tracking, not before (FIX 1) 2026-07-11 22:14:03 +09:00
config.py feat(edge): env-based Config for detectors and transport 2026-07-11 21:40:06 +09:00
engine.py feat(edge): EventEngine orchestration with dedup + cooldown 2026-07-11 21:12:43 +09:00
events.py feat(edge): Event model + severity mapping (§7.3 payload) 2026-07-11 20:34:57 +09:00
geometry.py feat(edge): pose geometry utils (torso angle, com, normalization) 2026-07-11 20:18:03 +09:00
models.py feat(edge): data models (Keypoint, BBox, Person) + COCO indices 2026-07-11 20:13:00 +09:00
ports.py feat(edge): Track model + IoU tracker with lost-track reporting 2026-07-11 20:28:45 +09:00
queue.py feat(edge): OfflineQueue (SQLite persist + ordered resend) 2026-07-11 21:33:43 +09:00
smoothing.py fix(edge): smooth keypoints per-track after tracking, not before (FIX 1) 2026-07-11 22:14:03 +09:00
snapshot.py feat(edge): RingBuffer + face blur + JPEG snapshotter 2026-07-11 21:21:57 +09:00
tracking.py feat(edge): Track model + IoU tracker with lost-track reporting 2026-07-11 20:28:45 +09:00