Closed evanmays closed 3 years ago
Indeed, thanks for the catch ! Was using scipy resize before which used (height, width)
Actually, to reflect the older use a bit more, I would prefer to use scikit image, which under the hood uses PIL but at least keeps the API in the space of tensors only.
https://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.resize
Opinions on it ? Tha would require add scikit image in the requirements and also maybe change the imports in test_disp.py
(https://github.com/ClementPinard/SfmLearner-Pytorch/blob/master/test_disp.py#L3)
We can work on it in this very PR or merge this one and start a new one.
Not having to convert between tensors and Images would definitely be better. Optimally all resizes would use scikit or even torchvision resize transformation.
Unfortunately, I don't have access to the compute resources anymore to battle test more changes
PIL image resize expects (width, height) not (height, width)
https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.resize