I have a large set of images I need to prepare for Deep Learning with a Convolutional Neural Network using Tensorflow 2 / Keras. A batch of 61 Images are stored in a zip file with their respective 'masks' (which are simply the segmented version of the image). So for example, zip file Batch-0-of-163.zip contains:
'image-1.png', 'mask-1.png', 'image-2.png', 'mask-2.png' ... 'image-61.png', 'mask-61.png'
Is there a way to create a tensorflow.data.Dataset in Tensorflow 2, that will generate the image and mask data when needed by the GPU for input to my CNN? I want to use a Dataset so I can take advantage of the batching/prefetching functionality provided.