How abirshandilya07/cad-vision works
CAD-Vision is a clinical decision-support demo that predicts overall CAD and LAD/LCX/RCA stenosis from patient features, then presents probabilities and vessel-level risk in an interactive dashboard. Users enter or load a sample patient, run prediction, and can inspect an optional SHAP explanation and change a feature in a what-if control. The README also documents schema-driven inputs and a leakage-safe model-training workflow. Some frontend/API wiring and ML implementation details were not excerpted; uncertain connections are omitted or marked unverified.
Main entry points: App.tsx Dashboard shell · main.py FastAPI routes · model_store.py Prediction and explanation · useAppStore.ts App state
Components 20
Patient dashboard
- Dashboard shell
frontend/src/App.tsx - Patient form
frontend/src/components/PatientForm.tsx - App state
frontend/src/store/useAppStore.ts - API client
frontend/src/api/client.ts - 3D heart view
frontend/src/scene/HeartScene.tsx - Risk color mapping
frontend/src/scene/riskColor.ts - Vessel geometry paths
frontend/src/scene/vesselPaths.ts - Vitals dashboard
frontend/src/components/VitalsTable.tsx - What-if control
frontend/src/components/WhatIfSlider.tsx
Prediction service
- FastAPI routes
backend/app/main.py - Prediction and explanation
backend/app/services/model_store.py - Explanation narrative
backend/app/services/narrative.py
Model development
- Training and evaluation
ml/src/train.py - ML prediction code
ml/src/predict.py - Target configuration
ml/config.py
Clinical data
- Feature schema
ml/schema/feature_schema.json - Example patients
data/samples - Z-Alizadeh Sani dataset
data/raw/z_alizadeh_sani.xlsx - Trained model artifacts
ml/artifacts/models
Other components
- Clinician / user
Connections 22
- Clinician / user → Dashboard shell: uses
README.md - Dashboard shell → Patient form: renders
frontend/src/App.tsx - Dashboard shell → App state: dispatches actions
frontend/src/App.tsx - Patient form → App state: updates inputs
frontend/src/components/PatientForm.tsx - Dashboard shell → 3D heart view: renders
frontend/src/App.tsx - Dashboard shell → Vitals dashboard: renders
frontend/src/App.tsx - Dashboard shell → What-if control: renders
frontend/src/App.tsx - 3D heart view → Risk color mapping: gets risk colors
frontend/src/scene/HeartScene.tsx - 3D heart view → Vessel geometry paths: uses paths
frontend/src/scene/HeartScene.tsx - App state → API client: calls
frontend/src/store/useAppStore.ts - App state → Dashboard shell: provides state
frontend/src/App.tsx - API client → FastAPI routes: sends API requests
- FastAPI routes → Prediction and explanation: calls prediction service
backend/app/main.py - FastAPI routes → Feature schema: serves feature definitions
README.md - FastAPI routes → Example patients: serves sample patients
README.md - Prediction and explanation → Trained model artifacts: loads trained models
backend/app/services/model_store.py - Prediction and explanation → Feature schema: loads feature contract
backend/app/services/model_store.py - Prediction and explanation → Explanation narrative: uses narrative logic
backend/app/services/model_store.py - Training and evaluation → Z-Alizadeh Sani dataset: trains from
README.md - Training and evaluation → Feature schema: uses feature definitions
README.md - Training and evaluation → Trained model artifacts: produces models
README.md - ML prediction code → Target configuration: uses target settings