tf.data vs tf.keras.preprocessing.image.ImageDataGenerator
the main difference is that ImageDataGenerator uses Pillow library for loading and preprocessing image and tf.data uses tf.image pre-processing technique. ImageDataGenerator returns a batches of tensor Images.Also tf.data uses functions like prefetch,cache to improve the efficiency of preparing the dataset.
I was reading about different techniques to load large data efficiently. The tf.data seems to perform well as compared to tf.keras.preprocessing.imageImageDataGenerator.  
To what I know is, tf.data uses CPU pipelining to efficiently load the data and process it so that model training is continuous and fast. But I did not understand how these two techniques are different and in what way. If anybody can explain this I would highly appreciate it.