JCruan519/VM-UNet

About resize

Opened this issue · 1 comments

good job! May I ask whether the nearest should be interpolated for mask resize so as not to change the value of mask? thank you!

  class myResize:
      def __init__(self, size_h=256, size_w=256):
          self.size_h = size_h
          self.size_w = size_w
  
      def __call__(self, data):
          image, mask = data
          # TODO image 使用双线性插值对图像进行缩放,mask使用最近邻插值对掩码进行缩放
          return TF.resize(image, [self.size_h, self.size_w], TF.InterpolationMode.BILINEAR), \
                 TF.resize(mask, [self.size_h, self.size_w], TF.InterpolationMode.NEAREST)
               

@LiuPengJX
Hello, I think it's best to ensure that the same interpolation method is used for both the image and the mask here.