Hey,
I am trying to move my code to the new torchvsion API that uses read_image to torchscript my preprocessing with the model.
But…
I found that the resize method on a PIL image is different that the resize method now on the tensor_image. Maybe I am missing something, what I am doing on the model now is:
        self.transforms = nn.Sequential(
            T.Resize([192, 256]), 
            T.ConvertImageDtype(torch.float),
            T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
        )

As you can see, it appears that the resizing on the torch tensor is coarser.
image1417×1731 191 KB
So if my model was trained using the old API with PIL, it produces weird reults on this coarser images.
This is very similar to opencv.imread no antialising method.
PD: The cast methods are just to show the tensors, this comes from fastai.