I want to apply color augmentation by applying a transfrom.ColorJitter to my dataset that I feed into a Resnet. I’m not sure though whether I should normalise the image using the ImageNet mean and STD before or after the augmentation.
transfrom.ColorJitter
Any ideas what’s the correct approach?
Many thanks
In the samples I have seen so far, the ColorJitter is used prior to normalizing. You can check this out : fastai_imagenet training script
ColorJitter
train_tfms = transforms.Compose([ transforms.RandomResizedCrop(size), transforms.RandomHorizontalFlip(), transforms.ColorJitter(.4,.4,.4), transforms.ToTensor(), Lighting(0.1, __imagenet_pca['eigval'], __imagenet_pca['eigvec']), normalize, ])