Increasing the contrast of images in pytorch transform

I have a cnn network and I want to increase the image contrast, I use the code below:
trfm_train = transforms.Compose([transforms.Resize((sz1,sz2)),

                      transforms.ToTensor(),

                      transforms.ColorJitter(brightness=(0.5,1.5), contrast=(1), saturation=(0.5,1.5), hue=(-0.1,0.1)),

                      transforms.RandomHorizontalFlip(p=0.5),

                      transforms.RandomRotation(45, resample=False, expand=False, center=None),

                      transforms.Normalize([0.485,0.456,0.406], [0.229, 0.224,0.225])])

but I want to increase the contrast and resolution of my images. how can I do it?

Similar question answered here. The docs give you the information:

  • contrast (float or tuple of python:float ( min , max )) – How much to jitter contrast. contrast_factor is chosen uniformly from [max(0, 1 - contrast), 1 + contrast] or the given [min, max]. Should be non negative numbers.

If you want to change the resolution on the image, change sz1 and sz2 to the desired values.