title: Can I skip files using Keras ImageDataGenerator().flow_from_directory on MacOS?
body: <p>I've downloaded an image set with 10 images in each of 7 classes for a total of 70 images. However, each of the class folders now has 20 files in it: a <code>._</code> (dot-underscore) file has been created for each individual .jpeg file. I'm only able to see these if I run an <code>os.listdir()</code>, meaning I can't see them using the Finder. I could try to move them using the <code>os</code> command, but I'm not sure what that would do to the system.</p>
  
  <p>Is it possible to work around these <code>._</code> files in any way?</p>
  
  <p><code>['51.jpeg',
   '._.DS_Store',
   '._57.jpeg',
   '._56.jpeg',
   '.DS_Store',
   '50.jpeg',
   '._51.jpeg',
   '57.jpeg',
   '56.jpeg',
   '._50.jpeg',
   '._53.jpeg',
   '59.jpeg',
   '55.jpeg',
   '54.jpeg',
   '58.jpeg',
   '._52.jpeg',
   '._59.jpeg',
   '53.jpeg',
   '._55.jpeg',
   '._54.jpeg',
   '52.jpeg',
   '._58.jpeg']</code></p>
  
  <p><strong>EDIT: Added code for ImageDataGenerator</strong></p>
  
  <pre><code>def generator(set_type, TARGET_SIZE, BATCH_SIZE, CLASSES, RANDOM_SEED):
      '''
      set_type (str): "train", "test", "validation"
      returns: ImageDataGenerator().flow_from_directory
      '''
      data_dir = './' + set_type + '_data_keras'
      return ImageDataGenerator().flow_from_directory(data_dir,
                                                      target_size = TARGET_SIZE,
                                                      batch_size = BATCH_SIZE,
                                                      classes = CLASSES,
                                                      seed = RANDOM_SEED)
  
  
  TARGET_SIZE = (224, 224)
  BATCH_SIZE = 5
  CLASSES = ['5', '10', '20', '50', '100', '200', '500']
  RANDOM_SEED = 0
  
  train_generator = generator('train', TARGET_SIZE, BATCH_SIZE,
                              CLASSES, RANDOM_SEED)
  validation_generator = generator('validation', TARGET_SIZE, BATCH_SIZE,
                                   CLASSES, RANDOM_SEED)
  </code></pre>
  
  <p><code>flow_from_directory</code> is looking for a directory to search for <code>CLASSES</code>, so I'm looking for a way to bypass the <code>._</code> files</p>