I have a
custom_transform variable defined as follows:
custom_transforms = Compose([ RandomResizedCrop(size=224, scale=(0.8, 1.2)), RandomRotation(degrees=(-30, 30)), RandomHorizontalFlip(p=0.5), ToTensor(), Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)), RandomNoise(p=0.5, mean=0, std=0.1)])
I use this to apply transformations on input images through
__getitem__ method. I have 3 images in each sample returned by
The first image is the target image which I generate it dynamically from input and my input is the ground truth. Finally, the third image is also generated using some modification on the target image.
Now the question is, I do not want to use
Normalize on the second and third images, but will same random transforms like
Flip, etc happen on ground truth?
I have read some issues on Github and it seems random seed resets somehow.
Here is what I have done:
transform_gt = Compose(custom_transform.transforms[:-1])
Thanks for any advices