          elif serializer not in ("json", "pickle", "yaml"):
              raise ValueError("Error: {} is not a valid serializer. Use "
                               "'json', 'pickle' or 'yaml'")
          else:
              logger.debug("Serializer set from argument: '%s'", serializer)
              retval = get_serializer(serializer)
          logger.verbose("Using '%s' serializer for alignments", retval.file_extension)
          return retval
  
      def get_location(self, folder, filename):
          """ Return the path to alignments file """
 
</s> remove         elif serializer not in ("json", "pickle", "yaml"):
            raise ValueError("Error: {} is not a valid serializer. Use "
                             "'json', 'pickle' or 'yaml'")
 </s> add  </s> remove             specified serializer will be used """
        logger.debug("Getting serializer: (filename: '%s', serializer: '%s')",
                     filename, serializer)
 </s> add             compressed pickle will be used """
        logger.debug("Getting serializer: (filename: '%s')", filename) </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                     decide the serializer, and the serializer argument will
                    be ignored.
        serializer: If provided, this will be the format that the data is
                    saved in (if data is to be saved). Can be 'json', 'pickle'
                    or 'yaml'
 </s> add                     decide the serializer otherwise compressed pickle is used. </s> remove         return self.config.get("replicate_input_mask", False)
 </s> add         return self.config.get("mask_type", None) is not None
            logger.debug("Returning default Pickle serializer")
            retval = get_serializer("compressed")
          elif serializer not in ("json", "pickle", "yaml"):
              raise ValueError("Error: {} is not a valid serializer. Use "
                               "'json', 'pickle' or 'yaml'")
          else:
            logger.debug("Returning default Pickle serializer")
            retval = get_serializer("compressed")
            logger.debug("Returning default Pickle serializer")
            retval = get_serializer("compressed")
          logger.verbose("Using '%s' serializer for alignments", retval.file_extension)
          return retval
  
      def get_location(self, folder, filename):
          """ Return the path to alignments file """
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/alignments.py