Skip to content
 
 

Latest commit

 

History

169 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PosturePro logo

PosturePro

Real-time posture detection via computer vision — no backend, no login, just open and sit straight.

Live Demo Python OpenCV MediaPipe JavaScript GitHub Pages License


What is PosturePro?

PosturePro uses Google's MediaPipe Pose model to track key body landmarks — shoulders, ear, and hip — then computes neck and torso inclination angles in real time. If either angle exceeds the good-posture threshold for more than three minutes, an on-screen warning fires. The tool ships as both a browser app (zero installation, hosted on GitHub Pages) and a Python desktop app for offline use — covering both quick demos and long work sessions with no server costs or sign-up friction.

Live demo → tanisheesh.github.io/PosturePro


What you get

  • Real-time landmark tracking — MediaPipe Pose detects shoulders, ear, and hip at up to 30 fps directly in the browser or via webcam feed in Python.
  • Angle-based posture scoring — Neck inclination and torso inclination are computed geometrically; good posture requires neck < 40° and torso < 10°.
  • Shoulder alignment check — Euclidean distance between shoulders flags whether the user is facing the camera squarely.
  • 3-minute bad-posture warning — A persistent counter tracks consecutive bad-posture frames and fires a dismissible alert after 180 seconds.

Stack

Layer Tech
Web frontend Vanilla JS · HTML5 · CSS3
Pose estimation MediaPipe Pose 0.5 (model complexity 1)
Desktop app Python 3.8+ · OpenCV · MediaPipe · NumPy
Hosting GitHub Pages (static, from docs/)

Engineering Decisions

Why MediaPipe over a custom-trained model? MediaPipe Pose is a production-grade, Google-maintained model that runs entirely in the browser via WASM — no GPU server needed. Training a custom model would add weeks of work with no accuracy benefit for this well-defined landmark detection task.

Why rule-based thresholds over ML classification? Posture quality (good/bad) is a deterministic geometric property: if the neck angle is under 40° and the torso angle is under 10°, posture is good. A rules-based approach is fully explainable, requires no training data, and is trivially auditable — every verdict traces back to a raw angle value.

Why two delivery modes (web + Python)? The web app removes all installation friction and works across platforms for demos and casual use. The Python app targets users who need offline access or lower-latency processing through direct webcam capture with OpenCV — no browser overhead.

What would you do differently in v2? Add OS-level desktop notifications so warnings reach users who minimise the window, and store per-session posture history locally (localStorage or SQLite) so users can track trends over time.


Docs

Document Description
PRD Product requirements — goals, user stories, non-goals
Architecture System design, data flow, component breakdown
Decisions Every major technical decision and why
Setup Local dev setup and deployment

Author

Tanish Poddartanisheesh.in · LinkedIn · GitHub

About

Real-time posture monitor using MediaPipe Pose that detects neck and torso angles from a webcam and alerts after 3 minutes of poor posture — available as a browser app and a Python desktop app.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages