Skip to content

Commit 5cc9d99

Browse files
Merge pull request #9 from ChristianHinge/main
Cleanup main READMEs
2 parents 70cc5f1 + 1581448 commit 5cc9d99

3 files changed

Lines changed: 49 additions & 277 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,21 @@
2323

2424
---
2525

26+
<a id="overview"></a>
27+
2628
## 🧠 Overview
2729

28-
Your algorithm receives the files under `features/` for each subject and must output a pseudo-CT volume as a NIfTI file in Hounsfield units (HU). Predictions are evaluated two ways:
30+
Your algorithm receives the files under `features/` for each subject and must output a pseudo-CT volume as a NIfTI file in Hounsfield units (HU). Predictions are evaluated two ways (see [Evaluation](#evaluation-srcevaluation) for metric definitions):
2931

3032
1. **CT accuracy** β€” Predicted pseudo-CT is compared directly against the ground-truth CT
3133
2. **PET accuracy** β€” Predicted pseudo-CT is fed into the reconstruction pipeline to produce an attenuation-corrected PET image, which is then compared against the ground-truth PET
3234

3335
Note that no PET reconstruction experience is needed to participate in the challenge, and the main purpose of the reconstruction is to enable clinically meaningful metrics.
3436

35-
The dataset comprises 99 subject-unique cases, with 20 reserved for testing and the remaining 79 available on huggingface and split as follows:
36-
37-
| Split | Subjects | Contents |
38-
|-------|----------|----------|
39-
| `train/` (full) | 8 | `features/` + `ct-label/` + `recon/` + `pet-label/` |
40-
| `train/` (no recon) | 67 | `features/` + `ct-label/` |
41-
| `val/` | 4 | `features/` + `recon/` |
42-
43-
All train cases have CT labels, but due to the size of the sinograms, only 8 include the `recon/` and `pet-label/` folders needed for closed loop reconstruction. Validation subjects have sinogram `recon/` data but no labels β€” submit predicted pseudo-CTs and reconstructed PETs to Codabench to get live leaderboard metrics during the challenge.
44-
4537
---
4638

39+
<a id="documentation"></a>
40+
4741
## πŸ“š Documentation
4842

4943
| Guide | Description |
@@ -57,6 +51,8 @@ All train cases have CT labels, but due to the size of the sinograms, only 8 inc
5751

5852
---
5953

54+
<a id="getting-started"></a>
55+
6056
## πŸš€ Getting Started
6157

6258
**Requirements:** Python 3.12, [uv](https://github.com/astral-sh/uv), Docker
@@ -76,8 +72,22 @@ src/
7672

7773
---
7874

75+
<a id="dataset-structure"></a>
76+
7977
## πŸ—‚οΈ Dataset structure
80-
All images are resampled to the label CT image (tensor size: 512x512x531, voxel size 1.52x1.52,2.00mm^3) and structured in four folders per case.
78+
79+
The dataset comprises 99 subject-unique studies, with 20 reserved for testing and the remaining 79 available on huggingface and split as follows:
80+
81+
| Split | Subjects | Contents |
82+
|-------|----------|----------|
83+
| `train/` (full) | 8 | `features/` + `ct-label/` + `recon/` + `pet-label/` |
84+
| `train/` (no recon) | 67 | `features/` + `ct-label/` |
85+
| `val/` | 4 | `features/` + `recon/` |
86+
87+
All train subjects have CT labels, but due to the size of the sinograms, only 8 include the `recon/` and `pet-label/` folders needed for closed loop reconstruction. Validation subjects have sinogram `recon/` data but no labels β€” submit predicted pseudo-CTs and reconstructed PETs to Codabench to get live leaderboard metrics during the challenge. The train subjects with `recon/` data are: `sub-000, sub-001, sub-002, sub-005, sub-006, sub-008, sub-013, sub-014`.
88+
89+
90+
All images except those in `pet-label` are resampled to the label CT image (tensor size: 512x512x531, voxel size 1.52x1.52,2.00mm^3). NIfTI images are structured in four folders per subject.
8191
- `features/` All the files you can use as input to your pseudo-CT model during inference.
8292
- `ct-label/` The CT target (`ct.nii.gz`) and segmentations for evaluation.
8393
- `pet-label/` The PET target (`pet.nii.gz`) and segmentations for evaluation.
@@ -90,33 +100,36 @@ train/
90100
β”œβ”€β”€ features/ # generative model inputs
91101
β”‚ β”œβ”€β”€ nacpet.nii.gz # non-attenuation-corrected PET.
92102
β”‚ β”œβ”€β”€ topogram.nii.gz # 2D scout X-ray
93-
β”‚ β”œβ”€β”€ mri_chunk_{0-3}_{in/out}_phase.nii.gz # DIXON MRI bed position (0-3), in-phase and out-phase
94-
β”‚ β”œβ”€β”€ mri_combined_{in/out}_phase.nii.gz # stitched whole-body MRI, out-of-phase
103+
β”‚ β”œβ”€β”€ mri_chunk_{0-3}_{in/out}_phase.nii.gz # MRI chunk (0-3), in- and out-phase
104+
β”‚ β”œβ”€β”€ mri_combined_{in/out}_phase.nii.gz # stitched whole-body MRI, in- and out-phase
95105
β”‚ β”œβ”€β”€ mri_face_mask.nii.gz # binary anonymization mask
96106
β”‚ └── metadata.json # {sex, age, height, weight}
97107
β”œβ”€β”€ ct-label/ # ground-truth CT
98-
β”‚ β”œβ”€β”€ ct.nii.gz # in HU this is what your algorithm should predict
108+
β”‚ β”œβ”€β”€ ct.nii.gz # CT in Hounsfield Units (reference)
99109
β”‚ β”œβ”€β”€ body_seg.nii.gz # TotalSegmentator body seg.
100110
β”‚ β”œβ”€β”€ organ_seg.nii.gz # TotalSegmentator organ seg.
101-
β”‚ └── prediction_mask.nii.gz # The generative model should focus only on these voxels (face + scanner are excluded)
102-
β”œβ”€β”€ recon/ # sinogram data
103-
β”‚ β”œβ”€β”€ mult_nac_rd85.hs/.s # multiplicative sinogram
104-
β”‚ β”œβ”€β”€ add_nac_rd85.hs/.s # additive sinogram
105-
β”‚ β”œβ”€β”€ prompts_rd85.hs/.s # raw sinogram
111+
β”‚ └── prediction_mask.nii.gz # Within-body voxels (face excluded).
112+
β”œβ”€β”€ recon/ # sinogram data for reconstruction
113+
β”‚ β”œβ”€β”€ mult_nac_rd85.hs/.s # multiplicative sinogram (NAC)
114+
β”‚ β”œβ”€β”€ add_nac_rd85.hs/.s # additive sinogram (NAC)
115+
β”‚ β”œβ”€β”€ prompts_rd85.hs/.s # raw sinogram
106116
β”‚ β”œβ”€β”€ offset.json # bed position and gantry offset
107-
β”‚ β”œβ”€β”€ ct_face_and_bed.nii.gz # GT CT values at face + scanner bed (automatically superimposed on your prediction before reconstruction)
117+
β”‚ β”œβ”€β”€ ct_face_and_bed.nii.gz # inverse of prediction_mask.nii.gz
108118
β”‚ └── face_and_bed_mask.nii.gz # binary face + scanner bed mask
109119
└── pet-label/ # ground-truth PET
110120
β”œβ”€β”€ pet.nii.gz # CT-attenuation-corrected PET (reference)
111-
β”œβ”€β”€ body_seg.nii.gz # body mask in PET space
112-
└── organ_seg.nii.gz # organ labels in PET space
121+
β”œβ”€β”€ body_seg.nii.gz # TotalSegmentator body seg. in PET space
122+
β”œβ”€β”€ tissue_seg.nii.gz # TotalSegmentator tissue seg. in PET space
123+
└── organ_seg.nii.gz # TotalSegmentator organ seg. in PET space
113124
```
114125

115126
---
116127

128+
<a id="pseudo-ct-baseline-srcbaseline"></a>
129+
117130
## πŸ“¦ Pseudo-CT Baseline (`src/baseline/`)
118131

119-
A simple patch-based MONAI 3D UNet that predicts pseudo-CT from NAC-PET only. It is provided as a starting-point reference β€” participants are expected to improve on it by incorporating MRI and topogram inputs.
132+
A simple patch-based 3D UNet that predicts pseudo-CT from NAC-PET only.
120133

121134
**Python usage:**
122135

@@ -137,10 +150,14 @@ docker run --rm \
137150
ghcr.io/bic-mac-challenge/baseline:latest
138151
```
139152

140-
The predicted CT is written to `/data/output/ct.nii.gz`. All weights and dependencies are baked into the image - no internet access is allowed at runtime.
153+
The predicted CT is written to `/data/output/ct.nii.gz`. All weights and dependencies are baked into the image, and the same is expected for your final docker image submission.
154+
155+
You can re-train the baseline by running `train.py` and containerize it by running `docker build -t my-baseline .` (from inside the `src/baseline` folder)
141156

142157
---
143158

159+
<a id="reconstruction-srcrecon"></a>
160+
144161
## βš™οΈ Reconstruction (`src/recon/`)
145162

146163
Converts a CT (ground-truth or pseudo-CT) and PET sinograms into an attenuation-corrected PET image using [STIR](http://stir.sourceforge.net/). See [docs/reconstruction.md](docs/reconstruction.md) for pipeline details and local usage instructions.
@@ -162,6 +179,8 @@ The reconstructed PET is written to `/data/output/pet.nii.gz`.
162179
163180
---
164181

182+
<a id="evaluation-srcevaluation"></a>
183+
165184
## πŸ“Š Evaluation (`src/evaluation/`)
166185

167186
Five metrics compare predicted PET and CT outputs against the ground truth:
@@ -199,8 +218,8 @@ python src/evaluation/eval_dataset.py \
199218
```
200219
predictions_dir/
201220
β”œβ”€β”€ sub-000/
202-
β”‚ β”œβ”€β”€ ct.nii.gz # optional
203-
β”‚ └── pet.nii.gz # optional
221+
β”‚ β”œβ”€β”€ ct.nii.gz
222+
β”‚ └── pet.nii.gz
204223
β”œβ”€β”€ sub-001/
205224
β”‚ β”œβ”€β”€ ct.nii.gz
206225
β”‚ └── pet.nii.gz
@@ -209,6 +228,8 @@ predictions_dir/
209228

210229
---
211230

231+
<a id="submission"></a>
232+
212233
## πŸ“¬ Submission
213234

214235
| Phase | What you submit |
@@ -217,6 +238,6 @@ predictions_dir/
217238
| **Dry Run** | Docker container emailed to us β€” we run it on the 4 `val/` subjects on our hardware and return CT metrics, or error logs if the container failed |
218239
| **Final Test** | Docker container emailed to us β€” we run prediction, reconstruction, and full evaluation on the unseen test set |
219240

220-
Validation and Dry Run are open concurrently throughout the challenge. See [docs/submission-guide.md](docs/submission-guide.md) for full instructions, and [docs/docker-packaging.md](docs/docker-packaging.md) for how to build and test your container.
241+
Validation and Dry Run open May 15. See [docs/submission-guide.md](docs/submission-guide.md) for full instructions, and [docs/docker-packaging.md](docs/docker-packaging.md) for how to build and test your container.
221242

222243

β€Žsrc/baseline/README.mdβ€Ž

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
Β (0)