Inspiration

Physical therapy is 10% at the clinic and 90% at home. However, completing rehab exercises alone is frustrating and risky. Patients constantly wonder: "Am I doing this right?" Without supervision, they often perform movements with incorrect posture, risking re-injury or giving up entirely. Meanwhile, therapists have zero visibility into their patients' home compliance. I wanted to build a solution that brings a virtual therapist directly into the patient's home, making recovery safer, measurable, and highly accessible.

What it does

Physio Mirror is an AI-powered rehabilitation coach that runs entirely in a standard web browser. Using just a webcam, it tracks the patient's 3D skeleton in real-time. It accurately counts repetitions, measures joint angles, and enforces a hold-timer for working phases. If a patient uses poor form (e.g., leaning their torso too much), the UI immediately provides visual and audio feedback to correct it. It also features a Caregiver Report dashboard that auto-generates printable weekly compliance and movement quality data for therapists.

How we built it

I built Physio Mirror using HTML, CSS, and Vanilla JavaScript. For the AI component, I integrated Google's MediaPipe Pose Landmarker via WebAssembly. A massive priority for this project was Patient Privacy. By implementing the AI strictly on the client-side (Edge AI), zero video data is ever uploaded to a server. All logic and data storage (via localStorage) happen securely on the user's device. To ensure accessibility for users with limited mobility, I also integrated the Web Speech API, allowing patients to control the app completely hands-free via Voice Commands and gesture-based pain logging.

AI Disclosure

  • Core Feature AI: I utilized Google's MediaPipe Pose (Vision Tasks API) to handle the real-time 3D skeletal tracking and coordinate mapping in the browser.

  • Development Assistant: I used Google Gemini as a pair-programming assistant to help optimize my JavaScript state-machine logic, debug CSS styling issues for the glassmorphism UI, and refine the structure of my presentation script.

Challenges I ran into

One of the biggest challenges was creating custom geometry math to accurately calculate joint angles (like knee and elbow extension) from raw 3D coordinates. Another challenge was smoothing the real-time data so the UI progress bar wouldn't jitter, which I solved by implementing a custom mathematical smoothing function over the data stream.

What I learned

I learned how to integrate edge-based Machine Learning models (MediaPipe) directly into a frontend web environment without relying on backend Python servers. I also deepened my understanding of accessible UI/UX design (glassmorphism) and the Web Speech API.

What's next for Physio Mirror

I plan to introduce an opt-in cloud synchronization feature (B2B SaaS model) so clinics can securely receive the "Caregiver Reports" directly to their dashboards. I also want to expand the exercise library with more advanced physical therapy routines.

Built With

Share this project:

Updates

Submission history