title: ImageDataGenerator for semantic segmentation
body: <p>I am trying to do semantic segmentation with Keras and when trying to load the images i get this error using <code>flow_from_directory</code> method.</p>
  
  <pre><code>Found 0 images belonging to 0 classes.
  Found 0 images belonging to 0 classes.
  </code></pre>
  
  <p>This is my code.</p>
  
  <pre><code>from tensorflow.keras.applications.resnet50 import preprocess_input
  from tensorflow.keras.preprocessing.image import ImageDataGenerator
  
  data_generator = ImageDataGenerator()
  train_generator = data_generator.flow_from_directory(
                                          directory="../input/Training_dataset/Images",
                                          target_size=(IMG_SIZE, IMG_SIZE),
                                          batch_size=16,
                                          class_mode=None,
                                          classes=None
                                          )
  
  mask_generator = data_generator.flow_from_directory(
      directory="../input/Training_dataset/Masks/all",
      class_mode=None,
      classes=None,
      batch_size = 1,
      )
  </code></pre>
  
  <p>I have read this question but solution  didnt work <a href="https://stackoverflow.com/questions/45510403/keras-for-semantic-segmentation-flow-from-directory-error">Keras for semantic segmentation, flow_from_directory() error</a></p>