Inspiration

Coronary Artery Disease (CAD) is the leading cause of death globally. In standard cardiology, an arterial narrowing of ≥ 50% constitutes significant stenosis requiring urgent clinical intervention.

While machine learning models can estimate cardiovascular risk from routine data, current solutions suffer from two major problems:

  1. Binary Reductionism: Typical CAD models only output a single yes/no risk probability, failing to tell doctors which vessel is blocked. Clinicians need vessel-specific localization: the LAD ("widow-maker" artery supplying ~50% of the left ventricle), the LCX (lateral/posterior wall), and the RCA (inferior wall and rhythm conduction) carry completely different surgical urgencies.
  2. The 3D Disconnect: Doctors think in 3D anatomy, yet existing AI tools only present abstract tables and static bar charts.

We built CardioVision 3D (Cardio Viz IQ) to bridge routine patient data directly to an interactive 3D anatomical heart twin, providing instant, vessel-level surgical triage.


What it does

CardioVision 3D takes routine clinical measurements (vitals, blood panels, ECG, and echocardiography) and translates them into an interactive 3D coronary risk twin:

  • Vessel-Level Localization: Concurrently predicts 4 distinct targets:
    • Overall CAD Risk
    • LAD Stenosis (Left Anterior Descending)
    • LCX Stenosis (Left Circumflex)
    • RCA Stenosis (Right Coronary Artery)
  • Interactive 3D Anatomical Heart Twin (Three.js / WebGL): Runs at smooth 60 FPS on standard consumer laptops with zero dedicated GPU requirements. Features full 3D rotation, zoom, territory camera presets (Anterior, Lateral, Apical), and X-ray view modes.
  • Dynamic Perfusion Color-Coding: Real-time continuous risk coloring along coronary arterial branches:
    • 🟢 Normal Perfusion: < 35% Risk (Emerald)
    • 🟡 Borderline / Elevated: 35% – 49% Risk (Amber)
    • 🔴 Critical Stenosis Likely: ≥ 50% Risk (Crimson)
  • Animated Blood Flow Splines: Directional particle flow along 3D coronary paths visually conveys arterial blood velocity and potential blockages.
  • Synchronized TreeSHAP Explainability: In under 50ms, dynamically explains the top clinical biomarkers driving risk when selecting different vessels, showing exact values and real-world medical units (mg/dL, %, mmHg, bpm).
  • Interactive Model Insights: Live ROC and Precision-Recall curves with draggable threshold sliders that update 2x2 confusion matrices in real time.
  • Doctor EHR & Safety Governance: Doctor login, Patient Record Number (PRN) tracking, automated audit logs, critical stenosis alerts, and clear clinical decision support safety disclaimers.

How we built it

We implemented a unified, zero-leakage architecture across three tiers:

  1. Zero-Leakage Machine Learning Pipeline (Python & FastAPI):
    • Dataset: Trained on the peer-reviewed UCI Z-Alizadeh Sani dataset (303 patients, 55 clinical, ECG, echo, and lab features).
    • Leakage Firewall: Quarantined all ground-truth outcome columns (Cath, CAD, LAD, LCX, RCA) before preprocessing, certified by 31 automated unit tests.
    • Calibration: Applied probability calibration to ensure true clinical reliability (Brier score: 0.098).
  2. 3D WebGL Visualization Engine (React 19 + Three.js):
    • Integrated anatomically accurate 3D cardiac meshes with isolated coronary arterial branches.
    • Mapped machine learning predictions directly to anatomical 3D coordinates on the LAD, LCX, and RCA.
    • Simulated dynamic arterial blood flow via 3D spline curves.
  3. Clinical Frontend & Persistence:
    • React 19, TypeScript, and Tailwind CSS.
    • Supabase PostgreSQL backend for clinician login, patient queue tracking, and prediction history.
    • Containerized with a 1-command Docker build.

Challenges we ran into

  • Preventing Data Leakage in Medical Data: In cardiology datasets, post-catheterization findings can easily leak into feature sets and artificially inflate accuracy. We engineered a strict DataLeakageFirewall and wrote 31 unit tests to guarantee zero data leakage.
  • Probability Calibration: Standard ML models often output overconfident numbers. In healthcare, an 80% risk estimate must truly mean 80 out of 100 similar patients have verified disease. We calibrated all 4 models to achieve a low Brier score of 0.098.
  • 60 FPS WebGL on Everyday Laptops: Rendering detailed 3D anatomical meshes with dynamic lighting and particle flows on standard integrated graphics required geometry optimization and efficient rendering triggers.
  • Synchronizing 3D Views with Explainable AI: Seamlessly recalculating TreeSHAP attributions when a user clicks different 3D coronary branches required sub-50ms inference latency.

Accomplishments that we're proud of

  • High Benchmark Accuracy (Held-out Test Set, N = 61):
    • Overall CAD: 0.922 ROC-AUC | 90.5% Sensitivity | 86.9% Accuracy | 0.098 Brier Score
    • LAD Stenosis: 0.852 ROC-AUC | 82.8% Sensitivity
    • RCA Stenosis: 0.838 ROC-AUC | 78.7% Accuracy
    • LCX Stenosis: 0.784 ROC-AUC | 75.4% Accuracy
  • 100% Certified Test Suite: 35 passing automated tests (31 leakage firewall unit tests + 4 API integration tests).
  • Zero Dedicated GPU Requirement: Runs smoothly in any modern web browser.
  • Production-Ready & Safe: Complete Docker setup and medical software governance disclaimers.

What we learned

  • Clinical Nuance Over Raw Accuracy: Cardiologists care deeply about sensitivity and calibration. Missing a proximal LAD occlusion ("widow-maker") is catastrophic, making low Brier calibration scores and high sensitivity far more important than simple accuracy.
  • Spatial UI Drives Trust: Showing doctors why the model made a prediction (TreeSHAP) and where on the heart it matters (3D twin) turns AI from a scary black box into an intuitive clinical partner.

What's next for Cardio Viz IQ

  • Patient-Specific CT-Angiography Reconstruction: Ingesting patient DICOM CT scans to build personalized 3D patient heart geometries.
  • Multi-Center Clinical Validation: Validating the models across diverse hospital populations.
  • WebXR & Spatial Computing: Bringing the 3D heart into augmented reality (like Apple Vision Pro) for pre-operative cath lab surgical planning.

Built With

Share this project:

Updates

Submission history