def transform_tr(self, sample):
        composed_transforms = transforms.Compose([
            tr.RandomHorizontalFlip(),
            tr.RandomVerticalFlip(),
            tr.RandomRotate(180),
            tr.RandomScaleCrop(base_size=400, crop_size=400, fill=0),
            tr.RandomGaussianBlur(),
            # tr.Normalize(),
            tr.Normalize(mean=(0.2382, 0.2741, 0.3068),
                         std=(0.1586, 0.1593, 0.1618)),
            tr.ToTensor(),
        ])

        return composed_transforms(sample)
Exemple #2
0
    def transform_tr(self, sample):
        composed_transforms = transforms.Compose([
            #tr.FixScaleCrop(400),
            tr.RandomHorizontalFlip(),
            tr.RandomVerticalFlip(),
            tr.RandomRotate(180),
            tr.RandomScaleCrop(base_size=400, crop_size=400, fill=0),
            tr.RandomGaussianBlur(),
            tr.Normalize(mean=self.mean_std[0], std=self.mean_std[1]),
            tr.ToTensor(),
        ])

        #print(self.mean_std)
        return composed_transforms(sample)
Exemple #3
0
    def transform_tr(self, sample):
        composed_transforms = transforms.Compose([
            tr.RandomHorizontalFlip(),
            tr.RandomVerticalFlip(),
            tr.RandomRotate(180),
            tr.RandomScaleCrop(base_size=400, crop_size=400, fill=0),
            tr.RandomGaussianBlur(),
            # tr.Normalize(),
            tr.Normalize(mean=(0.1420, 0.2116, 0.2823),
                         std=(0.0899, 0.1083, 0.1310)),
            tr.ToTensor(),
        ])

        return composed_transforms(sample)
Exemple #4
0
    def transform_tr(self, sample):
        composed_transforms = transforms.Compose([
            tr.RandomHorizontalFlip(),
            tr.RandomVerticalFlip(),
            tr.RandomRotate(180),
            tr.RandomScaleCrop(base_size=400, crop_size=400, fill=0),
            tr.RandomGaussianBlur(),
            # tr.Normalize(),
            tr.Normalize(mean=(0.3441, 0.3809, 0.4014),
                         std=(0.1883, 0.2039, 0.2119)),
            tr.ToTensor(),
        ])

        return composed_transforms(sample)