Skip to content
Snippets Groups Projects
Commit 060f6991 authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Allow multichannel raw and single-channel mask to pass assertion

parent 74cbb1dd
No related branches found
No related tags found
3 merge requests!37Release 2024.04.19,!34Revert "Temporary error-handling for debug...",!29Dev multichannel classifiers
...@@ -85,7 +85,7 @@ class InstanceSegmentationModel(ImageToImageModel): ...@@ -85,7 +85,7 @@ class InstanceSegmentationModel(ImageToImageModel):
""" """
if not mask.is_mask(): if not mask.is_mask():
raise InvalidInputImageError('Expecting a binary mask') raise InvalidInputImageError('Expecting a binary mask')
if not img.shape == mask.shape: if img.hw != mask.hw or img.nz != mask.nz:
raise InvalidInputImageError('Expect input image and mask to be the same shape') raise InvalidInputImageError('Expect input image and mask to be the same shape')
def label_patch_stack(self, img: PatchStack, mask: PatchStack, **kwargs): def label_patch_stack(self, img: PatchStack, mask: PatchStack, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment