← Back to Portfolio

Mixed Reality Stroke Rehabilitation

UC Berkeley | UCSF | Stanford
March 2025 - Present

Project Overview

The Berkeley mixed reality stroke rehabilitation project is under Professor Sanjit A. Seshia's research group and partners with UCSF and Stanford hospitals. The goal of the project is to empower therapists and patients to conduct therapy sessions remotely using MR headsets like the Meta Quest 3 and create tailored exercise programs that report patient progress to therapists. This fulfills a vital need as patient waitlists for in-person therapy can last for months and many patients face locational barriers getting to clinics. My role as a researcher in the project is to lead and project manage the frontend, backend, and Unity applications.

As project lead, I managed a team of 3-5 developers, including both student researchers and professional developers, coordinating tasks and timelines to ensure milestones were met. I designed and implemented systems across backend (Go, AWS), frontend (React, Typescript), and Unity (C#) codebases, integrating Agora video calling, Clerk authentication, AWS App runner & databases, and multi-provider AI (Gemini, OpenAI, Bedrock). I also prototyped the novel rehabilitation system using multimodal AI to generate and monitor personalized therapy exercises.

Key Features

  • Remote therapy sessions conducted via video call between therapists on the web portal and patients on MR headset, providing therapists with a first-person view, 3D environment visualization, and real-time 3rd person pose reconstruction.
  • Exercise programs created using natural language worksheets or recorded transcripts during therapy sessions, tailored to individual patient capabilities with automatic progress logging for therapist review.
  • Multimodal AI system that evaluates exercise performance by combining body pose checking (e.g., standing, raising arm), vision model queries for functional tasks (e.g., picking up cup), and utility functions (e.g., touching virtual circle) to determine step completion.
  • End-to-end HIPAA compliant system ensuring patient data privacy and security throughout therapy sessions.

Results & Future Work

Stanford Logo UCSF Logo

The project has completed initial workshop prototype studies, with full patient deployment studies scheduled for Spring 2026 at UCSF and Stanford thereafter.

3
Active Research Papers, abstract submitted to Nature Medicine, AAN
6+
Workshops Conducted, with real therapists and patients
"... I liked the structured exercises and having the audio and [captions] walk me through the exercises... The menu was easy to navigate."
— Patient Workshop Participant
"... I see the need for something like this, I don't have anyone to drive me to therapy that can take [an hour] to get to so I stopped going."
— Patient Workshop Participant

Collaborators

Sanjit A. Seshia - UC Berkeley Faculty, Principal Investigator
Edward Kim - UC Berkeley Post Doc, Project Facilitator.
Erik Nelson - Berkeley EECS Alumni, Head Backend Developer
Alton Sturgis - Berkeley EECS Alumni, Unity Developer
Junwei Lu - Berkeley EECS Student Researcher, Backend Developer
Andrew Lau - Berkeley EECS Student Researcher, Frontend Developer
Jaansi Parsa - Berkeley EECS, Researcher, Frontend Developer
Lucy W - Berkeley EECS Alumni, Researcher, Frontend Developer
Caesar Li - Berkeley EECS, Student Researcher, Unity Developer
Yash Prakash - Software Engineer, Researcher, Unity Developer

Alison Scheid - UCSF, Clinical Professor
Gina Gwiazda - UCSF, Clinical Research Coordinator
Cathra Halabi - UCSF, Director, Neurorecovery Clinic

Technical Deep Dive

Remote Therapy Call

The remote therapy call system leverages Agora's real-time video SDK to handle communication between therapist on the Webportal and patients using Quest 3 headset. We leveraged recently released Quest Passthrough Camera Support to access front facing camera, and third-party tooling to be able to overlay virtual objects in the video stream sent to Agora. The first person view from the headset provides a unique perspective for therapists, especially occupational therapists, to assess patient's movement while completing everyday tasks. However, since it's hard to fully understand the patient's movement from just a first person view, we also provide a 3D reconstruction WebGL companion app to show a simplified patient environment and body pose estimation. The app utilizes Meta's MRUK toolkit to get object position, scale, and class info which is then synced via Photon Multiplayer.

Therapist Webportal View
Patient Headset View.

The companion app also allows therapists to place virtual objects in the patient's environment when conducting exercises. One common use case is placing annotation shapes on tables, shelves, walls, or floors to signal to the patient where to reach, grab, place, or step. The relative positions of these virtual objects can be saved in exercise programs, tailored to the patient's physical ability and home environment.

Video showing how a therapist could place down virtual circle and patient seeing it in their environment.

Exercise Programs

Our system creates exercise programs with LLM assistance with natural language input from therapists. Therapists can either tweak a premade worksheet to fit a patient's needs or record exercises during therapy sessions. The input is then processed by LLMs (Claude, GPT-4, etc) to parse the natural language instructions and generate an exercise program in JSON format. Based on system prompts, the LLM chooses how each exercise step is checked for accuracy from function registry of poses (CheckIsStanding, CheckTouchingObject("Circle1"), etc) or can use image/video queries to vision models. The LLM can also call commands like setting glow hands on, spawn virtual objects, or play audio instructions during specific exercise steps.

Natural language worksheet text describes exercise where the stroke patient's weaker arm is to place a real cup on virtual circles. Therapist can change the instructions as needed, like only having 3 targets, or using a pencil.
The resulting exercise is generated and is being played.

Accessibility

Stroke patients often have varying levels of physical and cognitive impairments, making accessibility a top priority in our system design. We implemented multiple features to ensure ease of use for all patients. The user interface on the MR headset is designed with large, easily selectable buttons that are oriented to the non-affected side. Audio instructions are provided for each exercise step, along with visual cues like glow hands to indicate the correct hand to use. As typing in the headset can be challenging, we implemented a QR code login system where patients can scan a QR code displayed on the web portal using the headset camera to securely log in without needing to type. Stroke patients can have varying range of motion with their affected limbs, so a weekly reach calibration is done which clamps exercise object positions to within reach. This data can be visually seen in the web portal later by the therapist.

Login Token Encoded in QR Code
Patient performing weekly reach calibration in headset
Therapist viewing patient's reach data on web portal