coolblaze03's picture
Upload folder using huggingface_hub
907001b verified
Raw
History Blame Contribute Delete
635 Bytes
def __hi2lo_multiscale_indexes(self, mask, orig_shape):
"""pass"""
mask_orig = zoom_to_shape(mask, orig_shape, dtype=np.int8)
inds_small = np.arange(mask.size).reshape(mask.shape)
inds_small_in_orig = zoom_to_shape(inds_small, orig_shape, dtype=np.int8)
inds_orig = np.arange(np.prod(orig_shape)).reshape(orig_shape)
inds_orig += np.max(inds_small_in_orig) + 1
inds_small_in_orig[mask_orig == True] = inds_orig[mask_orig == True]
inds = inds_small_in_orig
inds = relabel_squeeze(inds)
logger.debug('Index after relabeling: %s', scipy.stats.describe(inds, axis=None))
return (inds, mask_orig)