Spacingd weird behaviour #5349
Unanswered
nicktasios
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I haven't looked into the details, but there's a fix in 1.0.1 related to this, could you please try the issue is usually caused by not having a channel dimension, so 3D image is interpreted as chn+2D train_transforms = Compose([
LoadImaged(keys=["image", "label"]),
+ EnsureChannelFirstd(keys=["image", "label"]),
MapLabelValued(
keys=["label"],
orig_labels=[0]+[x+1 for x in range(len(labels)-1)],
target_labels=[0]+[1 for x in range(len(labels)-1)]
), |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I separated the preprocessing of my data, so that I have fewer transforms to run during training.
The transformed images and labels are saved in a new folder and the next script loads the data for training:
After performing the
Spacingd
step, the affine matrix becomes three-dimensional, e.g.:from
to
I something going wrong when saving and loading back, or is this some kind of bug, perhaps due to some limitations with nifti?
Beta Was this translation helpful? Give feedback.
All reactions