Currently, I have written some Python code that is inserted into a pipeline.
The incoming data comes in in a numpy array of shape (1,512,19,25). I use the scipy.nd
scipy.nd
Check the benchmarks in https://python-pillow.org/pillow-perf/
TL;DR: for most scenarios the fastest way in Python is using pillow-simd.