We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43c7174 commit 1afcc15Copy full SHA for 1afcc15
ants/deeplearn/one_hot_segmentation.py
@@ -42,7 +42,7 @@ def segmentation_to_one_hot(segmentations_array,
42
if number_of_labels < 2:
43
raise ValueError("At least two segmentation labels need to be specified.")
44
45
- image_dimension = len(segmentations_array.shape)
+ image_dimension = len(segmentations_array.shape) - 1
46
47
one_hot_array = np.zeros((*segmentations_array.shape, number_of_labels))
48
for i in range(number_of_labels):
0 commit comments