          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. """
          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         * **landmarks** (`numpy.ndarray`, `optional`). Required if :attr:`warp_to_landmarks` is \
        ``True``. The 68 point face landmarks from an alignments file.
 </s> add         * **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> remove         # 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> add         # 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> remove     def set_serializer(self):
        """ Set the serializer to be used for loading and
            saving alignments """
        if hasattr(self.args, "serializer") and self.args.serializer:
            logger.debug("Serializer provided: '%s'", self.args.serializer)
            serializer = self.args.serializer
        else:
            # If there is a full filename then this will be overriden
            # by filename extension
            serializer = "json"
            logger.debug("No Serializer defaulting to: '%s'", serializer)
        return serializer

 </s> add  </s> remove             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()
 </s> add 
        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. """
          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. """
        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):
keep keep keep keep replace replace keep keep keep keep keep
 Serialize masks to alignments file

- Add new serializers (npy + compressed)
- Remove Serializer option from cli
- Revert get_aligned call in scripts/extract
- Default alignments to compressed
- Size masks to 128px and compress
- Remove mask thresholding/blur from generation code
- Add Mask class to lib/faces_detect
- Revert debug landmarks to aligned face
- Revert non-extraction code to staging version 
lib/training_data.py