How anonymbordo/3d-graph-bleeding-detection- works
This repository is a Streamlit demo for 3D graph-based bleeding-risk detection from abdominal CT scans. A user selects a demo patient; the app loads the trained model and patient data, derives organ features and a spatial graph, runs multi-label inference, then presents risk results as CT overlays, a 3D graph, and detail tables. The graph separates data preparation, model loading/inference, and presentation. The source excerpts show the main runtime calls; unsampled training and dataset-generation behavior is not mapped.
Main entry points: app.py Streamlit patient demo · inference.py Patient inference · model_def.py Model and metadata loader · visualize.py CT overlay viewer
Components 15
Demo presentation
- Streamlit patient demo
app.py - Risk and label details
app.py
Patient preparation
- CT, masks, labels
demo_package - Patient data loader
inference.py - Organ features
inference.py - Spatial graph builder
inference.py
Model and inference
- Patient inference
inference.py - Model and metadata loader
model_def.py - Trained weights
model.pt - Model metadata
model_metadata.json - Bleeding GNN
model_def.py
Risk visualization
- CT overlay viewer
visualize.py - 3D graph viewer
visualize.py - Organ risk mapping
visualize.py
Other components
- Clinician / demo user
Connections 17
- Clinician / demo user → Streamlit patient demo: selects patient
app.py - Streamlit patient demo → Model and metadata loader: loads model
app.py - Model and metadata loader → Trained weights: loads weights
model_def.py - Model and metadata loader → Model metadata: reads metadata
model_def.py - Model and metadata loader → Bleeding GNN: constructs
model_def.py - Streamlit patient demo → Patient inference: requests prediction
app.py - Patient inference → Patient data loader: loads patient
inference.py - Patient data loader → CT, masks, labels: reads CT and labels
inference.py - Patient inference → Organ features: extracts features
inference.py - Patient inference → Spatial graph builder: builds graph
inference.py - Patient inference → Bleeding GNN: runs inference
inference.py - Patient inference → Streamlit patient demo: returns predictions
app.py - Streamlit patient demo → CT overlay viewer: renders CT overlay
app.py - Streamlit patient demo → 3D graph viewer: renders 3D graph
app.py - Streamlit patient demo → Risk and label details: shows result details
app.py - CT overlay viewer → Organ risk mapping: maps organ risk
visualize.py - 3D graph viewer → Organ risk mapping: maps organ risk
visualize.py