What did you do?
image = Image.open(image_filepath)
while using PyTorch data loader with 8 workers.
What did you expect to happen?
Fast
What actually happened?
Slow
What are your OS, Python and Pillow versions?
- OS: Linux
- Python: 3.10.13
- Pillow: 10.2.0
Reading PNG images with Pillow is faster.
For me, current workaround is to use https://github.com/kodonnell/qoi from PyPI (qoi package). It is faster when I switched to it. To compare:
image = qoi.read(image_filepath)
Image sizes are regular, like 800x480, 1280x600.