Beispiel #1
0
 def __call__(self, img):
     """
     Args:
         img (numpy ndarray): Image to be scaled.
     Returns:
         numpy ndarray: Rescaled image.
     """
     size = np.random.randint(self.min, self.max)
     return F.resize(img, (size, size), self.interpolation)
Beispiel #2
0
 def __call__(self, image, normals, illum): #TODO warning f
     image = F.resize(image, self.size, self.interpolation)
     normals = F.resize(normals, self.size, self.interpolation)
     illum = F.resize(illum, self.size, self.interpolation)
     return image, normals, illum
Beispiel #3
0
 def __call__(self, image, normals, illum): 
     size = np.random.randint(self.low, self.high)
     image = F.resize(image, (size,size), self.interpolation)
     normals = F.resize(normals, (size,size), self.interpolation)
     illum = F.resize(illum, (size,size), self.interpolation)
     return image, normals, illum
Beispiel #4
0
 def __call__(self, image,
              normals):  #TODO warning for mask -> nearest interpolation?
     image = F.resize(image, self.size, self.interpolation)
     normals = F.resize(normals, self.size, self.interpolation)
     return image, normals