Solved by ptrblck in post #4 
              
              
                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 …