feat: live pose overlay for form checking (issue #17 MVP) - #23
Open
mohansree14 wants to merge 1 commit into
Open
feat: live pose overlay for form checking (issue #17 MVP)#23mohansree14 wants to merge 1 commit into
mohansree14 wants to merge 1 commit into
Conversation
…MVP) Adds a "Form check" button to each exercise during a workout that opens the front camera and overlays a live MoveNet skeleton on top of it, using on-device tfjs pose detection (no frames leave the browser). Scoped as an MVP per the issue discussion: proves the pose-detection pipeline works end-to-end in the app before any rep-counting or form-correction logic is built on top of it. - FormTracker.jsx: camera + canvas overlay component - @tensorflow/tfjs + @tensorflow-models/pose-detection (MoveNet Lightning) - code-split via React.lazy so the ~1MB+ model/runtime only loads when the sheet is opened, not on every app boot - @mediapipe/pose aliased to a stub in vite.config.js — pose-detection statically imports it for the BlazePose runtime we don't use, and the real package isn't ESM-bundler-friendly
mohansree14
force-pushed
the
feat/form-check-pose-overlay
branch
from
August 24, 2026 23:46
e3b4ead to
eb38d17
Compare
|
Not landing in #28. CONTRIBUTING is explicit about staying dependency-light, and MoveNet weights load from Google's CDN — that fights the self-hosted / no-third-party-calls model. The overlay is a reasonable MVP for #17 once weights are vendored or optional. Please keep as a follow-up, not in the hygiene PR. |
|
Heads up: openGym has moved to GitLab. The GitHub repo is no longer maintained (the account was suspended, so it's out of my hands). Please re-open this issue/PR on GitLab so it doesn't get lost, I'll pick it up there. Questions, help and roadmap discussion now happen in Discord: Sorry for the noise, and thanks for sticking around. |
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.
Summary
Adds a Form check button to each exercise during a workout that opens the front camera and overlays a live pose skeleton on top of it, using on-device MoveNet (tfjs) pose detection — no video frame ever leaves the browser.
This is scoped as the MVP discussed in #17: prove the pose-detection pipeline works end-to-end in the app, without rep-counting or form-correction logic yet. Happy to build on this (angle-based rep counting, per-exercise cues, etc.) as a follow-up once the approach itself looks right.
Closes #17 (as an MVP — see note above).
What's included
frontend/src/components/FormTracker.jsx— camera + canvas skeleton overlay@tensorflow/tfjs+@tensorflow-models/pose-detection(MoveNet Lightning — small, fast, good enough for a single lifter in frame)React.lazy/Suspenseso the model/runtime (~1MB+) only loads when the sheet is opened, not on every app boot — kept the main bundle size where it was@mediapipe/posealiased to a tiny local stub invite.config.js:pose-detectionstatically imports it for the BlazePose "mediapipe" runtime, which this MVP doesn't use, and the real package isn't ESM/bundler-friendly (breaks the Vite build otherwise)cameraicon in the existing hand-drawn icon setKnown limitations (by design, for an MVP)
Test plan
npm run buildsucceedsnpm test— all 192 existing tests pass unchanged