| --- |
| license: other |
| license_name: mixed-see-readme |
| tags: |
| - sparse-view-ct |
| - cbct |
| - ct-reconstruction |
| - medical-imaging |
| - deepsparse |
| --- |
| |
| # DeepSparse — 40-view finetuned checkpoints |
|
|
| Finetuned [DeepSparse](https://github.com/xmed-lab/DeepSparse) checkpoints for **40-view (180°) sparse-view CT** on four anatomies, from the official pretrained weights (`pretrain/ep_700.pth`) with the official two-stage protocol. Companion to [`Potestates/DeepSparse-25v`](https://huggingface.co/Potestates/DeepSparse-25v). |
|
|
| ## Results (official test splits, 256³) |
|
|
| | Checkpoint | Train cases | Test cases | 3D PSNR (dB) | 3D SSIM (×10⁻²) | 2D PSNR (dB) | 2D SSIM | |
| |---|---|---|---|---|---|---| |
| | `pelvis+40v+n250+nv60+s2` (PENGWIN) | 60 (all) | 30 | **31.54** | **92.02** | **39.41** | 0.9842 | |
| | `luna+40v+n250+nv60+s2` (LUNA16) | 250 / 738 | 100 | **32.96** | **92.71** | **40.18** | 0.9871 | |
| | `abdomen+40v+n250+nv60+s2` (PANORAMA) | 250 / 1244 | 600 | evaluation running | | | | |
| | `tooth+40v+n250+nv60+s2` (ToothFairy) | 250 / 343 | 75 | evaluation running | | | | |
|
|
| 3D metrics from the official `code/evaluate.py` (skimage 3D SSIM, 7³ window). 2D metrics reproject both volumes with TIGRE and score them with R²-Gaussian's `metric_proj` (100 random views over 360°, each view normalized by its own max). Per-case values are in each folder's `results_1.0x.csv` / `results_proj2d_1.0x.csv`. |
|
|
| ### 25 views → 40 views |
|
|
| | Dataset | 3D PSNR 25v | 3D PSNR 40v | Δ | |
| |---|---|---|---| |
| | Pelvis | 30.96 | **31.54** | +0.58 | |
| | Lung | 32.47 | **32.96** | +0.49 | |
| | Abdomen | 29.79 | pending | | |
| | Tooth | 34.03 | pending | | |
|
|
| Stage-1 validation PSNR (half resolution, epoch 400) already favours 40 views for the two pending datasets: tooth 34.38 → 35.18, abdomen 30.54 → 30.65. |
|
|
| ## Setup |
|
|
| - Code: xmed-lab/DeepSparse @ `a055aba3bcb5732a68f89cc0bf3ee6fbfbb1b1e4` |
| - Views: 40 input views, uniform over 180°, taken from a **600-view** projection cache (600/40 = 15, so the views are exactly equispaced; the 300-view cache used for 25v cannot divide 40 evenly) |
| - Stage 1: `--num_views 60 --min_views 40 --random_views --vq_w 0.1`, resumed from `pretrain/ep_700.pth`, 400 epochs |
| - Stage 2: same views, `--vq_w 1.0 --safely_load --freeze_ft`, resumed from stage-1 `ep_400.pth`, 400 epochs |
| - `num_views=60` gives a 1.5× teacher/student view ratio in stage 2 (official: 24 dense views vs 6/8/10) |
| - Batch size 2, lr 1e-4, weight decay 1e-3, no LR schedule, 1 GPU per job |
| - Environment: PyTorch 2.7.1 + CUDA 12.8, TIGRE 3.1.3 |
|
|
| The 600-view cache was rebuilt from raw data with the official preprocessing; for every case the recomputed image is bit-identical to the existing processed volume, and the 300 shared views agree with the old cache at 53–55 dB (uint8 storage rounding). |
|
|
| ## Differences from the paper protocol |
|
|
| 1. **Training set size**: at most 250 training cases per dataset (the paper uses the full training sets). Test splits are the official ones; case lists in `splits/<DATASET>/meta_info.json`. |
| 2. **Dense views**: `num_views=60` (1.5×), against 2.4–4× in the official 6/8/10-view settings. |
| 3. **Environment**: newer PyTorch and TIGRE than the official (1.13 / 2.3), required for Blackwell GPUs. |
| 4. **ToothFairy config**: the official `meta_info.json` points at an unreleased `config+new.yaml` / `processed+new/`; the repo's public `config.yaml` is used instead (verified with the official tooth 10-view checkpoint: 31.89 dB vs the paper's 31.79). |
|
|
| ## Files |
|
|
| ``` |
| <dataset>+40v+n250+nv60+s2/ |
| ep_400.pth final stage-2 checkpoint (use this) |
| config.yaml config saved by train.py (min_views stays 10 here) |
| results_1.0x.csv per-case 3D PSNR/SSIM |
| results_proj2d_1.0x.csv per-case 3D + 2D projection metrics |
| train.log / train_s1.log stage-2 / stage-1 logs (args + validation curve) |
| configs/ training configs and the 40-view eval config (min_views: 40) |
| splits/<DATASET>/meta_info.json the 250-case subset and official test split |
| ``` |
|
|
| ## Usage |
|
|
| ```bash |
| hf download Potestates/DeepSparse-40v --local-dir ./logs |
| cp logs/configs/eval_40v_n250_600v.yaml configs/generated/ # set root_dir to your data root |
| |
| python code/evaluate.py --name luna+40v+n250+nv60+s2 --epoch 400 --dst_name luna \ |
| --split test --num_views 40 --cfg_path configs/generated/eval_40v_n250_600v.yaml \ |
| --out_res_scale 1.0 |
| ``` |
|
|
| Evaluation must use `min_views: 40` and a projection cache whose view count is a multiple of 40 (we use 600); the `config.yaml` inside each checkpoint folder still says `min_views: 10`. |
|
|
| ## License |
|
|
| DeepSparse code is MIT. These weights derive from datasets with their own terms: PANORAMA (abdomen) CC BY-NC 4.0 (**non-commercial**), PENGWIN (pelvis) CC BY 4.0, LUNA16 and ToothFairy per their original terms. Please cite the DeepSparse paper and the datasets. |
|
|