wifi-densepose/v2/crates/cog-pose-estimation/tests
lockewerks 51fd326aae test(cog-pose): verify weights load and produce valid 17-keypoint output
Strengthen `real_weights_load_when_available` in the smoke suite:

- search for `pose_v1.safetensors` under the three plausible test
  cwds (crate dir, `v2/`, repo root) so the test exercises the real
  loader regardless of where `cargo test` is invoked from
- after inference, chunk the flat 34-scalar output into 17 (x, y)
  pairs and assert each pair is finite, non-NaN, and inside the
  sigmoid range [0, 1]
- keep the skip path with a clear message when the safetensors blob
  isn't on disk (so the suite still passes on a fresh appliance
  install where weights ship separately)

This complements the inline unit tests in `src/inference.rs` — those
exercise the loader / forward-pass plumbing, the smoke test exercises
the public crate surface.
2026-05-25 16:51:05 -06:00
..
smoke.rs test(cog-pose): verify weights load and produce valid 17-keypoint output 2026-05-25 16:51:05 -06:00