Closed ungi closed 1 year ago
What do you think about something like this in the config file?
transforms:
general:
# Basic transforms, do not modify
- name: "Transposed"
params:
keys: ["image", "label"]
indices: [2, 0, 1]
- name: "ToTensord"
- name: "EnsureTyped"
params:
keys: ["image", "label"]
dtype: "float32"
# Add additional transforms here
- name: "Resized"
params:
keys: ["image", "label"]
spatial_size: [128, 128]
train:
- name: "RandGaussianNoised"
params:
keys: ["image"]
prob: 0.15
mean: 0.0
std: 0.1
The general transforms would be applied to both training and validation images while the train transforms are only applied to the training data.
Looks good to me. Thanks!
Some transforms should be used for both training and validation data, like resize and normalization. But some transforms like noise, crop, rotation, should only be applied to the training data.