          return processed
  
      def _get_landmarks(self, filenames, batch, side):
          """ Obtains the 68 Point Landmarks for the images in this batch. This is only called if
          config item ``warp_to_landmarks`` is ``True`` or if :attr:`mask_type` is not ``None``. If
          the landmarks for an image cannot be found, then an error is raised. """
          logger.trace("Retrieving landmarks: (filenames: %s, side: '%s')", filenames, side)
          src_points = [self._landmarks[side].get(sha1(face).hexdigest(), None) for face in batch]
  
          # Raise error on missing alignments
          if not all(isinstance(pts, np.ndarray) for pts in src_points):
 
</s> remove         to_landmarks = self._training_opts["warp_to_landmarks"]
 </s> add  </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** (`numpy.ndarray`, `optional`). Required if :attr:`warp_to_landmarks` is \
        ``True``. The 68 point face landmarks from an alignments file. </s> remove     def _set__mask_class(self):
        """ Returns the correct mask class from :mod:`lib`.model.masks` as defined in the
        :attr:`mask_type` parameter. """
        mask_type = self._training_opts.get("mask_type", None)
        if mask_type:
            logger.debug("Mask type: '%s'", mask_type)
            _mask_class = getattr(masks, mask_type)
        else:
            _mask_class = None
        logger.debug("Mask class: %s", _mask_class)
        return _mask_class

 </s> add  </s> remove         if self._mask_class or to_landmarks:
 </s> add         if self._training_opts["warp_to_landmarks"]: </s> remove         * **mask_type** (`str`) - The mask type to be used (as defined in \
        :mod:`lib.model.masks`). If not ``None`` then the additional key ``landmarks`` must be \
        provided.

 </s> add 
        config item ``warp_to_landmarks`` is ``True``. If the landmarks for an image cannot be
        found, then an error is raised. """
          return processed
  
      def _get_landmarks(self, filenames, batch, side):
          """ Obtains the 68 Point Landmarks for the images in this batch. This is only called if
        config item ``warp_to_landmarks`` is ``True``. If the landmarks for an image cannot be
        found, then an error is raised. """
        config item ``warp_to_landmarks`` is ``True``. If the landmarks for an image cannot be
        found, then an error is raised. """
          logger.trace("Retrieving landmarks: (filenames: %s, side: '%s')", filenames, side)
          src_points = [self._landmarks[side].get(sha1(face).hexdigest(), None) for face in batch]
  
          # Raise error on missing alignments
          if not all(isinstance(pts, np.ndarray) for pts in src_points):
keep keep keep keep replace replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/training_data.py