def transform_tr(self, sample): composed_transforms = transforms.Compose([ tr.FixedResize(size=(1024, 2048)), tr.ColorJitter(), tr.RandomGaussianBlur(), tr.RandomMotionBlur(), tr.RandomHorizontalFlip(), tr.RandomScaleCrop(base_size=self.args.base_size, crop_size=self.args.crop_size, fill=255), tr.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)), tr.ToTensor()]) return composed_transforms(sample)
def transforms_train_esp(self, sample): composed_transforms = transforms.Compose([ tr.RandomVerticalFlip(), tr.RandomHorizontalFlip(), tr.RandomAffine(degrees=40, scale=(.9, 1.1), shear=30), tr.ColorJitter(brightness=0.5, contrast=0.5, saturation=0.5), tr.FixedResize(size=self.input_size), tr.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), tr.ToTensor() ]) return composed_transforms(sample)
def transform_tr(self, sample): composed_transforms = transforms.Compose([ tr.ColorJitter(brightness=0.5, contrast=0.5, saturation=0.5), #tr.RandomGaussianBlur(), tr.HorizontalFlip(), tr.RandomScale(), tr.RandomCrop(size=(self.args.crop_size, self.args.crop_size)), tr.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)), tr.ToTensor() ]) return composed_transforms(sample)
def transform_tr(self, sample): composed_transforms = transforms.Compose([ tr.RandomHorizontalFlip(), tr.RandomScaleCrop(base_size=513, crop_size=513), tr.ColorJitter(brightness=0.3, contrast=0.3, saturation=0.3, hue=0.3, gamma=0.3), tr.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)), tr.ToTensor() ]) return composed_transforms(sample)