An end-to-end healthcare machine learning platform designed for early, non-invasive risk stratification of Cardiovascular Disease (CVD). By synthesizing clinical biometric indicators with retinal microvasculature analysis, this system delivers predictive risk assessment to aid clinicians in early screening and decision support.
- Project Overview
- Key Features
- System Architecture & Technical Workflow
- Dataset & Feature Schema
- Model Pipeline & Evaluation
- Directory Structure
- Installation & Setup Guide
- Usage & Execution
- Live Demo
- Future Roadmap
- Contributions & Credits
- Conclusion
- Contact Information
Cardiovascular diseases (CVDs) remain the leading cause of mortality worldwide. Conventional diagnostic screening relies heavily on invasive blood tests and complex clinical evaluations.
This project establishes a non-invasive risk assessment platform that analyzes patient lifestyle metrics, metabolic biomarkers, and retinal vessel morphology. Retinal microvasculature serves as a direct, non-invasive window into systemic vascular health, enabling early identification of subclinical cardiovascular changes before severe symptoms manifest.
- Phase 1 (Baseline Engine): Ingestion of clinical biometrics, comprehensive exploratory data analysis (EDA), feature engineering, and benchmarking tree-based classifiers (XGBoost, Random Forest) alongside Scikit-Learn pipelines.
- Phase 2 (Computer Vision & Web Integration): Integration of deep learning segmentation models for retinal fundus images and web-based interface deployment.
- 🩺 Multi-Modal Risk Stratification: Computes cardiovascular risk probability by combining systemic physiological metrics and optical vascular indicators.
- 📊 Feature Correlation Engine: Uncovers statistical dependencies across systolic/diastolic blood pressure, glucose levels, cholesterol profiles, and target outcomes.
- ⚡ Benchmarked Classification: Utilizes tuned XGBoost and Ensemble Machine Learning pipelines for high sensitivity and specificity in risk prediction.
- 🚀 Modular Architecture: Clean separation of data processing, model training, evaluation metrics, and API routes to ensure maintainability.
- 🌐 Web Deployment: Integrated web front-end hosted on Vercel for real-time patient assessment.
[ Patient Data / Biometrics ] ──┐
├──> [ Preprocessing & Scaling ] ──> [ XGBoost / ML Engine ] ──┐
[ Retinal Image Fundus Data ] ──┘ ├──> [ Risk Stratification Output ]
[ Web Dashboard UI ] ─────────┘
- Data Ingestion & Cleaning: Ingests structured clinical biometrics and raw fundus images. Handles missing values, performs outlier removal, and normalizes numeric distributions.
- Exploratory Data Analysis (EDA): Generates correlation heatmaps, feature density distributions, and statistical tests to validate feature relevance.
- Feature Engineering & Transformation: Implements standard scaling, categorical encoding, and feature interaction terms (e.g., Pulse Pressure = Systolic - Diastolic).
- Model Training & Hyperparameter Tuning: Trains multiple candidate classifiers (XGBoost, Scikit-Learn algorithms) using cross-validation and grid search.
- Inference & UI Rendering: Serves predicted risk scores, confidence intervals, and risk categories via a Flask/Python web application deployed on Vercel.
The tabular diagnostic pipeline processes structured patient vectors across four core metadata categories:
| Category | Feature Name | Description | Type / Unit |
|---|---|---|---|
| Demographics | age |
Patient Age | Numerical (Years) |
| Demographics | gender |
Biological Sex | Categorical (Male/Female) |
| Clinical Biomarkers | ap_hi |
Systolic Blood Pressure | Numerical ( |
| Clinical Biomarkers | ap_lo |
Diastolic Blood Pressure | Numerical ( |
| Clinical Biomarkers | cholesterol |
Serum Cholesterol Level | Ordinal (1: Normal, 2: Above Normal, 3: High) |
| Clinical Biomarkers | gluc |
Fasting Glucose Level | Ordinal (1: Normal, 2: Above Normal, 3: High) |
| Lifestyle Markers | smoke |
Tobacco Consumption Status | Binary (0: No, 1: Yes) |
| Lifestyle Markers | alco |
Alcohol Consumption Status | Binary (0: No, 1: Yes) |
| Lifestyle Markers | active |
Physical Activity Index | Binary (0: Inactive, 1: Active) |
| Target Vector | cardio |
Cardiovascular Disease Presence | Binary (0: Absent, 1: Present) |
- Language: Python 3.8+
- Data Processing & Analytics: NumPy, Pandas
- Visualization: Matplotlib, Seaborn
- Machine Learning & Modeling: Scikit-Learn, XGBoost
- Environment & Versioning: Jupyter Notebooks, Git, GitHub Actions
- Web Serving & Hosting: Flask, Vercel
CVD-Major-prj/
│
├── .github/
│ └── workflows/ # CI/CD automated build pipelines
├── datasets/ # Raw, interim, and preprocessed datasets
├── notebooks/ # Jupyter notebooks for statistical EDA & experimental training
├── src/ # Modular source code
│ ├── preprocessing.py # Data cleaning and scaling functions
│ ├── train.py # Model training pipelines
│ └── evaluate.py # Metrics calculations and ROC-AUC generation
├── Code_model/ # Trained serialization artifacts (.pkl / .json)
├── app.py # Main web application entry point
├── requirements.txt # Environment package dependencies
└── README.md # System documentation
- Python 3.8 or higher installed on your system.
- Git installed for version control.
git clone https://github.com/StudentCoderr/CVD-Major-prj.git
cd CVD-Major-prj
- Linux / macOS:
python3 -m venv venv
source venv/bin/activate
- Windows (Command Prompt):
python -m venv venv
venv\Scripts\activate
- Windows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r requirements.txt
Launch Jupyter Notebook to view data analysis experiments and baseline evaluations:
jupyter notebook notebooks/
Start the Flask application server:
python app.py
Open your browser and navigate to [http://127.0.0.1:5000/](http://127.0.0.1:5000/).
Access the active deployment here: 👉 Cardiovascular Risk Assessment Platform - Live Demo
- Retinal Fundus Image Deep Learning Integration: Implement PyTorch/TensorFlow Convolutional Neural Networks (CNN) for automated optic disc and microvessel segmentations.
- Explainable AI (XAI): Incorporate SHAP (SHapley Additive exPlanations) and LIME to provide interpretable feature impact maps for clinicians.
- Automated PDF Diagnostic Reports: Generate downloadable patient risk summaries with biometric breakdowns.
- EHR/FHIR Integration: Support standardized electronic health record data imports.
This project was developed within a collaborative structure.
- Principal Developer: Poornashree J P (@StudentCoderr) — Responsible for over 80% of total system design, data engineering pipelines, feature engineering, ML algorithm training, and frontend web integration.
- Hybrid Workflow: Built utilizing domain knowledge in machine learning coupled with AI-assisted software engineering practices for accelerated code prototyping and testing.
Phase 1 of the Cardiovascular Disease Prediction System establishes a benchmark for non-invasive clinical risk assessment using tabular patient biometrics. By identifying key correlations between blood pressure metrics, lipid profiles, lifestyle attributes, and disease incidence, the platform lays the technical baseline required for integrating computer vision capabilities and retinal eye image analysis in upcoming releases.
For inquiries, research collaborations, or feedback, feel free to connect:
- Developer: Poornashree J P
- GitHub: @StudentCoderr
- Repository: CVD-Major-prj
- Live Deployment: cvd-major-prj.vercel.app
- Email: ammupoorna14@gmail.com