OK, if you need to save it frequently, it’ll introduce an overhead, you are right.
I assumed you could save it once “offline” and then just load it in your training script.
What kind of images are you loading, i.e. which format, bit depth etc.?
Maybe we could speed up the loading and transformation by getting rid of some checks so that we trade some generalization for performance.