Cardiovascular

CardioTwin 3D — Cardiovascular Risk & Multi-Vessel Stenosis Intelligence

Multimodal AI Hackathon 2026 • Track A: Cardiovascular Risk Visualization & Prediction

An interactive 3D cardiovascular digital twin and clinical decision-support system that predicts Overall Coronary Artery Disease (CAD) and vessel-specific stenosis for the LAD, LCX, and RCA, dynamically mapping risks onto an interactive 3D human anatomical heart with real-time hemodynamic simulation and SHAP explainability.


🌟 Key Features & Uniqueness Highlights

  1. Multi-Target Predictive Machine Learning Pipeline:
    • Classifies overall CAD status (Cath: CAD vs. Normal).
    • Predicts vessel stenosis for LAD (Left Anterior Descending), LCX (Left Circumflex), and RCA (Right Coronary Artery).
    • Evaluated across Random Forest, XGBoost, Gradient Boosting, and L2 Logistic Regression with Stratified 5-Fold Cross Validation.
    • Target Leakage Prevention: Features Cath, LAD, LCX, and RCA were strictly excluded from model inputs.
  2. Expanded Multi-Disease Cardiovascular Pathology Suite:
    • Acute Myocardial Infarction (STEMI) Threat: Evaluates transmural ischemic injury threat from ST elevations, Q waves, and coronary hypoperfusion.
    • Congestive Heart Failure (CHF) & LV Dysfunction: Quantifies systolic pump failure and ejection fraction deficit.
    • Cardiac Arrhythmia & Conduction Block: Identifies bundle branch blocks (LBBB/RBBB), T-wave inversions, and electrical dyssynchrony.
    • Valvular Heart Disease (Aortic/Mitral): Detects stenotic or regurgitant turbulence from murmurs and echocardiographic valvular findings.
    • Hypertensive Cardiomyopathy & Concentric LVH: Assesses pathological left ventricular wall thickening from chronic arterial afterload.
  3. 3D Animated Cardio Exercise & Rehab Simulator:
    • Seamlessly switch between 🫀 Cardiac Twin and 🏃 3D Exercise Lab.
    • Procedural 3D animated biomechanical runner performing:
      • Aerobic Jogging & Brisk Running (VO2 Max, capillary density)
      • Endurance Cadence Cycling (arterial elasticity, lower peripheral resistance)
      • HIIT Metabolic Calisthenics (shear-stress nitric oxide vasodilation, lipid clearance)
      • Vagal Tone Yoga & Breathwork (neurohormonal sympathetic suppression)
    • Live “Simulate Exercise Therapy” Engine: Recalculates before-and-after clinical biomarkers (BP, PR, LDL, HDL, EF) and spawns golden collateral micro-vessel angiogenesis on the 3D heart!
  4. Upgraded 3D Animation & Sci-Fi Aesthetic (“3D Animation Vibe”):
    • Torsional Wring Cardiac Contraction: Anatomical wringing motion where the ventricular apex twists counter-clockwise during systole and recoils during diastole.
    • Holographic Biosensor Scan Rings: Dual rotating cyan and blue orbital HUD rings with distance telemetry.
    • 3 Switchable Shader Themes:
      • 🎨 Bio-Realistic Anatomy (organic muscle, shiny pericardium)
      • ⚡ Cyber-Neon Hologram (Tron/Iron-Man glowing digital twin with wireframe scanlines)
      • 📷 X-Ray Fluoroscopy (clinical angiography contrast)
    • Synchronized Web Audio Cardiac Synthesizer: Realistic “lub-dub” valve closure sounds and EKG pulse monitoring.
    • Atheroma Plaque Bulges & Constriction Rings: Highlights physical atherosclerotic narrowing directly on the vessel lumen.
    • Atmospheric Biosensor Particle Cloud: Floating nanobots and ambient lighting.

🚀 Quickstart Guide

1. Requirements

2. Installation

pip install -r requirements.txt

3. Launch System

Run the one-click launcher:

python run_app.py

Or start the server directly:

uvicorn backend.app:app --host 127.0.0.1 --port 8000

Open http://127.0.0.1:8000 in your browser.


📊 Model Performance Highlights

Target Selected Best Algorithm 5-Fold CV ROC-AUC Test ROC-AUC Test Accuracy Test F1-Score
CAD (Overall) Logistic Regression (L2) 0.9258 0.8941 80.3% 0.8537
LAD Stenosis Random Forest Classifier 0.8586 0.8115 72.1% 0.7733
LCX Stenosis Random Forest Classifier 0.7533 0.7000 67.2% 0.5238
RCA Stenosis Logistic Regression (L2) 0.7077 0.7537 70.5% 0.5909

📁 Repository Structure

CARDIOVASCULAR PROJECT/
├── backend/
│   ├── app.py                 # FastAPI backend (Inference, SHAP, Patients, Metrics)
│   ├── ml_pipeline.py         # Leakage-free training, CV benchmark & artifact generation
│   ├── models/                # Serialized model weights (*.joblib) & metadata
│   └── data/                  # UCI dataset & sample benchmark patient JSON
├── frontend/
│   ├── index.html             # High-tech medical UI layout & 3D viewport
│   ├── css/style.css          # Dark glassmorphic medical theme
│   ├── js/
│   │   ├── heart3d.js         # Three.js cardiac 3D engine & particle physics
│   │   ├── dashboard.js       # Clinical dashboard controller & SHAP visualizer
│   │   └── api.js             # Client-server asynchronous API connector
│   └── vendor/                # Standalone Three.js, OrbitControls, Chart.js bundles
├── documentation/
│   └── Hackathon_TrackA_Cardiovascular_Report.md # Full 6-page project report
├── requirements.txt           # Python dependency specification
├── run_app.py                 # Automated one-click launcher
└── README.md                  # Quickstart & architectural summary

⚖️ Clinical Safety Disclaimer

CardioTwin 3D is developed strictly for research, educational visualization, and clinical decision support purposes. It is NOT a diagnostic medical device and does not replace formal diagnostic coronary angiography, ECG analysis, or professional clinical judgment by a licensed cardiologist. #Cardiovascular # Cardiovascular # Cardiovascular