          figure = np.concatenate([figures["a"], figures["b"]], axis=0)
          height = int(figure.shape[0] / width)
          figure = figure.reshape((width, height) + figure.shape[1:])
          figure = stack_images(figure)
          figure = np.concatenate((header, figure), axis=0)
  
          logger.debug("Compiled sample")
          return np.clip(figure * 255, 0, 255).astype('uint8')
  
      @staticmethod
 
</s> remove             aligned_landmarks = face.feed_landmarks
 </s> add             aligned_landmarks = face.aligned_landmarks </s> remove                 offset:offset + foregrounds[idx].shape[1], :3] = foregrounds[idx]
 </s> add                 offset:offset + foregrounds[idx].shape[1]] = foregrounds[idx] </s> remove         feed_faces = np.stack([detected_face.feed_face / 255. for detected_face in detected_faces])
 </s> add         feed_faces = np.stack([detected_face.feed_face for detected_face in detected_faces]) </s> remove         targets_use_mask = self.model.training_opts["replicate_input_mask"]
        model_inputs = batch["feed"] + batch["masks"] if self.use_mask else batch["feed"]
        model_targets = batch["targets"] + batch["masks"] if targets_use_mask else batch["targets"]
        return model_inputs, model_targets
 </s> add         if self.use_mask:
            batch = [[batch["feed"], batch["masks"]], batch["targets"] + [batch["masks"]]]
        else:
            batch = [batch["feed"], batch["targets"]]
        self.generate_preview(do_preview)
        return batch </s> remove                 cv2.circle(face.feed_face,  # pylint: disable=no-member
 </s> add                 cv2.circle(face.feed_landmarks,  # pylint: disable=no-member
        figure = np.vstack((header, figure))
          figure = np.concatenate([figures["a"], figures["b"]], axis=0)
          height = int(figure.shape[0] / width)
          figure = figure.reshape((width, height) + figure.shape[1:])
          figure = stack_images(figure)
        figure = np.vstack((header, figure))
  
          logger.debug("Compiled sample")
          return np.clip(figure * 255, 0, 255).astype('uint8')
  
      @staticmethod
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 
plugins/train/trainer/_base.py