Prediction configuration¶
Prediction configuration lives under the Predictor root object.
Predictor:
Model:
classpath: segmentation.UNet.UNet
UNet:
...
Dataset:
...
outputs_dataset:
...
train_name: SEG_BASELINE
Top-level fields¶
Field |
Type |
Default in code |
Required |
Effect |
|---|---|---|---|---|
|
mapping |
|
Yes |
Selects the model class used for prediction. |
|
mapping |
|
Yes |
Defines inference data loading and test-time augmentation. |
|
mapping |
default output dataset |
Yes in practice |
Controls which outputs are written to disk and how. |
|
string |
|
No |
Reduces outputs across multiple checkpoints. |
|
string |
|
Yes in practice |
Names the prediction run and output folder. |
|
int or null |
|
No |
Optional seed. |
|
list or null |
|
No |
Module placement optimization. |
|
bool |
|
No |
Enables AMP during inference. |
|
list or null |
|
No |
Optional TensorBoard logging. |
Predictor.Model¶
Prediction uses the same classpath convention as training:
Model:
classpath: Model:UNetpp5
outputs_criterions: {}
In most prediction configs:
you select the architecture
you keep only the inference-relevant parameters
you disable or simplify training-only criteria
Checkpoint loading is controlled by the CLI argument --models, not by the YAML
file itself.
Predictor.Dataset¶
Prediction datasets are instantiated through DataPrediction.
Key fields:
Field |
Type |
Effect |
|---|---|---|
|
list[str] |
Input dataset sources. |
|
mapping |
Input groups and preprocessing transforms. |
|
mapping |
Test-time augmentation definitions. |
|
mapping |
Sliding-window or slice-wise inference setup. |
|
object |
Restricts evaluated cases. |
|
int |
Number of patches per inference batch. |
outputs_dataset¶
outputs_dataset defines how selected model outputs become files on disk.
outputs_dataset:
Head:Tanh:
OutputDataset:
name_class: OutSameAsGroupDataset
group: sCT
same_as_group: MR:MR
reduction: Mean
Important nested fields:
Field |
Effect |
|---|---|
output key |
Selects the model output to export. |
|
Selects the output dataset implementation. |
|
Output group name written to disk. |
|
Destination dataset path and format. |
|
Geometry reference group for exported volumes. |
|
Applied before combining ensemble or TTA outputs. |
|
Applied after reduction. |
|
Final transforms applied before writing. |
|
Combines multiple predictions, usually |
|
Optional patch reassembly strategy. |
Examples¶
See:
examples/Segmentation/Prediction.ymlexamples/Synthesis/Prediction.yml