      >>> loader = BackgroundIO('/path/to/faces/folder', 'load', load_with_hash=True)
      >>> for filename, image, sha1_hash in loader.load():
      >>>     <do processing>
  
      Saving out images:
  
      >>> saver = BackgroundIO('/path/to/save/folder', 'save')
      >>> for filename, image in <image_iterator>:
      >>>     saver.save(filename, image)
      >>> saver.close()
 
</s> remove     >>> loader = BackgroundIO('/path/to/faces/folder', 'load', load_with_hash=True)
 </s> add     >>> loader = ImagesLoader('/path/to/faces/folder', load_with_hash=True) </s> remove     >>> saver = BackgroundIO('/path/to/save/folder', 'save')
    >>> for filename, image in <image_iterator>:
    >>>     saver.save(filename, image)
    >>> saver.close()
    """
 </s> add         args = (load_with_hash, )
        super().__init__(path, queue_size=queue_size, args=args)
        self._skip_list = set() if skip_list is None else set(skip_list) </s> remove     >>> loader = BackgroundIO('/path/to/video.mp4', 'load')
 </s> add     >>> loader = ImagesLoader('/path/to/video.mp4') </s> remove     def __init__(self, path, task, load_with_hash=False, queue_size=16):
        logger.debug("Initializing %s: (path: %s, task: %s, load_with_hash: %s, queue_size: %s)",
                     self.__class__.__name__, path, task, load_with_hash, queue_size)
        self._location = path
 </s> add         self._is_video = self._check_for_video()
    def __init__(self, path, queue_size=8, load_with_hash=False, fast_count=True, skip_list=None):
        logger.debug("Initializing %s: (path: %s, queue_size: %s, load_with_hash: %s, "
                     "fast_count: %s)", self.__class__.__name__, path, queue_size,
                     load_with_hash, fast_count)
      >>> loader = BackgroundIO('/path/to/faces/folder', 'load', load_with_hash=True)
      >>> for filename, image, sha1_hash in loader.load():
      >>>     <do processing>
  
    def __init__(self, path, queue_size=8, load_with_hash=False, fast_count=True, skip_list=None):
        logger.debug("Initializing %s: (path: %s, queue_size: %s, load_with_hash: %s, "
                     "fast_count: %s)", self.__class__.__name__, path, queue_size,
                     load_with_hash, fast_count)
  
      >>> saver = BackgroundIO('/path/to/save/folder', 'save')
      >>> for filename, image in <image_iterator>:
      >>>     saver.save(filename, image)
      >>> saver.close()
keep keep keep keep replace keep keep keep keep keep
 scripts.extract - code optimizations

Limit queue sizes to reduce RAM usage
Rename lib.image.BackgroundIO to ImageIO
Create separate ImagesLoader and ImagesSaver classes
Load/Save images from centralized lib.image.ImageIO
scripts.extract documentation 
lib/image.py