The fallback nobody ran: a pose model config that passes review and breaks rehab sessions

The GPU delegate fails on a slice of Android WebViews, the pose pipeline falls back to CPU exactly as configured, and the patient is told no movement was detected. Nothing crashed. The config line behind it was reviewed and approved, because in DanceSaga the fallback points to a model variant that only makes sense with a GPU behind it.

Why review lets it through

The diff is one line of YAML: the fallback model key was copied from the primary block and still names the heavy landmark variant. The reviewer sees a valid path to an asset that exists, and the schema validator agrees. Neither one can see that the heavy variant on a WASM CPU backend cannot fit the 33 ms per frame budget the scoring loop assumes at 30 fps. CI misses it too, because every runner has a working GPU and the fallback branch has never processed a real frame. The configuration is syntactically correct and operationally fictional.

How the failure presents

Under load the inference watchdog drops late frames, and the scoring layer, which cannot tell a dropped frame from an empty one, records pose lost for most of the session. Rep counts fall to zero, range of motion reads as nothing, and the clinician dashboard shows a patient who apparently stood still through the whole exercise. The session completes cleanly, so the error budget stays green and the incident arrives days later as a support ticket. When the GPU path fails, the fallback alone does not keep the system useful. The layer above it has to report state honestly: no inference, low confidence and nobody in frame must stay three separate states.

A detection step you can run today

Launch headless Chromium with the disable-gpu switch, feed a recorded golden clip in as the camera through the use-fake-device-for-media-stream and use-file-for-fake-video-capture switches, open a session page and read back two values: landmark presence rate and p95 inference latency. If presence drops well below what the same clip produces on GPU, or p95 crosses the frame budget, the fallback is broken whatever the config says. My rough estimate is that the heavy variant on a mid-range phone CPU runs several times over budget, so the signal is not subtle once you look. The decision rule for CI: every declared fallback must be cheaper than the component it replaces and must have a passing run against the golden clip on the current release, with each primary component disabled in turn, or the build fails.

The trade-off that remains

Moving the fallback to the lite variant keeps sessions alive on CPU but costs precision at the distal joints, so range of motion recorded in degraded mode must be flagged and kept out of trend comparisons, which under medical device software lifecycle standards such as IEC 62304 turns a silent quality loss into a documented risk control.

Why not drop the fallback and fail loudly?

A rehab session that stops dead on a patient's phone is a worse outcome than a degraded session that is labelled as degraded. Fail loudly only when the fallback itself cannot meet the frame budget on the golden clip.

Back to DanceSaga - Pose Detection · Domains

← Back to DanceSaga - Pose Detection
Engineering & Architecture Brief

The fallback nobody ran: a pose model config that passes review and breaks rehab sessions

The GPU delegate fails on a slice of Android WebViews, the pose pipeline falls back to CPU exactly as configured, and the patient is told no movement was detected. Nothing crashed. The config line behind it was reviewed and approved, because in DanceSaga the fallback points to a model variant that only makes sense with a GPU behind it.

Why review lets it through

The diff is one line of YAML: the fallback model key was copied from the primary block and still names the heavy landmark variant. The reviewer sees a valid path to an asset that exists, and the schema validator agrees. Neither one can see that the heavy variant on a WASM CPU backend cannot fit the 33 ms per frame budget the scoring loop assumes at 30 fps. CI misses it too, because every runner has a working GPU and the fallback branch has never processed a real frame. The configuration is syntactically correct and operationally fictional.

How the failure presents

Under load the inference watchdog drops late frames, and the scoring layer, which cannot tell a dropped frame from an empty one, records pose lost for most of the session. Rep counts fall to zero, range of motion reads as nothing, and the clinician dashboard shows a patient who apparently stood still through the whole exercise. The session completes cleanly, so the error budget stays green and the incident arrives days later as a support ticket. When the GPU path fails, the fallback alone does not keep the system useful. The layer above it has to report state honestly: no inference, low confidence and nobody in frame must stay three separate states.

A detection step you can run today

Launch headless Chromium with the disable-gpu switch, feed a recorded golden clip in as the camera through the use-fake-device-for-media-stream and use-file-for-fake-video-capture switches, open a session page and read back two values: landmark presence rate and p95 inference latency. If presence drops well below what the same clip produces on GPU, or p95 crosses the frame budget, the fallback is broken whatever the config says. My rough estimate is that the heavy variant on a mid-range phone CPU runs several times over budget, so the signal is not subtle once you look. The decision rule for CI: every declared fallback must be cheaper than the component it replaces and must have a passing run against the golden clip on the current release, with each primary component disabled in turn, or the build fails.

The trade-off that remains

Moving the fallback to the lite variant keeps sessions alive on CPU but costs precision at the distal joints, so range of motion recorded in degraded mode must be flagged and kept out of trend comparisons, which under medical device software lifecycle standards such as IEC 62304 turns a silent quality loss into a documented risk control.

Technical FAQ: Why not drop the fallback and fail loudly?

A rehab session that stops dead on a patient's phone is a worse outcome than a degraded session that is labelled as degraded. Fail loudly only when the fallback itself cannot meet the frame budget on the golden clip.

Related Architecture Specifications (DANCEGOAL): salsamethod.com · danceheal.com · learnmerengue.com

More Technical Articles on rehabdance.com

The fallback pose model that dies with the primary →The CPU fallback nobody has ever loaded: a pose-detection config error that sails through review →