JCruan519 / VM-UNet

(ARXIV24) This is the official code repository for "VM-UNet: Vision Mamba UNet for Medical Image Segmentation".
Apache License 2.0
471 stars 22 forks source link

About resize #51

Open LPeng625 opened 5 months ago

LPeng625 commented 5 months ago

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)
JCruan519 commented 4 months ago

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