data_transform = transforms.Compose([
transforms.Resize((229,229)),
transforms.RandomResizedCrop((229,229)),
transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
transforms.Normalize(mean=[unknown],
std=[unknown])
])
In order to use Data Transforms like this on my own training set, I first need to calculate the mean and standard deviation of my images in the training set which is [87.92133030884222, 89.66749718221185, 81.1012737560522] and [53.17980884, 51.26849681, 51.69558279].
Now I am wondering after applying random sized crop and random horizontal flip which essentially is generating more training examples in the data loader object so surely now my standard deviation and mean of the images will change a little bit.
What is the workaround of this or rather people tend to normalise images first upfront to the [0,1] for all three channels and apply a vanilla mean and variance like [0.5,0.5,0.5] and [0.5,0.5,0.5]?
Thank you!