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.
Download the MIMIC-IV-ECG dataset and the MIMIC-IV dataset (with credentialed access).
app/: Main application package containing web interface and core functionalitydata_engineering/: Data processing and preparation pipelinesdata_science/: Machine learning and deep learning model developmentECG_deep_learning/: ECG signal processing and deep learning modelsVS_machine_learning/: Vital signs machine learning models
model_inferencing/: Model deployment and inference codeweb_app/: Web application frontendstroke_agent/: AI agent for stroke risk assessmentuploads/: Temporary storage for uploaded files
- Install dependencies:
pip install -r requirements.txt- 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=""- Run the application:
python server.pyThe application can be run using Docker:
docker-compose up- 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
- Python 3.9+
- Recommended: Linux or macOS
- Minimum 16GB RAM for training deep learning models
- Accuracy, Precision, Recall, F1-score
- ROC-AUC for binary stroke risk classification
- SHAP values and saliency maps for interpretability
- 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.
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.
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}
}- 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)
For issues or inquiries, please contact [loozfeng2704@gmail.com].









