Commit Graph

3 Commits

Author SHA1 Message Date
ruv e94f4d8f73 feat(calibration): cog adapter producer — completes the cog --adapter feature
I'd shipped the Rust cog-pose --adapter *consumer* (+test) but there was no
*producer* for cog-format adapters, leaving it a half-feature. cog_calibrate.py
fits a rank-r LoRA on the cog conv+MLP head (pose_v1.safetensors, 56x20) from a
labeled in-room capture and writes a safetensors with fc1.a/fc1.b/fc2.a/fc2.b
(scale baked into b) — exactly what the Rust engine loads. Verified against the
in-repo pose_v1.safetensors: correct keys/shapes, reduces fit error, active
adapter, ~2.6KB. Adds test_cog_calibration.py (passes) + README documenting the
two non-interchangeable producers (transformer .npz vs cog safetensors).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 05:10:07 -04:00
ruv 76cc57294d test(calibration): self-contained end-to-end regression test
The committed calibration service (model.py/calibrate.py/infer.py) had no
automated test — only ad-hoc verification. Adds a CPU-only, no-real-checkpoint
test that exercises the CLI end-to-end on synthetic data: build base ->
calibrate.py fits adapter -> infer.py runs base+adapter, asserting adapter
size (<200KB), keypoint shape [N,17,2], finiteness, [0,1] range, and that the
adapter actually changes the output. Passes on Windows CPU (torch 2.11).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 05:02:24 -04:00
ruv 4db727649a feat(calibration): RuView per-room calibration service (reference impl)
Operationalizes the campaign's central finding (ADR-150 §3.3-3.6): a frozen
shared base + a ~11KB per-room LoRA adapter from ~100-200 labeled samples
recovers SOTA-level pose in any new room/person. Verified end-to-end:
source-only base zero-shot 3.09% on unseen room -> 74.29% after 200-sample
calibration. Files: model.py (PoseNet+LoRA), calibrate.py, infer.py, README
with measured calibration budget.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 02:22:10 -04:00