title: Tensorflow load image dataset with image labels
body: <p>I'm trying to find an easy way to get my data into a TensorFlow dataset without having to load it before and process it as a NumPy array.</p>
  <p>In this case, I'm working on a segmentation model and my data is structured so one directory has the training data images and a different directory has the 'masks', essentially also images.</p>
  <p>With <code>tf.keras.preprocessing.image_dataset_from_directory</code>, I can load an image dataset and it will either set the labels as the name of the directory or let me set them myself through a function argument but it won't let me set an argument so it takes labels from a different directory. I'm reading through the documentation but I don't see an easy way to load these types of datasets where the labels are images on their own.</p>