Inspired by long desk hours where posture quietly degrades and hydration is easy to forget, we built a playful, privacy-first desk companion that nudges both behaviors; along the way we learned that on-device computer vision (MediaPipe Pose + a tiny YOLO) is practical, that smoothing beats raw angles for usability, and that small gamification (badges, streaks, a mini-game) meaningfully boosts adherence. We implemented a webcam→OpenCV→MediaPipe/YOLO pipeline feeding FastAPI + WebSockets into a Chart.js UI, and scored posture with an exponential moving average (S_t=\alpha x_t+(1-\alpha)S_{t-1}) where (x_t=100-100!\big(w_{sl},\hat{s}+w_{tilt},\hat{t}+w_{near},\hat{n}\big)), using (\hat{s},\hat{t},\hat{n}) as normalized slouch, tilt, and near-screen penalties. Challenges included CPU performance (solved via small models, lower ( \text{imgsz} ), and frame-thinning), noisy landmarks (handled with clamping and EMA), environment bloat in Git (fixed with a strict .gitignore), and resilient UX when the LLM key/model is missing (clear fallbacks and messages).

Built With

Share this project:

Updates