Commit Graph

2 Commits

Author SHA1 Message Date
ruv 15a983b555 fix(paired-data): 4 bugs corrupting/blocking camera-supervised training data (#1007)
1. record-csi-udp.py stamped LOCAL time with a 'Z' (UTC) suffix → camera/CSI disagreed
   by the UTC offset → 0 aligned pairs. Now writes true UTC via datetime.now(timezone.utc).
2. align-ground-truth.js kept empty-keypoint (non-detection) records at confidence 0,
   collapsing window avgConf below threshold → all windows rejected. Now skipped at load.
3. extractCsiMatrix silently zero-padded/truncated mixed-subcarrier frames. Now frames
   are filtered to the session's modal subcarrier count before windowing — never padded.
4. CSI/feature matrices are filled frame-major but were labeled shape [nSc, nFrames] —
   transposed. Labels corrected to [nFrames, nSc] / [nFrames, dim].

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-06-17 10:17:12 -04:00
ruv 35903a313d feat: NaN-safe TCN + CSI UDP recorder for real ESP32 training (#362)
- Add activation clamping [-10, 10] in TCN forward pass to prevent NaN
  from real CSI amplitude ranges after normalization
- Add safe sigmoid with input clamping [-20, 20]
- Add scripts/record-csi-udp.py: lightweight ESP32 CSI UDP recorder

Validated on real paired data (345 samples):
  ESP32 CSI: 7,000 frames at 23fps from COM8
  Mac camera: 6,470 frames at 22fps via MediaPipe
  PCK@20: 92.8% | Eval loss: 0.083 | Bone loss: 0.008

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 17:18:41 -04:00