I am loading in grayscale images of 1024*1024. I had to turn it into 3 channels by repeating it as I am passing it to a pretrained resnet. The images are in dicom format which I use pydicom to load them in. But the major overhead is still in the transforms call…