Add live final-position feedback and fix step detection accuracy

Shows a live banner as each step of the approach is counted, ending in
"FINAL POSITION - RELEASE!" once the 5th footfall lands. Also fixes
LiveStepDetector's peak-prominence check, which compared a candidate
footfall only to its immediate neighboring frame and silently dropped
real steps that landed across several closely-spaced frames; it now
tracks the true rise/fall trough on each side instead. Switches
PoseAnalyzer to ML Kit's faster base pose model (the accurate model was
starving the peak detector of frames on unaccelerated hardware), and
makes LiveStepDetector's stillness-based reset toggleable, currently
off for easier testing against recorded reference clips.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
midnight-masala
2026-09-07 20:58:03 +08:00
co-authored by Claude Sonnet 5
parent afb9d800ff
commit 2bb7c6ca7b
10 changed files with 212 additions and 42 deletions
+7 -1
View File
@@ -60,7 +60,13 @@ dependencies {
implementation libs.androidx.lifecycle.runtime.ktx
implementation libs.androidx.activity.ktx
// ML Kit Pose Detection (accurate model, for form analysis precision)
// ML Kit Pose Detection. Both models pulled in: the base (fast) model is
// what's actually wired up in PoseAnalyzer right now, since the heavier
// "accurate" model runs too slowly on unaccelerated hardware (e.g. the
// emulator's software renderer) to catch a fast, brief motion like a
// footfall between analyzed frames -- see PoseAnalyzer's comment on
// ACCURATE vs BASE options for the tradeoff and how to switch back.
implementation libs.mlkit.pose.detection
implementation libs.mlkit.pose.detection.accurate
implementation libs.kotlinx.coroutines.android