Why torchvision doesn't use opencv?

Alternatively if you want speed and full Pillow compat, you can also easily replace Pillow by Pillow-SIMD.

Benchmarks: https://python-pillow.org/pillow-perf/

And be careful on the algorithm you choose. For example there are clear tradeoff in image quality vs resizing speed for Lanczos vs bicubic vs bilinear interpolations/

Hi all, I have rewritren the “transforms” in torchvision package with cv2.