              extension = '.png'
              out_filename = "{}_{}{}".format(str(output_file), str(idx), extension)
  
              face = detected_face["face"]
              resized_face = face.feed_face
              face.hash, img = encode_image_with_hash(resized_face, extension)
              self.save_queue.put((out_filename, img))
              final_faces.append(face.to_alignment())
          self.alignments.data[os.path.basename(filename)] = final_faces
 
</s> remove             extension = '.png'
 </s> add             extension = Path(filename).suffix </s> remove         return _JSONSerializer()
    if extension == ".p":
        return _PickleSerializer()
    if extension in (".yaml", ".yml") and yaml is not None:
        return _YAMLSerializer()
    if extension in (".yaml", ".yml") and yaml is None:
 </s> add         retval = _JSONSerializer()
    elif extension == ".p":
        retval = _PickleSerializer()
    elif extension == ".npy":
        retval = _NPYSerializer()
    elif extension == ".fsc":
        retval = _CompressedSerializer()
    elif extension in (".yaml", ".yml") and yaml is not None:
        retval = _YAMLSerializer()
    elif extension in (".yaml", ".yml") and yaml is None: </s> remove     logger.warning("Unrecognized extension: '%s'. Returning json serializer", extension)
    return _JSONSerializer()
 </s> add         retval = _JSONSerializer()
    else:
        logger.warning("Unrecognized extension: '%s'. Returning json serializer", extension)
        retval = _JSONSerializer()
    logger.debug(retval)
    return retval </s> remove         elif serializer not in ("json", "pickle", "yaml"):
            raise ValueError("Error: {} is not a valid serializer. Use "
                             "'json', 'pickle' or 'yaml'")
 </s> add 
            resized_face = face.aligned_face
              extension = '.png'
              out_filename = "{}_{}{}".format(str(output_file), str(idx), extension)
  
              face = detected_face["face"]
            resized_face = face.aligned_face
              face.hash, img = encode_image_with_hash(resized_face, extension)
              self.save_queue.put((out_filename, img))
              final_faces.append(face.to_alignment())
          self.alignments.data[os.path.basename(filename)] = final_faces
keep keep keep keep replace 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 
scripts/extract.py