          io_thread = MultiThread(func, *io_args, thread_count=1)
          io_thread.start()
          self.threads.append(io_thread)
  
      def load_images(self):
          """ Load the images """
          logger.debug("Load Images: Start")
          load_queue = self.extractor.input_queue
          idx = 0
          for filename, image in self.images.load():
              idx += 1
 
</s> remove         self.threads.append(io_thread)
 </s> add         self._threads.append(io_thread)

    def _load(self):
        """ Load the images </s> remove         load_queue = self.extractor.input_queue
        idx = 0
        for filename, image in self.images.load():
            idx += 1
 </s> add         load_queue = self._extractor.input_queue
        for filename, image in self._images.load(): </s> remove         load_queue = self.extractor.input_queue
        idx = 0
        for filename, image in self.images.load():
            idx += 1
 </s> add         load_queue = self._extractor.input_queue
        for filename, image in self._images.load(): </s> remove     def reload_images(self, detected_faces):
        """ Reload the images and pair to detected face """
 </s> add     def _reload(self, detected_faces):
        """ Reload the images and pair to detected face

        When the extraction pipeline is running in serial mode, images are reloaded from disk,
        paired with their extraction data and passed back into the extraction queue

        Parameters
        ----------
        detected_faces: dict
            Dictionary of detected_faces with the filename as its key and a list of
            :class:`lib.faces_detect.DetectedFace` as the values for pairing with reloaded images.
        """ </s> remove         if task == "load":
            func = self.load_images
        elif task == "save":
            func = self.save_faces
        elif task == "reload":
            func = self.reload_images
 </s> add         func = getattr(self, "_{}".format(task))
        Loads images from :class:`lib.image.ImagesLoader`, formats them into a dict compatible
        with :class:`plugins.extract.Pipeline.Extractor` and passes them into the extraction queue.
        """
          io_thread = MultiThread(func, *io_args, thread_count=1)
          io_thread.start()
          self.threads.append(io_thread)
  
        Loads images from :class:`lib.image.ImagesLoader`, formats them into a dict compatible
        with :class:`plugins.extract.Pipeline.Extractor` and passes them into the extraction queue.
        """
        Loads images from :class:`lib.image.ImagesLoader`, formats them into a dict compatible
        with :class:`plugins.extract.Pipeline.Extractor` and passes them into the extraction queue.
        """
          logger.debug("Load Images: Start")
          load_queue = self.extractor.input_queue
          idx = 0
          for filename, image in self.images.load():
              idx += 1
keep keep keep keep replace 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 
scripts/extract.py