          elif task == "reload":
              func = self.reload_images
          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
 
</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)) </s> remove     def load_images(self):
        """ Load the images """
 </s> add         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.
        """ </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 threaded_io(self, task, io_args=None):
        """ Perform I/O task in a background thread """
 </s> add     def _threaded_redirector(self, task, io_args=None):
        """ Redirect image input/output tasks to relevant queues in background thread

        Parameters
        ----------
        task: str
            The name of the task to be put into a background thread
        io_args: tuple, optional
            Any arguments that need to be provided to the background function
        """
        self._threads.append(io_thread)

    def _load(self):
        """ Load the images
          elif task == "reload":
              func = self.reload_images
          io_thread = MultiThread(func, *io_args, thread_count=1)
          io_thread.start()
        self._threads.append(io_thread)

    def _load(self):
        """ Load the images
  
      def load_images(self):
          """ Load the images """
          logger.debug("Load Images: Start")
          load_queue = self.extractor.input_queue
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 
scripts/extract.py