Solved by TomAvrech in post #2 
              
              
                Ok, since I didn’t find an official solution, mine: 
frame_removal_length = 3 
padding = max(IMAGE_SIZE[0], IMAGE_SIZE[1]) 
rgb = T.functional.resized_crop(rgb, frame_removal_length, frame_removal_length, IMAGE_SIZE[0] - 2 * frame_removal_length, IMAGE_SIZE[1] - 2 * frame_removal_length, IMAGE_SIZE)…