          :func:`minibatch_ab` for more details on the output. """
          logger.trace("Process batch: (filenames: '%s', side: '%s')", filenames, side)
          batch = read_image_batch(filenames)
          processed = dict()
          to_landmarks = self._training_opts["warp_to_landmarks"]
  
          # Initialize processing training size on first image
          if not self._processing.initialized:
              self._processing.initialize(batch.shape[1])
  
 
</s> remove         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. """
 </s> add         config item ``warp_to_landmarks`` is ``True``. If the landmarks for an image cannot be
        found, then an error is raised. """ </s> remove         # Random Warp
        if to_landmarks:
            warp_kwargs = dict(batch_src_points=batch_src_pts,
                               batch_dst_points=self._get_closest_match(filenames,
                                                                        side,
                                                                        batch_src_pts))
        else:
            warp_kwargs = dict()
        processed["feed"] = self._processing.warp(batch[..., :3], to_landmarks, **warp_kwargs)
 </s> add         # Random Warp # TODO change masks to have a input mask and a warped target mask
        processed["feed"] = [self._processing.warp(batch[..., :3],
                                                   self._training_opts["warp_to_landmarks"],
                                                   **warp_kwargs)] </s> remove         if self._mask_class or to_landmarks:
 </s> add         if self._training_opts["warp_to_landmarks"]: </s> remove         for task in ("extract_detect_in", "extract_align_in", "extract_align_out"):
 </s> add         tasks = ["extract_detect_in", "extract_align_in", "extract_mask_in", "extract_mask_out"]
        for task in tasks:
          :func:`minibatch_ab` for more details on the output. """
          logger.trace("Process batch: (filenames: '%s', side: '%s')", filenames, side)
          batch = read_image_batch(filenames)
          processed = dict()

  
          # Initialize processing training size on first image
          if not self._processing.initialized:
              self._processing.initialize(batch.shape[1])
  
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/training_data.py