────── ### 1. About the Project (Markdown with LaTeX) ## Inspiration

Cardiovascular disease remains the leading cause of global mortality, claiming nearly 18 million lives annually. While invasive coronary

catheterization provides the gold standard for diagnosing Coronary Artery Disease (CAD), it is an invasive, hospital-bound procedure costing thousands of dollars and carrying procedural risks.

Routine clinical examinations—such as resting 12-lead ECGs, echocardiography, blood pressure, and lipid profiles—are non-invasive, safe, and

inexpensive. However, clinicians face three critical bottlenecks when interpreting this multimodal data: 1. Abstract tabular outputs: Traditional risk calculators produce a single flat percentage that lacks anatomical grounding, leaving doctors unable to visualize where ischemia is developing. 2. Distal territory blindness: Standard tests detect anterior wall changes (Left Anterior Descending artery, LAD) well, but often miss circumflex (LCX) and right coronary artery (RCA) disease. 3. Black-box opacity: Clinicians cannot trust uncalibrated predictions without knowing why a risk score is elevated, nor can they simulate how lifestyle interventions (e.g., statin therapy or BP control) would alter a patient's prognosis.

We built **CardioVision** to bridge state-of-the-art machine learning with interactive 3D cardiovascular graphics, turning complex non-invasive

clinical data into an intuitive, anatomically grounded, and fully explainable decision-support platform.

---

## What It Does

CardioVision ingests **54 multimodal non-invasive patient features** across demographics, symptom history, vital signs, 12-lead ECG, echocardiography,

and laboratory biomarkers to predict overall CAD risk alongside vessel-specific stenosis in the three primary coronary arteries: - LAD (Left Anterior Descending) - LCX (Left Circumflex) - RCA (Right Coronary Artery)

### Key Features:
- **Calibrated Multi-Target AI:** Uses repeated stratified cross-validation and out-of-fold Platt scaling to produce reliable probabilities. We

enforce the physiological hierarchy constraint: $$P(\text{CAD}) \ge \max\big(P(\text{LAD}), P(\text{LCX}), P(\text{RCA})\big)$$ - Interactive 3D Heart & Coronary Viewer: Renders a co-located 3D cardiac scene with an in-viewport glass switcher between a photorealistic beating heart model and procedural 3D anatomy. The major coronary arteries (LM, LAD, LCX, RCA) are continuously color-coded from low risk to high risk based on predicted stenosis probabilities. - Surgical Dissection & Hemodynamic Controls: Clinicians can open coronal, short-axis, and sagittal cutaways to inspect internal valve rings, chordae tendineae, and papillary muscles, while cycling through Wiggers cardiac cycle phases (systole, diastole, and auto-beating) with synchronized S1/S2 acoustic Lub-Dub stethoscope playback. - Sub-25ms Native TreeSHAP: Delivers instantaneous feature attributions in calibrated log-odds space using native tree path traversals without heavy runtime dependencies. - Interactive What-If Sensitivity Levers: Clinicians can adjust patient systolic BP, LDL, fasting blood sugar, or smoking status to immediately observe real-time risk deltas and dynamic vessel recoloring. - Real-Time Moving ECG Telemetry: A professional 4-lead oscilloscope strip (Leads II, V1, V5, aVR) sweeps in real-time, synchronized with the patient's heart rate and ischemic markers (ST elevation, ST depression, T-wave inversion). - Dedicated Top-Bar Patient Access: Provides instantaneous one-click loading of 8 stratified holdout personas representing real clinical cases (Normal, Single-Vessel, Double-Vessel, and Triple-Vessel disease). - Interactive 54-Feature Clinical Form: Organized into collapsible accordions with physiological validation bounds, AHA/ADA guideline reference ranges, dirty-state tracking, and a manual prediction recalculation trigger.

---

## How We Built It

CardioVision is engineered as an enterprise-grade, clean-architecture system:

- **Machine Learning Core (Python 3.11, Scikit-learn, XGBoost):**
  - Trained on the benchmark Z-Alizadeh Sani Extension dataset (303 consecutive patients).
  - Evaluated using 15-fold Repeated Stratified Cross-Validation (5 splits $\times$ 3 repeats) with an inner 3-fold CV for hyperparameter tuning.
  - Zero-leakage pipeline: 30 automated adversarial tests enforce that target columns (LAD, LCX, RCA, Cath, CAD) and their case/whitespace variants

