0
$\begingroup$

I am trying a semantic segmentation task for multi-class segmentation. I am wondering what transforms are applied to both images and masks in it. Following are my transforms-

data_transforms = transforms.Compose([transforms.RandomCrop((512,512)),
                             transforms.Lambda(gaussian_blur),
                             transforms.Lambda(elastic_transform),
                             transforms.RandomRotation([+90,+180]),
                             transforms.RandomRotation([+180,+270]),
                             transforms.RandomHorizontalFlip(),
                             transforms.ToTensor(),
                             transforms.Normalize(mean=train_mean, std=train_std)
                           ])

Also, when we use transforms.ToTensor(), it convert the image between 0 and 1 but what it means when we say that image is between 0 and 1. Also, converting to 0 and 1 before normalize will have any effect on the final image?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.