feat(sensing-server): wire wifi-densepose-vitals 4-stage pipeline#485
Open
schwarztim wants to merge 1 commit intoruvnet:mainfrom
Open
feat(sensing-server): wire wifi-densepose-vitals 4-stage pipeline#485schwarztim wants to merge 1 commit intoruvnet:mainfrom
schwarztim wants to merge 1 commit intoruvnet:mainfrom
Conversation
Add CrateVitalsPipeline wrapping the wifi-densepose-vitals crate's IIR + autocorrelation pipeline. Uses crate output when confidence > 0.05, falls back to FFT heuristic below threshold. Reduces HR jitter and unstable confidence readings (ADR-045 §4.2).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The sensing server's vital_signs module previously used an in-process FFT heuristic that produced jittery heart-rate readings (varying ±15 bpm minute-to-minute) and inconsistent confidence scores. The workspace already includes the
wifi-densepose-vitalscrate (4-stage IIR + autocorrelation pipeline), but it wasn't wired into the live REST path.Design rationale
CrateVitalsPipeline) instead of replacing the heuristic outright? Confidence-based fallback. The crate produces high-quality estimates only when the input signal has good SNR. Below confidence 0.05 the legacy heuristic outperforms the crate output, so we fall back. This preserves availability under poor signal conditions.wifi-densepose-vitals/tests/. Confidence below 0.05 corresponds to autocorrelation peaks indistinguishable from noise.Changes
v2/crates/wifi-densepose-sensing-server/src/vital_signs.rs: addCrateVitalsPipelinestruct wrappingwifi_densepose_vitals::VitalsPipeline; insert intoextract_vitals()flow with confidence threshold; fallback to existing heuristic on low confidence.v2/crates/wifi-densepose-sensing-server/src/types.rs: replaceVitalSignDetectorwithCrateVitalsPipelineinNodeStateandAppStateInner(both struct fields and initializers).v2/crates/wifi-densepose-sensing-server/Cargo.toml: addwifi-densepose-vitalsworkspace dep.Test results
cargo test --workspace --no-default-features: 1632 passed, 0 failedpython verify.py: pre-existing hash mismatch on this machine due to numpy/scipy version delta (hash generated on a different platform); our changes make no modifications toarchive/v1/data/proof/— confirmed bygit diff origin/main..HEAD -- archive/v1/data/proof/ADR / docs
wifi-densepose-vitalscrate already has its own design notes.