Skip to content

Zfeng0207/StrokeHero

Repository files navigation

Stroke Hero: Interpretable Stroke Monitoring System

This project is a comprehensive system for stroke risk prediction, combining data engineering, machine learning, and web application components. The system processes medical data, particularly ECG signals, to predict stroke risk using advanced deep learning models.

🔍 Live Preview

🔵 Welcome Page

Welcome Page

🤖 Chatbot Assistant

Chatbot Assistant

👥 Meet the Team

Meet the Team

📤 Upload & Predict Stroke Risk

Upload & Predict

🧠 CVD Risk Calculator

CVD Risk Calculator

📊 CVD Risk Results

CVD Risk Results

🧮 ABCD² Stroke Score Calculator

ABCD Score

🧮 ABCD² Stroke Score Results

ABCD Score

🌍 Global Stroke Burden Explorer

Global Stroke Map

🧬 How Stroke Hero Works

How It Works

Download the MIMIC-IV-ECG dataset and the MIMIC-IV dataset (with credentialed access).


Project Structure

  • app/: Main application package containing web interface and core functionality
  • data_engineering/: Data processing and preparation pipelines
  • data_science/: Machine learning and deep learning model development
    • ECG_deep_learning/: ECG signal processing and deep learning models
    • VS_machine_learning/: Vital signs machine learning models
  • model_inferencing/: Model deployment and inference code
  • web_app/: Web application frontend
  • stroke_agent/: AI agent for stroke risk assessment
  • uploads/: Temporary storage for uploaded files

Setup and Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Environment Variables Setup

To run this project, you need to create a .env file in the root directory and define the following environment variables with your own credentials:

PINECONE_API_KEY=""
OPENROUTER_API_KEY=""
FLASKAPP_API_KEY=""
AUTH0_CLIENT_ID=""
AUTH0_CLIENT_SECRET=""
AUTH0_DOMAIN=""
APP_SECRET_KEY=""
OPENAI_AGENT_API_KEY=""
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT=""
LANGSMITH_API_KEY=""
LANGSMITH_PROJECT=""
  1. Run the application:
python server.py

Docker Support

The application can be run using Docker:

docker-compose up

Key Features

  • ECG signal processing and analysis
  • Deep learning-based stroke risk prediction
  • Web interface for data upload and results visualization
  • Real-time inference capabilities
  • Docker containerization for easy deployment

Environment

  • Python 3.9+
  • Recommended: Linux or macOS
  • Minimum 16GB RAM for training deep learning models

Evaluation Metrics

  • Accuracy, Precision, Recall, F1-score
  • ROC-AUC for binary stroke risk classification
  • SHAP values and saliency maps for interpretability

Model Pipeline Overview

  • ECG signals are preprocessed using filtering, segmentation, and normalization.
  • Deep learning models (e.g., LSTM or 1D CNN) are trained to classify patterns indicative of stroke risk.
  • A separate machine learning pipeline is used for vital signs and demographic features.
  • Final stroke risk prediction is computed via ensemble or decision logic based on both pipelines.

Data Access & Ethics

This project uses data from the MIMIC-IV and MIMIC-IV-ECG databases, which require credentialed access via PhysioNet. Please ensure that your use complies with all relevant privacy, ethical, and licensing requirements.


Citation

If you use this project or dataset in your research, please cite:

@article{strodthoff2024prospects,
  title={Prospects for artificial intelligence-enhanced electrocardiogram as a unified screening tool for cardiac and non-cardiac conditions: an explorative study in emergency care},
  author={Strodthoff, Nils and Lopez Alcaraz, Juan Miguel and Haverkamp, Wilhelm},
  journal={European Heart Journal-Digital Health},
  pages={ztae039},
  year={2024},
  publisher={Oxford University Press UK}
}

Contributors

  • Loo Zfeng (MLOps Engineer, LLM Engineer)
  • Ryuji Takamura (Data Scientist, AI Engineer)
  • Darin Park (Data Scientist, AI Engineer)
  • Darren Chen (Project Manager, Front-end Developer)
  • Edward Priyatna (Full Stack Developer, Solution Architect)

Contact

For issues or inquiries, please contact [loozfeng2704@gmail.com].

About

StrokeHero is a comprehensive system for stroke risk prediction, combining data engineering, machine learning, and web application components. The system processes medical data, particularly ECG signals, to predict stroke risk using advanced deep learning models.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors