If I’m not mistaken, OpenCV reads the image as [height, width, channels], while PIL.Image returns the array as [channels, height, width].
The torch::from_blob call might thus interleave the pixels. Have you checked the outputs?
Also, resize should use the linear interpolation by default in OpenCV while PIL uses nearest neighbors by default.
Could you check the results separately?