@@ -38,32 +38,20 @@ derived from CT after HU→μ conversion.
3838
3939# Requirements
4040
41- - Python ** 3.10+ **
41+ - Python ** 3.12 **
4242- [ ` uv ` ] ( https://github.com/astral-sh/uv ) for environment and
4343 dependency management
4444
4545------------------------------------------------------------------------
4646
4747# Installation
4848
49- Clone the repository:
49+ Clone the repository and install dependencies :
5050
5151``` bash
5252git clone < repository_url>
5353cd < repository_folder>
54- ```
55-
56- Create and activate a virtual environment:
57-
58- ``` bash
59- uv venv
60- source .venv/bin/activate
61- ```
62-
63- Install required dependencies:
64-
65- ``` bash
66- uv pip install numpy nibabel
54+ uv sync
6755```
6856
6957------------------------------------------------------------------------
@@ -115,55 +103,72 @@ Both must:
115103
116104# Running the Evaluation
117105
118- Run the evaluation script with:
106+ There are two entry points: ` eval_case.py ` for a single subject and ` eval_dataset.py ` for a
107+ full dataset (this matches the challenge leaderboard computation, including the dataset-level
108+ Brain Outlier Score).
109+
110+ ## Single subject
119111
120112``` bash
121- python eval.py --subject_path < subject_path> --pred_pet < pred_pet> --pred_ct < pred_ct> [-all | -s pecific_metric < metric_name> ]
113+ python eval_case.py \
114+ --subject_path < subject_path> \
115+ --pred_pet < pred_pet.nii.gz> \
116+ --pred_ct < pred_ct.nii.gz>
122117```
123118
124- ------------------------------------------------------------------------
119+ ` --pred_pet ` and ` --pred_ct ` are both optional — omit either to skip the corresponding metrics.
125120
126- # Arguments
121+ Note: Brain Outlier Score is a dataset-level metric and is not computed by ` eval_case.py ` .
127122
128- Argument Description
129- -------------------- ---------------------------------
130- ` --subject_path ` Path to the subject directory
131- ` --pred_pet ` Path to the predicted PET NIfTI
132- ` --pred_ct ` Path to the predicted CT NIfTI
133- ` -all ` Run all evaluation metrics
134- ` -specific_metric ` Run only a single metric
123+ ## Full dataset
124+
125+ ``` bash
126+ python eval_dataset.py \
127+ --dataset_path < dataset_path> \
128+ --pred_dir < predictions_dir>
129+ ```
130+
131+ ` <predictions_dir> ` must contain one sub-folder per subject, each with ` ct.nii.gz ` and ` pet.nii.gz ` .
135132
136133------------------------------------------------------------------------
137134
138- # Example
135+ # Arguments
139136
140- Run all metrics:
137+ ## ` eval_case.py `
141138
142- ``` bash
143- python eval.py --subject_path /data/sub-000 --pred_pet /results/pred_pet.nii.gz --pred_ct /results/pred_ct.nii.gz -all
144- ```
139+ Argument Description
140+ -------------------- ---------------------------------
141+ ` --subject_path ` Path to the subject directory (must contain ` ct-label/ ` and ` pet-label/ ` )
142+ ` --pred_pet ` Path to the predicted PET NIfTI (optional)
143+ ` --pred_ct ` Path to the predicted CT NIfTI (optional)
145144
146- Run only CT μ-MAE:
145+ ## ` eval_dataset.py `
147146
148- ``` bash
149- python eval.py --subject_path /data/sub-000 --pred_pet /results/pred_pet.nii.gz --pred_ct /results/pred_ct.nii.gz -specific_metric ct_mae
150- ```
147+ Argument Description
148+ -------------------- -------------------------------------------------------
149+ ` --dataset_path ` Root directory containing subject folders with ground-truth labels
150+ ` --pred_dir ` Directory with one sub-folder per subject (each containing ` ct.nii.gz ` and ` pet.nii.gz ` )
151+ ` --subjects ` Optional explicit list of subject IDs (default: all sub-folders in pred_dir)
151152
152153------------------------------------------------------------------------
153154
154- # Available Metrics
155+ # Example
155156
156- The following metrics can be executed individually :
157+ Evaluate a single subject :
157158
158- whole_body_mae
159- brain_outlier
160- organ_bias
161- ct_mae
159+ ``` bash
160+ python eval_case.py \
161+ --subject_path /data/sub-000 \
162+ --pred_pet /results/sub-000/pet.nii.gz \
163+ --pred_ct /results/sub-000/ct.nii.gz
164+ ```
162165
163- Example :
166+ Evaluate a full dataset :
164167
165168``` bash
166- python eval.py --subject_path < subject_path> --pred_pet < pred_pet> --pred_ct < pred_ct> -specific_metric whole_body_mae
169+ python eval_dataset.py \
170+ --dataset_path /data/bic-mac/train \
171+ --pred_dir /results/my_method
167172```
168173
169174------------------------------------------------------------------------
@@ -174,9 +179,8 @@ python eval.py --subject_path <subject_path> --pred_pet <pred_pet> --pred_ct <pr
174179 Subject: sub-000
175180 ----------------------------------------------------
176181 Whole-body SUV MAE : 0.124512
177- Brain Outlier Score : 0.912341
178182 Organ Bias : 6.382100%
179- CT μ- MAE : 0.000218
183+ CT MAE : 0.000218
180184 ====================================================
181185
182186------------------------------------------------------------------------
0 commit comments