(self, root, dataset, crop_size=[473, 473], scale_factor=0.25,
                 rotation_factor=30, ignore_label=255, transform=None)
:rtype:
:rtype:
: rtype :
def __init__(self, root, dataset, crop_size=[473, 473], scale_factor=0.25,
                 rotation_factor=30, ignore_label=255, transform=None):
        """
        :rtype:
        """
        self.root = root
        self.aspect_ratio = crop_size[1] * 1.0 / crop_size[0]
        self.crop_size = np.asarray(crop_size)
        self.ignore_label = ignore_label
        self.scale_factor = scale_factor
        self.rotation_factor = rotation_factor
        self.flip_prob = 0.5
        self.flip_pairs = [[0, 5], [1, 4], [2, 3], [11, 14], [12, 13], [10, 15]]
        self.transform = transform
        self.dataset = dataset

        list_path = os.path.join(self.root, self.dataset + '_id.txt')

        self.im_list = [i_id.strip() for i_id in open(list_path)]
        self.number_samples = len(self.im_list)
def __init__ ( self , root , dataset , crop_size = [ 473 , 473 ] , scale_factor = 0.25 , rotation_factor = 30 , ignore_label = 255 , transform = None ) : self . root = root self . aspect_ratio = crop_size [ 1 ] * 1.0 / crop_size [ 0 ] self . crop_size = np . asarray ( crop_size ) self . ignore_label = ignore_label self . scale_factor = scale_factor self . rotation_factor = rotation_factor self . flip_prob = 0.5 self . flip_pairs = [ [ 0 , 5 ] , [ 1 , 4 ] , [ 2 , 3 ] , [ 11 , 14 ] , [ 12 , 13 ] , [ 10 , 15 ] ] self . transform = transform self . dataset = dataset list_path = os . path . join ( self . root , self . dataset + '_id.txt' ) self . im_list = [ i_id . strip ( ) for i_id in open ( list_path ) ] self . number_samples = len ( self . im_list )