          A list of tuples defining the output shapes from the model, in the order that the outputs
          are returned. The tuples should be in (`height`, `width`, `channels`) format.
      coverage_ratio: float
          The ratio of the training image to be trained on. Dictates how much of the image will be
          cropped out. Eg: a coverage ratio of 0.625 will result in cropping a 160px box from a 256px
          image (256 * 0.625 = 160).
      config: dict
          The configuration ``dict`` generated from :file:`config.train.ini` containing the trainer \
          plugin configuration options.
  
      Attributes
 
</s> remove         Dictates how much of the image will be cropped out. Eg: a coverage ratio of 0.625 \
 </s> add         Dictates how much of the image will be cropped out. E.G: a coverage ratio of 0.625 \ </s> remove         * **landmarks** (`numpy.ndarray`, `optional`). Required if using a :attr:`mask_type` is \
        not ``None`` or :attr:`warp_to_landmarks` is ``True``. The 68 point face landmarks from \
        an alignments file.
 </s> add         * **landmarks** (`dict`, `optional`). Required if :attr:`warp_to_landmarks` is \
        ``True``. Returning dictionary has a key of **side** (`str`) the value of which is a \
        `dict` of {**filename** (`str`): **68 point landmarks** (`numpy.ndarray`)}.

        * **masks** (`dict`, `optional`). Required if :attr:`penalized_mask_loss` or \
        :attr:`learn_mask` is ``True``. Returning dictionary has a key of **side** (`str`) the \
        value of which is a `dict` of {**filename** (`str`): :class:`lib.faces_detect.Mask`}. </s> remove     """ Display samples for preview and timelapse """
 </s> add     """ Compile samples for display for preview and time-lapse

    Parameters
    ----------
    model: plugin from :mod:`plugins.train.model`
        The selected model that will be running this trainer
    use_mask: bool
        ``True`` if a mask should be displayed otherwise ``False``
    coverage_ratio: float
        Ratio of face to be cropped out of the training image.
    scaling: float, optional
        The amount to scale the final preview image by. Default: `1.0`

    Attributes
    ----------
    images: dict
        The :class:`numpy.ndarray` training images for generating previews on each side. The
        dictionary should contain 2 keys ("a" and "b") with the values being the training images
        for generating samples corresponding to each side.
    """ </s> remove     """ Base Trainer """
 </s> add     """ Trainer plugin base Object.

    All Trainer plugins must inherit from this class.

    Parameters
    ----------
    model: plugin from :mod:`plugins.train.model`
        The model that will be running this trainer
    images: dict
        The file paths for the images to be trained on for each side. The dictionary should contain
        2 keys ("a" and "b") with the values being a list of full paths corresponding to each side.
    batch_size: int
        The requested batch size for iteration to be trained through the model.
    configfile: str
        The path to a custom configuration file. If ``None`` is passed then configuration is loaded
        from the default :file:`.config.train.ini` file.
    """ </s> remove     """ Create the timelapse """
    def __init__(self, model, use_mask, coverage_ratio, preview_images, batchers):
 </s> add     """ Create a time-lapse preview image.

    Parameters
    ----------
    model: plugin from :mod:`plugins.train.model`
        The selected model that will be running this trainer
    use_mask: bool
        ``True`` if a mask should be displayed otherwise ``False``
    coverage_ratio: float
        Ratio of face to be cropped out of the training image.
    scaling: float, optional
        The amount to scale the final preview image by. Default: `1.0`
    image_count: int
        The number of preview images to be displayed in the time-lapse
    batchers: dict
        The dictionary should contain 2 keys ("a" and "b") with the values being the
        :class:`Batcher` for each side.
    """
    def __init__(self, model, use_mask, coverage_ratio, image_count, batchers):
        cropped out. E.G: a coverage ratio of 0.625 will result in cropping a 160px box from a "
        "256px image (256 * 0.625 = 160).
          A list of tuples defining the output shapes from the model, in the order that the outputs
          are returned. The tuples should be in (`height`, `width`, `channels`) format.
      coverage_ratio: float
          The ratio of the training image to be trained on. Dictates how much of the image will be
        cropped out. E.G: a coverage ratio of 0.625 will result in cropping a 160px box from a "
        "256px image (256 * 0.625 = 160).
        cropped out. E.G: a coverage ratio of 0.625 will result in cropping a 160px box from a "
        "256px image (256 * 0.625 = 160).
      config: dict
          The configuration ``dict`` generated from :file:`config.train.ini` containing the trainer \
          plugin configuration options.
  
      Attributes
keep keep keep keep replace replace keep 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/training_data.py