          masks3 = np.tile(1 - np.rint(masks), 3)
          for mask in masks3:
              mask[np.where((mask == [1., 1., 1.]).all(axis=2))] = [0., 0., 1.]
          for previews in faces:
              images = np.array([cv2.addWeighted(img,  # pylint: disable=no-member
                                                 1.0, masks3[idx], 0.3, 0)
                                 for idx, img in enumerate(previews)])
              retval.append(images)
          logger.debug("masked shapes: %s", [faces.shape for faces in retval])
          return retval
  
 
</s> remove                 offset:offset + foregrounds[idx].shape[1], :3] = foregrounds[idx]
 </s> add                 offset:offset + foregrounds[idx].shape[1]] = foregrounds[idx] </s> remove                 cv2.circle(face.feed_face,  # pylint: disable=no-member
 </s> add                 cv2.circle(face.feed_landmarks,  # pylint: disable=no-member </s> remove             aligned_landmarks = face.feed_landmarks
 </s> add             aligned_landmarks = face.aligned_landmarks </s> remove             extension = '.png'
 </s> add             extension = Path(filename).suffix </s> remove                      [tgt_images.shape[1:] for tgt_images in target_batch])
 </s> add                      [tgt.shape for tgt_images in target_batch for tgt in tgt_images])
            images = np.array([cv2.addWeighted(img, 1.0,  # pylint: disable=no-member
                                               masks3[idx], 0.3,
                                               0)
          masks3 = np.tile(1 - np.rint(masks), 3)
          for mask in masks3:
              mask[np.where((mask == [1., 1., 1.]).all(axis=2))] = [0., 0., 1.]
          for previews in faces:
            images = np.array([cv2.addWeighted(img, 1.0,  # pylint: disable=no-member
                                               masks3[idx], 0.3,
                                               0)
            images = np.array([cv2.addWeighted(img, 1.0,  # pylint: disable=no-member
                                               masks3[idx], 0.3,
                                               0)
                                 for idx, img in enumerate(previews)])
              retval.append(images)
          logger.debug("masked shapes: %s", [faces.shape for faces in retval])
          return retval
  
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 
plugins/train/trainer/_base.py