Replies: 1 comment
-
Hi @lg2578, seems you directly sent output to
Hope it can help you, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
my codes:
error messages:
ValueError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/skimage/morphology/misc.py in remove_small_objects(ar, min_size, connectivity, in_place)
124 try:
--> 125 component_sizes = np.bincount(ccs.ravel())
126 except ValueError:
<array_function internals> in bincount(*args, **kwargs)
ValueError: 'list' argument must have no negative elements
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/monai/transforms/transform.py in apply_transform(transform, data, map_items, unpack_items, log_stats)
101 return [_apply_transform(transform, item, unpack_items) for item in data]
--> 102 return _apply_transform(transform, data, unpack_items)
103 except Exception as e:
/opt/conda/lib/python3.7/site-packages/monai/transforms/transform.py in _apply_transform(transform, parameters, unpack_parameters)
65
---> 66 return transform(parameters)
67
/opt/conda/lib/python3.7/site-packages/monai/transforms/post/array.py in call(self, img)
388 """
--> 389 return remove_small_objects(img, self.min_size, self.connectivity, self.independent_channels)
390
/opt/conda/lib/python3.7/site-packages/monai/transforms/utils.py in remove_small_objects(img, min_size, connectivity, independent_channels)
1039
-> 1040 out_np = morphology.remove_small_objects(img_np, min_size, connectivity)
1041 out, *_ = convert_to_dst_type(out_np, img)
/opt/conda/lib/python3.7/site-packages/skimage/morphology/misc.py in remove_small_objects(ar, min_size, connectivity, in_place)
126 except ValueError:
--> 127 raise ValueError("Negative value labels are not supported. Try "
128 "relabeling the input with
scipy.ndimage.label
or "ValueError: Negative value labels are not supported. Try relabeling the input with
scipy.ndimage.label
orskimage.morphology.label
.The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last)
/tmp/ipykernel_17/2975415042.py in
18 test_outputs = sliding_window_inference(
19 test_inputs, roi_size, sw_batch_size, model)
---> 20 test_outputs = [post_pred_val(i) for i in decollate_batch(test_outputs)]
21 test_labels = [post_label(i) for i in decollate_batch(test_labels)]
22 #
/tmp/ipykernel_17/2975415042.py in (.0)
18 test_outputs = sliding_window_inference(
19 test_inputs, roi_size, sw_batch_size, model)
---> 20 test_outputs = [post_pred_val(i) for i in decollate_batch(test_outputs)]
21 test_labels = [post_label(i) for i in decollate_batch(test_labels)]
22 #
/opt/conda/lib/python3.7/site-packages/monai/transforms/compose.py in call(self, input_)
172 def call(self, input_):
173 for transform in self.transforms:
--> 174 input = apply_transform(transform, input, self.map_items, self.unpack_items, self.log_stats)
175 return input_
176
/opt/conda/lib/python3.7/site-packages/monai/transforms/transform.py in apply_transform(transform, data, map_items, unpack_items, log_stats)
127 else:
128 _log_stats(data=data)
--> 129 raise RuntimeError(f"applying transform {transform}") from e
130
131
RuntimeError: applying transform <monai.transforms.post.array.RemoveSmallObjects object at 0x7ff51bc439d0>
Beta Was this translation helpful? Give feedback.
All reactions