are strictly excluded from the feature space. - Native C++ TreeSHAP implementation (pred_contribs=True) executes in sub-25ms without importing heavy runtime libraries. - High-Performance Production Backend (FastAPI, Uvicorn, Docker): - Deployed on Render with automated warmup keep-alive crons, Pydantic schema validation, and complete OpenAPI/Swagger interactive documentation. - Frontend & 3D WebGL Visualization (React 18, TypeScript, Vite, Tailwind CSS): - React Three Fiber & Drei: Co-located 3D procedural meshes and glTF Draco-compressed beating heart geometry. - Demand-Driven Frameloop: Achieves 0% idle GPU utilization by re-rendering strictly upon user rotation or state mutation. - Zustand State Engine: Manages global clinical telemetry, persona switching, and camera tweens. - Recharts & Web Audio API: Renders calibrated log-odds waterfall charts and synthesizes real-time acoustic heart sounds.

---

## Challenges We Faced

1. **Distal Vessel Discrimination & Scientific Honesty:** Non-invasive biomarkers strongly correlate with anterior LAD ischemia but produce subtle

signals for LCX and RCA. Rather than over-fitting or artificially inflating numbers, we practiced radical scientific honesty: reporting our calibrated out-of-fold metrics (CAD ROC-AUC: 0.903, LAD: 0.838, LCX: 0.758, RCA: 0.701) and documenting these clinical limitations directly inside the UI. 2. The "Lesion Location Illusion": Tabular datasets record vessel-level stenosis ($\ge 50\%$), never precise 3D spatial coordinates. We instituted an inviolable ethical guardrail: vessels are shaded uniformly along their entire length according to probability; we never draw speculative localized blockages (e.g., "stenosis at mid-LAD"). 3. 3D WebGL Performance on Consumer Hardware: Rendering volumetric 3D meshes, procedural tube curves, and cutaway clipping planes can strain low- end GPUs. We resolved this through Draco compression (reducing model size from 15MB to 1.35MB), capping DPR at 1.5, and implementing an event-driven demand frameloop. 4. Dual Representation Synchronization: Maintaining fluid camera angles, surgical cutaways, and valve dynamics when cross-fading between a skeletal glTF mesh and procedural React Three Fiber geometry required dynamic Three.js clipping plane negations and shared coordinate matrices.

---

## Accomplishments That We're Proud Of

- **Verified Zero Leakage:** 59 automated pytests (including 30 adversarial leakage guards) prove zero data contamination.
- **Sub-25ms Inference Latency:** Native TreeSHAP feature attributions and risk scores compute in under 25 milliseconds locally and under 60ms

globally over HTTP. - Anatomical Co-Location: Seamlessly synchronizing a photorealistic Blender heart with a procedural anatomical model and real-time moving 12-lead ECG telemetry. - Resilient Fallback Mode: The web application seamlessly falls back to cached offline holdout personas and 2D vector schematics if the user loses internet connection or disables WebGL.

---

## What We Learned

- **Calibration beats raw accuracy:** In medicine, an uncalibrated 95% confident prediction is dangerous. Platt-scaled sigmoid calibration on margin

spaces produces probabilities that clinicians can genuinely trust. - Explainability must be actionable: Clinicians do not just want to know a patient is at high risk; they need to see whether the risk is driven by non-modifiable factors (Age, Sex) or modifiable targets (LDL, Blood Pressure, Smoking) that guide treatment planning.

---

## What's Next for CardioVision

- **Multi-Center Validation:** Prospective validation across diverse demographic cohorts (Framingham, UK Biobank) to test external geographic

generalization. - DICOM & CT Angiography Ingestion: Directly ingesting raw coronary computed tomography angiography (CCTA) volumetric scans to enable true patient-specific 3D vascular reconstruction alongside tabular risk scoring. - EHR / SMART on FHIR Integration: Embedding CardioVision directly into Epic and Cerner electronic health record workflows as a native clinical decision-support sidebar. Please check out the description fo the youtube video

Built With

Share this project:

Updates

Submission history