When calling the
open_mask function, it requires mask image to have the pixels labeled as a mask be 255. This is due to the
_div(255) in the return statement of the
open_mask function, which means that any value below 255 would be smaller than 0. Followed by the
.data property of
ImageMask which returns a
long type which will round everything down to 0.
Is this intended or am I missing something? As most of the time when masks are saved they are labeled as 0 as background, and 1 as foreground. Moreover, what if there are multiple classes in the mask file, even if the mask is multiplied by 255 it still wouldn’t work.