Hey,
I am using a pretrained network and wanted to normalize my images according to the ImageNet.
For some reason however the images look really weird after the normalization.
Can someone explain to me why this is happening?
image786×834 415 KB
(with normalization)
image787×830 166 KB
(without normalization)
Here is the code of the transform (I build my own):
import torchvision.transforms.functional as TF

class my_transform:
    def __init__(self):
        #my_parameters

    def __call__(self, img, label=False):
        #(some other transforms like Horizontal flip)
        img = TF.to_tensor(img)
        if not label:
            img = TF.normalize(img, mean=[0.485, 0.456, 0.406],
                               std=[0.229, 0.224, 0.225])
        return img


any help is much appreciated!