Esempio n. 1
0
 def __init__(self,
              target_size,
              max_sum=None,
              max_angle=None,
              border_value=0,
              method=F.ResizeMethod.BILINEAR):
     self.target_size = normalize_tuple(target_size, 2, 'target_size')
     self.max_sum = float(max_sum) if max_sum is not None else 80.
     self.max_angle = normalize_tuple(max_angle, 3, 'max_angle')\
         if max_angle is not None else (40, 40, 10)
     self.border_value = border_value
     self.method = method
Esempio n. 2
0
 def __init__(self,
              target_size,
              method=F.ResizeMethod.BILINEAR,
              random_offset=False,
              border_value=0):
     self.target_size = normalize_tuple(target_size, 2, 'target_size')
     self.method = method
     self.random_offset = random_offset
     self.border_value = border_value
Esempio n. 3
0
 def __init__(self,
              target_size,
              angle_range=None,
              scale_range=None,
              offset_center=True,
              border_value=0,
              method=F.ResizeMethod.BILINEAR):
     self.target_size = normalize_tuple(target_size, 2, 'target_size')
     self.angle_range = angle_range if angle_range is not None else (-30,
                                                                     30)
     self.scale_range = scale_range if scale_range is not None else (0.8,
                                                                     1.1)
     self.offset_center = offset_center
     self.border_value = border_value
     self.method = method
Esempio n. 4
0
 def __init__(self, crop_size, method=F.ResizeMethod.BILINEAR):
     self.crop_size = normalize_tuple(crop_size, 2, 'crop_size')
     self.method = method
Esempio n. 5
0
 def __init__(self, target_size, random_offset=False):
     self.target_size = normalize_tuple(target_size, 2, 'target_size')
     self.random_offset = random_offset
Esempio n. 6
0
 def __init__(self, crop_size):
     self.crop_size = normalize_tuple(crop_size, 2, 'crop_size')