I noticed that the
MaskBlock also contains an
IntToFloatTensor batch transformation and I wonder why it is there. Batch transforms are not applied to label masks if you build a U-Net learner with fastai (after all you want the masks as int tensors). Is this a bug or am I missing something?
def MaskBlock(codes=None): "A `TransformBlock` for segmentation masks, potentially with `codes`" return TransformBlock(type_tfms=PILMask.create, item_tfms=AddMaskCodes(codes=codes), **batch_tfms=IntToFloatTensor**)