  """ Face and landmarks detection for faceswap.py """
  import logging
  
  import cv2
  import numpy as np
  
  from lib.aligner import Extract as AlignerExtract, get_align_mat, get_matrix_scaling
  
 
</s> remove import base64
import zlib
 </s> add  </s> remove import logging
 </s> add 
from zlib import compress, decompress

  """ Face and landmarks detection for faceswap.py """
  import logging
  
from zlib import compress, decompress

  import cv2
  import numpy as np
  
  from lib.aligner import Extract as AlignerExtract, get_align_mat, get_matrix_scaling
  
keep keep add 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/faces_detect.py