  
      Leverages multi-threading to load multiple images from disk at the same time
      leading to vastly reduced image read times.
  
      Parameters
      ----------
      filenames: list
          A list of ``str`` full paths to the images to be loaded.
 
</s> remove         training, preview and timelapses.
 </s> add         training, preview and time-lapses. </s> remove     """ Batch images from a single side """
 </s> add     """ Handles the processing of a Batch for a single side.

    Parameters
    ----------
    side: {"a" or "b"}
        The side that this :class:`Batcher` belongs to
    images: list
        The list of full paths to the training images for this :class:`Batcher`
    model: plugin from :mod:`plugins.train.model`
        The selected model that will be running this trainer
    use_mask: bool
        ``True`` if a mask is required for training otherwise ``False``
    batch_size: int
        The size of the batch to be processed at each iteration
    config: :class:`lib.config.FaceswapConfig`
        The configuration for this trainer
    """ </s> remove             list of filenames are processed, the data will be reshuffled to make sure thay are not
 </s> add             list of filenames are processed, the data will be reshuffled to make sure they are not </s> remove     def set_timelapse_feed(self, images, batchsize):
        """ Set the timelapse dictionary """
        logger.debug("Setting timelapse feed: (side: '%s', input_images: '%s', batchsize: %s)",
                     self.side, images, batchsize)
        self.timelapse_feed = self.load_generator().minibatch_ab(images[:batchsize],
                                                                 batchsize, self.side,
                                                                 do_shuffle=False,
                                                                 is_timelapse=True)
        logger.debug("Set timelapse feed")
 </s> add     def set_timelapse_feed(self, images, batch_size):
        """ Set the time-lapse feed for this batcher.

        Creates a generator from :class:`lib.training_data.TrainingDataGenerator` specifically
        for generating time-lapse previews for the batcher.

        Parameters
        ----------
        images: list
            The list of full paths to the images for creating the time-lapse for this
            :class:`Batcher`
        batch_size: int
            The number of images to be used to create the time-lapse preview.
        """
        logger.debug("Setting time-lapse feed: (side: '%s', input_images: '%s', batch_size: %s)",
                     self._side, images, batch_size)
        self._timelapse_feed = self._load_generator().minibatch_ab(images[:batch_size],
                                                                   batch_size, self._side,
                                                                   do_shuffle=False,
                                                                   is_timelapse=True)
        logger.debug("Set time-lapse feed")
    Notes
    -----
    Images are loaded concurrently, so the order of the returned batch will likely not be the same
    as the order of the input filenames. Filenames are returned with the batch in the correct order
    corresponding to the returned batch.

  
      Leverages multi-threading to load multiple images from disk at the same time
      leading to vastly reduced image read times.
  
    Notes
    -----
    Images are loaded concurrently, so the order of the returned batch will likely not be the same
    as the order of the input filenames. Filenames are returned with the batch in the correct order
    corresponding to the returned batch.

      Parameters
      ----------
      filenames: list
          A list of ``str`` full paths to the images to be loaded.
keep keep keep add keep keep keep keep
 Smart Masks - Training Implementation (#914)

* Smart Masks - Training

- Reinstate smart mask training code
- Reinstate mask_type back to model.config
- change 'replicate_input_mask to 'learn_mask'
- Add learn mask option
- Add mask loading from alignments to plugins.train.trainer
- Add mask_blur and mask threshold options
- _base.py - Pass mask options through training_opts dict
- plugins.train.model - check for mask_type not None for learn_mask and penalized_mask_loss
- Limit alignments loading to just those faces that appear in the training folder
- Raise error if not all training images have an alignment, and alignment file is required
- lib.training_data - Mask generation code
- lib.faces_detect - cv2 dimension stripping bugfix
- Remove cv2 linting code

* Update mask helptext in cli.py

* Fix Warp to Landmarks
Remove SHA1 hashing from training data

* Update mask training config

* Capture missing masks at training init

* lib.image.read_image_batch - Return filenames with batch for ordering

* scripts.train - Documentation

* plugins.train.trainer - documentation

* Ensure backward compatibility.
Fix convert for new predicted masks

* Update removed masks to components for legacy models. 
lib/image.py