All the work is done in Keras preprocessing layers, which are implemented in TF ops (everything is 100% in-graph!) so it's highly performant. During training (presumably on GPU/TPU) you'd use async preprocessing in TF data to avoid CPU preprocessing being a bottleneck.
Keras Preprocessing Layers: High-Performance In-Graph Implementation
By
–