CoolFace
Apppublic

AMoeed002/AI_Posture_Detection

sourceHugging Faceupdated 7d agoView on Hugging Face
0likes
App README

PostureCoach → PosturePal upgrade

Real-time posture, meeting-readiness, and (optional) expression assistant — all running client-side in the browser. This is an upgrade of the existing PostureCoach Space: the original posture engine, AI coach, alerts, and log are untouched; five new sections were added around them.

Sections

  • 📊 Dashboard — history of past sessions and meeting checklists, read from this browser's local storage. No server, no account.
  • 🧘 Posture Coach — unchanged: MediaPipe Pose landmarks → shoulder / neck / torso angles → Good / Slouching / Too-Close-to-Screen, skeleton overlay, alerts, sparkline, and the Hugging Face-router AI coach. A Focus & break timer (25 / 45 / custom minutes, stretch reminders) now lives at the bottom of this page.
  • 🤝 Meeting Mode — a second, independent camera session using MediaPipe Face Detection to check face visibility, framing, and a glare heuristic near the eyes, plus lighting measured from raw pixel brightness. Everything else (clothing, hair, glasses, background) is a plain checkbox list — completion is shown as checked ÷ total, never an AI-generated score.
  • 🙂 Expression Assistant — a third, separate model (face-api.js, tiny face detector + expression net) classifies smiling / neutral / surprised / sad-looking / angry-looking / etc. A permanent disclaimer explains that expressions are muscle movements, not a reliable window into how someone actually feels, and the tool makes no mental-health or personality claims.
  • ⚙️ Settings — privacy summary, an opt-in "remember my HF token" toggle, and a one-click "clear all local data" button.

What needed a new model, and why

FeatureModel usedNotes
Posture angles, skeletonMediaPipe Pose (already in the app)unchanged
AI coaching textHugging Face router chat models (already in the app)unchanged
Meeting face/framing/glareMediaPipe Face Detection (new)loaded the same way Pose already is, from cdn.jsdelivr.net — no extra setup
Facial expressionsface-api.js (new)loads its model weights from a CDN mirror on first use (a few MB, cached by the browser after that)
Lighting checknone — raw pixel brightness mathno model needed
Checklist %, focus timer, dashboardnone — plain JavaScript + localStorageno model needed

The Expression Assistant is the one place a genuinely new, separate model was required — MediaPipe Pose has no concept of facial expression, so the upgrade does not pretend otherwise; it loads a dedicated classifier instead of reusing the posture model.

Deploying the update

  1. 1.Open your existing Space's Files tab (or git clone the Space repo).
  2. 2.Replace index.html with the one here, and replace README.md with this one (or just update the parts you changed).
  3. 3.Commit / push (or drag-and-drop upload). Static Spaces rebuild instantly.
  4. 4.Open the Space. The Posture Coach tab behaves exactly as before. Try Meeting Mode and Expression Assistant — the first time you click Start on Expression Assistant, allow a few seconds for the model weights to download.

No new secrets or environment variables are required — face-api.js and MediaPipe Face Detection both load their models straight from CDNs at runtime, the same pattern the existing Pose integration already uses.

Privacy, unchanged in spirit

  • No webcam video or image is ever recorded, saved, or uploaded, in any section.
  • Local storage holds only numbers and timestamps: posture percentages, session durations, checklist completions, and settings.
  • The Hugging Face token (for AI coaching) is sent directly from your browser to Hugging Face's API and is not persisted unless you turn on "Remember my token" in Settings.