Inspiration
Cardiovascular disease is a leading cause of death worldwide, yet most risk tools return a single percentage. That number doesn't tell a clinician or patient where in the heart the problem might be, or why the model thinks so. We wanted to turn a prediction into something you can see and question: a heart you can rotate, where each coronary artery lights up according to its predicted risk.
What it does
CardioViz takes 16 clinical inputs (demographics, vitals, lipids, glucose, ECG findings, ejection fraction and wall-motion region) and predicts overall coronary artery disease (CAD) plus stenosis of the three main vessels: LAD, LCX and RCA.
- An interactive 3D heart colors each artery from green to red by its predicted probability, updating live as inputs change.
- You can rotate, zoom, and click a vessel to inspect it.
- A dashboard shows the four probabilities and a SHAP breakdown of which measurements pushed the risk up or down, alongside the patient's actual values.
- Accuracy, precision, recall, F1 and ROC-AUC are shown for every target.
- A clinical safety disclaimer is always visible: decision support and education only, not a substitute for diagnostic imaging.
How we built it
- Data: the Z-Alizadeh Sani dataset, with Cath, LAD, LCX and RCA removed from the inputs to prevent target leakage.
- Models: one L2-regularised logistic regression per target on standardised features. We chose a linear model so SHAP values are exact and cheap, which keeps explanations instant in the browser.
- Validation: stratified 80/20 held-out split, plus 5-fold cross-validation in the Python pipeline (scikit-learn).
- 3D: Three.js. A translucent torso and lungs, a deformed-sphere heart, and tube meshes along curves on the heart surface for the arteries. Raycasting handles selection.
- Architecture: a single static web app with no backend. It can retrain all four models in the browser from the dataset CSV, and a separate Python script exports weights and metrics.
Challenges we ran into
- Keeping the 3D view smooth without a dedicated GPU meant low polygon counts and a capped pixel ratio.
- Keeping the colors, the selected vessel and the explanation panel in sync, so clicking an artery always shows that vessel's risk.
- The dataset is small (303 patients) and a single-centre cohort, so we had to be careful not to overclaim.
- Smoke-testing the pipeline caught a misspelled column alias that would have silently defaulted the ejection fraction when importing the real CSV.
Accomplishments that we're proud of
- A working end-to-end system: data in, four predictions out, a 3D map, and a per-feature explanation, all in one page that runs in a browser.
- Leakage-safe training and honest evaluation, with held-out and cross-validated metrics.
- Explanations that are exact rather than approximated.
- A structure that lets new features, models or vessels be added without a redesign.
What we learned
- Explainability changes how a prediction is read. Showing the drivers makes a risk score far easier to trust or challenge.
- A simple, well-validated linear model can be the right choice when interpretability and speed matter.
- Small clinical datasets limit what you can claim, so validation and plain statements of limitation matter as much as the model.
- Small data-handling details, such as column names and label encodings, can quietly break a pipeline.
What's next for CardioViz
- Compare against non-linear models such as gradient boosting, with TreeSHAP and calibrated probabilities.
- Replace the schematic heart with a real anatomical mesh, such as one from BodyParts3D.
- Add uncertainty intervals and more clinical features.
- Validate on external datasets before any claim of clinical usefulness.
Log in or sign up for Devpost to join the conversation.