wifi-densepose/v2/crates/cog-pose-estimation
lockewerks 339d9d70dc feat(cog-pose): wire pose_v1.safetensors into inference path
Replace silent stub fallback in InferenceEngine with a tracing-aware
loader:

- emit `tracing::info!` when pose_v1.safetensors loads into the candle
  backend, including the resolved on-disk path
- emit `tracing::warn!` (instead of silently falling through) when the
  configured weights file is missing or no path is set at all, so the
  appliance log surfaces "no model — running stub" instead of just
  emitting confidence=0 frames forever
- inline unit tests covering both branches: stub fallback shape +
  confidence, and a real-weights forward pass that asserts the output
  decomposes into 17 (x, y) pairs all finite and in [0, 1]

The forward pass itself already matched the training script
(Conv1d 56->64->128->128 with dilations [1, 2, 4], GlobalMeanPool,
Linear 128->256->34, sigmoid) and the tensor names in the
safetensors file (`enc.c1/c2/c3.weight|bias`, `head.fc1/fc2.weight|bias`)
line up with the VarBuilder prefixes — no architecture changes
required, only loader hygiene.

Confidence is the published validation PCK@50 (0.185); v0.0.1 doesn't
emit per-frame confidence and we're not fudging that here.
2026-05-25 16:50:56 -06:00
..
cog docs: repoint #640 references to #645 (original deleted, replaced) (#646) 2026-05-19 17:18:05 -04:00
src feat(cog-pose): wire pose_v1.safetensors into inference path 2026-05-25 16:50:56 -06:00
tests fix(security): audit — fix RUSTSEC vulns, clippy warnings, dead code (#769) 2026-05-23 05:36:13 -04:00
Cargo.toml chore(cogs): publish cog-person-count + cog-pose-estimation 0.3.0 to crates.io 2026-05-25 10:52:47 -04:00