Turn a daily low-dose CBCT into a planning-grade synthetic CT (sCT), then compare it to a real planning CT — in a clean, modern dashboard.
Left to right: noisy CBCT input · synthetic CT (this demo's mock) · reference CT. All synthetic phantom data.
⚠️ RESEARCH / DEMO — NOT FOR DIAGNOSIS. This is a public, portfolio-style showcase. It runs a cosmetic mock on a synthetic phantom. The real model, its trained weights, the training source, and all patient data are intentionally excluded (see Privacy & Scope).
In image-guided radiotherapy, patients get a fast cone-beam CT (CBCT) on the treatment couch almost every day to check positioning. CBCT is quick and low-dose, but its image quality and HU calibration are too poor to re-plan the treatment on. A fresh planning CT means another appointment and extra dose — a real burden, especially for pediatric patients.
CBCTsynth·RT demonstrates the product around a solution to that: convert the daily CBCT into a CT-quality synthetic CT good enough for planning-grade visualization and HU analysis — no extra scan, no extra dose. This repository showcases the GUI/UX and the project goal; the underlying model is proprietary and not included here.
- Select a CBCT — load the bundled synthetic phantom with one click, point to a folder of DICOM
files, or upload a
.zip/ loose files. - Scan info + QC — slice count, spacing, HU stats, body coverage, tissue fractions, and a deployment-QC flag (valid / borderline / invalid).
- Generate — produce a synthetic CT and view it: axial slice slider, window/level presets (soft / bone / lung), and a synced CBCT | sCT side-by-side.
- Compare (optional) — provide a planning CT (or the bundled demo CT). It's rigidly registered to the CBCT grid, then you get a metrics table with plain-language explanations — mean ΔHU, body MAE, structure NCC, soft-tissue ΔHU, bone P95 ΔHU, brain bone-fraction — plus a CBCT | sCT | CT side-by-side, a difference heatmap, Bland–Altman, and per-slice error.
- Export — download the synthetic CT as a DERIVED DICOM series (geometry templated off the CBCT, tagged Research / Not for Diagnosis).
The interface uses a calm clinical palette (light blue + light orange), works in light and dark mode, and keeps heavy work cached so slice-scrubbing stays smooth.
# 1) install (CPU only — no GPU, no model weights needed)
pip install -r app/requirements.txt
# 2) (optional) regenerate the synthetic phantom; a copy is already committed
python sample_data/make_dummy_data.py
# 3) run the dashboard
streamlit run app/streamlit_app.pyThen click “Load bundled demo (cbct)” in step 1, Generate, and (optionally) “Load bundled demo (ct)” in step 4 to see the comparison view.
This repo is a design / portfolio showcase, deliberately stripped of anything sensitive:
| Included ✅ | Excluded ❌ |
|---|---|
| Dashboard GUI/UX code | Trained model weights (*.pt / *.pth) |
| Mock inference backend | The real model architecture & training source (dissertation IP) |
| Synthetic phantom generator + small committed sample | Any real patient DICOM / PHI |
| Metrics, visualization, DICOM export utilities | Private caches, registered/seg caches, large exports |
- The "Generate" button runs a cosmetic mock (denoise + HU recalibration), clearly labeled in-app. It is not the real network and makes no clinical claim.
- All sample data is a procedurally generated phantom (ellipsoids + noise) — not anonymized real
scans. See
sample_data/make_dummy_data.py. - If a private real backend (
app/real_backend.py) and weights (models/*.pt) are ever present locally, the app automatically uses them instead of the mock — but neither is committed here.
cbctsynth-rt/
├── app/
│ ├── streamlit_app.py # the dashboard (this is the showcase)
│ ├── pipeline.py # public backend: DICOM load, QC, mask, export, generate router
│ ├── mock_pipeline.py # cosmetic stand-in for the real model
│ ├── metrics.py # HU + structure comparison metrics
│ ├── viz.py # windowing, slice rendering, figures
│ └── requirements.txt
├── sample_data/
│ ├── make_dummy_data.py # synthetic phantom CBCT + CT generator
│ └── demo/ # small committed phantom (cbct/ + ct/)
├── models/
│ └── MODEL_CARD.md # describes the (absent) real models
├── docs/
│ ├── project_overview.md # non-technical overview
│ ├── method_summary.md # how it works, high level
│ └── metrics_explained.md # what each metric means
└── assets/screenshots/ # README visuals
- Project overview — the problem, the impact, what this demonstrates.
- Method summary — how CBCT→sCT works, at a high level.
- Metrics explained — every number in the comparison view, in plain English.
- Model card — the real models (kept private) and their intended use.
CBCTsynth·RT is a research/portfolio demonstration. It is not a medical device and must not be used for diagnosis or treatment decisions.
