NeuroRecovery is a cloud-based, AI-driven platform designed to provide personalized cognitive rehabilitation to patients recovering from neurological disorders. The platform leverages EEG data for real-time adaptive difficulty, predictive analytics for progress tracking, and a conversational chatbot interface for patient engagement. Built on Vultr’s scalable infrastructure, NeuroRecovery allows patients to access cognitive rehabilitation from home while caregivers receive insightful, real-time updates.
Link to the deployed website: NeuroRecovery
- Project Overview
- Approach
- Architecture
- Key Features
- Technical Documentation
- API Documentation
- Setup
- Expected Outcomes
- Acknowledgement
- Team Members
NeuroRecovery aims to make cognitive rehabilitation accessible remotely, enabling patients to perform exercises from home while caregivers and therapists can monitor their progress and adjust treatment plans in real-time. The platform uses Vultr’s scalable infrastructure, a machine learning-driven task generator, and adaptive EEG-based tracking to personalize each patient’s rehabilitation journey.
- Personalized Cognitive Exercises: AI-powered task generation tailored to the patient’s recovery requirements.
- Real-Time Adaptive Tracking: Integration with EEG data to adjust the difficulty level of tasks based on the patient’s cognitive load.
- Remote Caregiver Insights: Predictive analytics and progress tracking for real-time monitoring of the patient’s progress by caregivers and therapists.
- Interactive Chatbot Interface: A Laravel-based conversational interface for seamless patient interaction, addressing queries related to cognitive analysis, exercises, and platform features.
- Scalable Infrastructure: Deployed on Vultr Engine with monitoring for resource efficiency and resilience.
The platform is divided into five main layers:
- Frontend: Caregiver dashboard and chatbot UI.
- Backend API: Manages task requests, EEG data processing, and backend functionalities.
- Machine Learning Models: Task generation model (LLaMA 2) and adaptive tracking model (Reformer).
- Storage & Database: Vultr Block and Object Storage for patient records, logs, and datasets.
- Cloud Infrastructure & Monitoring: Uses Vultr Kubernetes and Prometheus for real-time monitoring and scalability.
The NeuroRecovery platform is deployed and interconnected on Vultr’s cloud infrastructure:
- Kubernetes Cluster: Hosts API, machine learning models, and dashboards.
- Storage: Vultr Block Storage for logs and Object Storage for datasets.
- Compute Instances: Manages data processing and API requests for real-time interaction.
- Monitoring: Prometheus monitors resources across nodes, ensuring scalability and reliability.
- Personalized Exercise Generator:
- Model: LLaMA 2
- Functionality: Generates cognitive tasks tailored to patient profiles, aligning with cognitive exercise requirements from CogAtlas. Due to the lack of GPU access, we were unable to fine-tune the model and had to rely solely on prompt engineering to generate cognitive tasks tailored to patient profiles. These tasks were designed using Vultr’s serverless inference model of LLaMA 2.
- Caregiver Dashboard with Forecasting Capabilities:
- Functionality: Provides real-time insights and predictive analytics for caregivers, enabling them to track and adjust therapy plans.
- Real-Time Adaptive Cognitive Tracking:
- Model: Reformer architecture, integrated with Emotiv EEG data.
- Functionality: Analyzes cognitive response to dynamically adjust task difficulty based on real-time EEG metrics.
- Laravel-based Chatbot UI for User Interaction:
- Functionality: Allows conversational interactions, guided task recommendations, and caregiver queries, enhancing patient accessibility and usability.
5. Scalable Cloud Deployment and Monitoring:
- Infrastructure: Vultr Kubernetes Engine (VKE) for real-time performance monitoring and resource scaling.
NeuroRecovery’s architecture integrates multiple technologies:
- Frontend: Built on Laravel with Serverless Inference for real-time conversational AI.
- Backend API: Python-based, manages request processing and machine learning workflows.
- Task Generation Module:
- Model: LLaMA 2 (integrated via Vultr Serverless Inference API)
- Functionality: Generates cognitive tasks based on patient data.
- EEG Data Processing Module:
- Model: Reformer architecture with Emotiv EEG data integration.
- Functionality: Adjusts task difficulty in real-time based on EEG input.
- Monitoring Module:
- Infrastructure: Vultr
- Functionality: Monitors CPU, memory usage, and app performance in real-time.
-
/generate-exercise
- Description: Requests a new cognitive exercise for a patient.
- Parameters:
cognitive_level
,task_type
- Response: JSON containing task details and adaptive metrics.
-
/submit-eeg-data
- Description: Submits real-time EEG data for task difficulty adjustment.
- Parameters:
eeg_signal_data
,session_id
- Response: Confirmation of data processing and difficulty adjustment.
-
/get-progress
- Description: Fetches cognitive progress and forecast for a patient.
- Parameters:
patient_id
- Response: JSON with progress metrics and predicted trend.
-
/get-scores
- Description: Fetches eeg data and corresponding score.
- Parameters:
patient_id
- Response:Stress score corresponding to the patient id.
-
Navigate to the backend directory:
cd backend
-
Install the required dependencies:
npm install
-
Set up the .env file:
Copy the contents of the env-example file into a new .env file. make the new env file in the config folder and name it config.env Modify the values in config.env as needed to match your environment.
-
Start the backend server:
node server.js
- Navigate to the frontend directory:
cd frontend
- Install the required dependencies:
npm install
- Run the frontend development server:
npm run dev
- Remote Cognitive Rehabilitation: Patients can perform cognitive exercises from home, tailored to their unique needs.
- Real-Time Adaptive Therapy: Adjusts task difficulty in real-time based on EEG data to ensure optimal cognitive load and engagement.
- Caregiver Insights: Provides real-time progress and predictive insights to caregivers and therapists.
- Scalable and Resilient: Leverages Vultr’s infrastructure for high availability, security, and scalability.
- User-Friendly Conversational Interface: Enhances patient engagement through a Laravel-based chatbot with Serverless Inference.
This project was developed as part of the Vultr Cloud Innovate Hackathon. We extend our gratitude to Vultr for providing the platform and resources that made this project possible.
- Soham Mulye
- Anuj Vaid
- Om Doiphode
- Dhruvanshu Joshi
NeuroRecovery leverages AI-driven cognitive exercises, real-time EEG tracking, and scalable cloud infrastructure to provide personalized cognitive rehabilitation. With adaptive therapy, predictive insights for caregivers, and a user-friendly chatbot interface, NeuroRecovery aims to bring effective cognitive therapy into the home, supporting patients, caregivers, and healthcare providers in improving patient outcomes.