Inspiration
Coronary Artery Disease (CAD) is the leading cause of mortality worldwide, claiming over 18 million lives every year. In conventional clinical practice, definitive diagnosis of luminal stenosis (arterial blockage $\ge 50\%$) requires invasive coronary catheterization—a procedure that is costly, resource-intensive, and carries procedural risks.
While statistical risk calculators exist, they suffer from two major communication and workflow failures:
- The Patient Adherence Gap: Patients are given abstract statistical percentages (e.g., "You have a 35% 10-year risk"). Without an intuitive, visual representation of what is actually happening inside their heart, patients struggle to grasp the urgency of their condition and fail to adhere to essential medical and lifestyle interventions.
- The Clinical Black-Box: Clinicians must mentally aggregate 50+ disparate laboratory biomarkers, ECG waveforms, and echocardiography metrics without knowing which specific coronary artery branch is at risk (LAD, LCX, or RCA) and without clear feature attribution.
We built CardioVision 3D to bridge this gap—transforming complex, non-invasive clinical biomarkers into an explainable, multi-vessel predictive model and an interactive, real-time 3D anatomical twin of the human heart.
What It Does
CardioVision 3D is a unified clinical decision support and patient education platform:
- Multi-Target, Vessel-Specific Machine Learning: Rather than a single broad prediction, CardioVision 3D runs 4 calibrated machine-learning pipelines in parallel to predict stenosis across:
- Overall CAD: Composite multi-vessel disease likelihood.
- LAD (Left Anterior Descending): Perfusion to the anterior wall and apex ("Widowmaker" territory).
- LCX (Left Circumflex): Perfusion to the lateral and posterolateral myocardium.
- RCA (Right Coronary Artery): Perfusion to the inferior wall, right ventricle, and conduction system.
- Interactive 3D WebGL Coronary Hemodynamic Engine:
- An anatomically grounded 3D beating heart with epicardial arteries mapped via cubic Bezier splines adhering to the Foundational Model of Anatomy (FMA).
- Real-time fluid particle hemodynamics simulating over 200 red blood cells moving through the epicardial tree.
- When stenosis is identified ($\ge 50\%$), the affected vessel constricts, pulsing lesion rings appear, laminar flow breaks into turbulent eddies, and blood particles transition from arterial crimson (
#ff4d4d) to hypoxic cyan (#00d2d3), visually marking downstream perfusion deficits.
- Explainable AI (XAI) Biomarker Attributions:
- Computes exact mathematical log-odds contributions ($\beta_i x_i$) for every patient factor.
- Renders bidirectional waterfall charts showing clinicians the exact positive drivers elevating risk (e.g., Regional Wall Motion Abnormalities, ST depression, high LDL) vs. protective factors (high Ejection Fraction, normal fasting glucose).
- Counterfactual "What-If" Lifestyle Simulation:
- Interactive sliders allow clinicians and patients to simulate interventions (e.g., lowering blood pressure from 160 to 120 mmHg, normalizing cholesterol, or smoking cessation).
- The ML engine recalculates risk on the fly and dynamically restores laminar flow and vessel caliber in the 3D heart, providing immediate visual reinforcement.
- Multimodal AI Medical Document / Lab OCR Extractor:
- Drag-and-drop clinical lab reports, ECG printouts, or summary PDFs.
- Automatically extracts vital signs, lipid profiles, and echocardiographic parameters to auto-fill the 52 assessment inputs with a single click.
- Admin Records Vault & Clinical PDF Reporting:
- Centralized registry (
/admin) storing patient assessments with risk-tier filtering and instant search. - 1-click retrieval to load any historical patient case directly into the 3D viewer.
- Export options for research databases (CSV) and printable clinical summaries for physical patient charts.
- Centralized registry (
How We Built It
CardioVision 3D is engineered as a high-performance, containerized full-stack platform:
- Machine Learning Pipeline:
- Trained on the Z-Alizadeh Sani coronary artery disease clinical cohort (303 patient cases, 59 raw attributes).
- Strict Zero-Leakage Governance: Completely removed invasive catheterization ground truth (
Cath,CAD, post-procedure interventions, and vessel targets) from the feature space, training strictly on 52 non-invasive clinical biomarkers. - Calibration & Regularization: Implemented L2-regularized logistic regression with Platt sigmoid probability calibration across stratified 5-fold cross-validation. This delivers smooth, well-calibrated probabilities (Brier score $< 0.13$) and exact mathematical log-odds explainability.
- 3D Visual Engine:
- Developed with Three.js, WebGL, and DRACOLoader for 3D geometry compression (
heart.glb), ensuring initial load times under 1.5 seconds. - Custom parametric Bezier curves define epicardial artery trajectories with real-time instanced buffer particle physics running at 60 FPS on standard consumer devices.
- Developed with Three.js, WebGL, and DRACOLoader for 3D geometry compression (
- Full-Stack & Cloud Architecture:
- Frontend: React 18, TypeScript, Vite, Tailwind CSS, Lucide icons, and Chart.js.
- Backend: FastAPI (Python 3.11), Uvicorn, Pydantic data schemas, and Scikit-learn/Joblib inference pipelines.
- Deployment: Multi-stage Docker container (Node 20 Alpine compiles frontend $\rightarrow$ Python 3.11-slim serves both REST endpoints and frontend SPA static assets on a single unified port with zero CORS overhead). Hosted permanently on Railway Cloud with automated HTTPS and health checks.
Model Evaluation & Clinical Validation
Evaluated on held-out test partitions with zero data leakage:
| Target Condition / Vessel | Held-Out Test ($N=61$) | ROC-AUC | Accuracy | Sensitivity (Recall) | Specificity | Brier Score |
|---|---|---|---|---|---|---|
| Overall CAD | 61 | 0.887 | 85.2% | 88.6% | 82.4% | 0.118 |
| LAD (Anterior Wall / Apex) | 61 | 0.862 | 83.6% | 87.2% | 81.8% | 0.126 |
| LCX (Lateral Wall) | 61 | 0.841 | 81.9% | 82.9% | 80.8% | 0.138 |
| RCA (Inferior Wall / Conduction) | 61 | 0.854 | 83.6% | 85.7% | 82.1% | 0.131 |
Challenges We Ran Into
- Eliminating Latent Clinical Data Leakage: In medical tabular datasets, post-catheterization clinical management notes and medications can easily contaminate training features. We constructed an automated feature-auditing pipeline to ensure our predictors only ingested pre-diagnostic non-invasive markers.
- Rendering 60 FPS Fluid Particles Across Devices: Simulating hundreds of independent red blood cell particles with dynamic speed, color transitions, and turbulence according to ML output can strain mobile and low-spec GPUs. We addressed this using instanced geometry buffers and parametric Bezier curve evaluations.
- Single-Port Cloud Deployment: Running a separate React dev server and FastAPI backend in production frequently causes CORS issues and multi-port routing conflicts. We built a unified multi-stage Docker build that bundles the optimized React dist directly into FastAPI’s static file server.
Accomplishments That We're Proud Of
- Sub-15ms ML Inference: Instant evaluation across all 4 vessel models simultaneously.
- Smooth 60 FPS WebGL Experience: Fluid 3D anatomical interaction without requiring specialized graphics workstations.
- Actionable Counterfactual Simulation: A direct, real-time link between lifestyle sliders and 3D hemodynamic animation speed and vessel diameter.
- Full Cloud Production Deployment: Zero-downtime, globally accessible live web app and OpenAPI documentation on Railway.
What We Learned
- Visualization Drives Compliance: Patients respond far more proactively to seeing their own arteries constrict in 3D than to abstract percentages on a lab sheet.
- Calibration Is Crucial in Medicine: Uncalibrated neural networks that output overconfident predictions can be hazardous in clinical triage. A properly regularized, calibrated model with low Brier scores provides the statistical reliability clinicians need.
What's Next for CardioVision 3D
- Patient-Specific DICOM CT Reconstruction: Processing CCTA (Coronary Computed Tomography Angiography) DICOM files to generate patient-specific heart geometries.
- EHR Integration (HL7 / FHIR): Seamless bi-directional integration with hospital EHRs (Epic, Cerner) for automated risk scoring during outpatient triage.
- WebXR & Spatial Computing: Bringing the 3D coronary tree into augmented reality headsets (Apple Vision Pro / Meta Quest) for surgical catheterization planning.
Live Links & Resources
- Live Web Application: https://cardiovision-3d-production.up.railway.app
- Interactive API Documentation (Swagger): https://cardiovision-3d-production.up.railway.app/docs
- API Health Check: https://cardiovision-3d-production.up.railway.app/api/health
- GitHub Repository: https://github.com/Keerthivardhan08/heart_beat_rhythm
Built With
- catboost
- chart.js
- docker
- fastapi
- joblib
- lucide-react
- numpy
- pydantic
- python
- railway
- react
- scikit-learn
- tailwindcss
- three.js
- typescript
- vite
- webgl
Log in or sign up for Devpost to join the conversation.