          return yaml.dump(data, default_flow_style=False).encode("utf-8")
  
      @classmethod
      def _unmarshal(cls, data):
          return yaml.load(data.decode("utf-8"))
  
  
  class _JSONSerializer(Serializer):
      """ JSON Serializer """
      def __init__(self):
 
</s> remove         self._file_extension = "p"
 </s> add         self._file_extension = "pickle" </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     logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    return _JSONSerializer()
 </s> add         retval = _JSONSerializer
    else:
        logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    logger.debug(retval)
    return retval </s> remove         return self.config.get("replicate_input_mask", False)
 </s> add         return self.config.get("mask_type", None) is not None
        return yaml.load(data.decode("utf-8"), Loader=yaml.FullLoader)
          return yaml.dump(data, default_flow_style=False).encode("utf-8")
  
      @classmethod
      def _unmarshal(cls, data):
        return yaml.load(data.decode("utf-8"), Loader=yaml.FullLoader)
  
  
  class _JSONSerializer(Serializer):
      """ JSON Serializer """
      def __init__(self):
keep keep keep keep 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/serializer.py