          # Get Landmarks prior to manipulating the image
          if self._training_opts["warp_to_landmarks"]:
              batch_src_pts = self._get_landmarks(filenames, batch, side)
  
          # Color Augmentation of the image only
          if self._training_opts["augment_color"]:
              batch[..., :3] = self._processing.color_adjust(batch[..., :3])
  
          # Random Transform and flip
 
</s> remove         # Color augmentation before mask is added
 </s> add         # Color Augmentation of the image only </s> remove             batch = self._processing.color_adjust(batch)

        # Add mask to batch prior to transforms and warps
        if self._mask_class:
            batch = np.array([self._mask_class(src_pts, image, channels=4).mask
                              for src_pts, image in zip(batch_src_pts, batch)])
 </s> add             batch[..., :3] = self._processing.color_adjust(batch[..., :3]) </s> remove         if self._mask_class or to_landmarks:
 </s> add         if self._training_opts["warp_to_landmarks"]: </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         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. """
            batch_dst_pts = self._get_closest_match(filenames, side, batch_src_pts)
            warp_kwargs = dict(batch_src_points=batch_src_pts,
                               batch_dst_points=batch_dst_pts)
        else:
            warp_kwargs = dict()
          # Get Landmarks prior to manipulating the image
          if self._training_opts["warp_to_landmarks"]:
              batch_src_pts = self._get_landmarks(filenames, batch, side)
            batch_dst_pts = self._get_closest_match(filenames, side, batch_src_pts)
            warp_kwargs = dict(batch_src_points=batch_src_pts,
                               batch_dst_points=batch_dst_pts)
        else:
            warp_kwargs = dict()
  
          # Color Augmentation of the image only
          if self._training_opts["augment_color"]:
              batch[..., :3] = self._processing.color_adjust(batch[..., :3])
  
          # Random Transform and flip
keep keep add keep keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/training_data.py