(self, img, lbl)
return F.resize(img, target_size, self.interpolation), F.resize(lbl, target_size, Image.NEAREST)
Args:
            img (PIL Image): Image to be scaled.
            lbl (PIL Image): Label to be scaled.
        Returns:
            PIL Image: Rescaled image.
            PIL Image: Rescaled label.
Args:
            img (PIL Image): Image to be scaled.
            lbl (PIL Image): Label to be scaled.
        Returns:
            PIL Image: Rescaled image.
            PIL Image: Rescaled label.
Args : img ( PIL Image ) : Image to be scaled . lbl ( PIL Image ) : Label to be scaled . Returns : PIL Image : Rescaled image . PIL Image : Rescaled label .
def __call__(self, img, lbl):
        """
        Args:
            img (PIL Image): Image to be scaled.
            lbl (PIL Image): Label to be scaled.
        Returns:
            PIL Image: Rescaled image.
            PIL Image: Rescaled label.
        """
        assert img.size == lbl.size
        target_size = ( int(img.size[1]*self.scale), int(img.size[0]*self.scale) ) # (H, W)
        return F.resize(img, target_size, self.interpolation), F.resize(lbl, target_size, Image.NEAREST)
def __call__ ( self , img , lbl ) : assert img . size == lbl . size target_size = ( int ( img . size [ 1 ] * self . scale ) , int ( img . size [ 0 ] * self . scale ) ) # (H, W) return F . resize ( img , target_size , self . interpolation ) , F . resize ( lbl , target_size , Image . NEAREST )