          targets = [batch[..., :3] for batch in size_list_of_batches]
          if size_list_of_batches[-1].shape[-1] == 4:
              masks = [size_list_of_batches[-1][..., 3:]]
          else:
              masks = [np.ones((size_list_of_batches[-1].shape[:-1] + (1,)), dtype='float32')]
          retval = dict(targets=targets, masks=masks)
          return retval
  
      # <<< COLOR AUGMENTATION >>> #
      def color_adjust(self, batch):
          """ Perform color augmentation on the passed in batch.
 
</s> remove         targets = [batch[..., :3] for batch in size_list_of_batches]
        if size_list_of_batches[-1].shape[-1] == 4:
            masks = [size_list_of_batches[-1][..., 3:]]
 </s> add         batch = [tgt.astype("float32") / 255.0 for tgt in batch]
        if all(tgt.shape[-1] == 4 for tgt in batch):
            logger.trace("Batch contains mask")
            sizes = [item.shape[1] for item in batch]
            mask_batch = np.expand_dims(batch[sizes.index(max(sizes))][..., -1], axis=-1)
            batch = [item[..., :3] for item in batch]
            logger.trace("batch shapes: %s, mask_batch shape: %s",
                         [tgt.shape for tgt in batch], mask_batch.shape)
            retval = dict(targets=batch, masks=mask_batch) </s> remove         masks = masks if masks is not None else self.masks
        samples = samples if samples is not None else self.samples
        retval = [samples[0:num_images], images[0:num_images], masks[0:num_images]]
 </s> add         retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images]) </s> remove         # Color Augmentation of the image only
 </s> add         # Color augmentation before mask is added </s> remove         images = batch["targets"][self.model.largest_face_index]
        masks = batch["masks"][0]
        sample = self.compile_sample(batchsize,
                                     samples=batch["samples"],
                                     images=images,
                                     masks=masks)
 </s> add         images = [batch["targets"][self.model.largest_face_index]]
        if self.use_mask:
            images = images + [batch["masks"]]
        sample = self.compile_sample(batchsize, samples=batch["samples"], images=images) </s> remove     if serializer.lower() == "json":
        return _JSONSerializer()
    if serializer.lower() == "pickle":
        return _PickleSerializer()
    if serializer.lower() == "yaml" and yaml is not None:
        return _YAMLSerializer()
    if serializer.lower() == "yaml" and yaml is None:
 </s> add     if serializer.lower() == "npy":
        retval = _NPYSerializer()
    elif serializer.lower() == "compressed":
        retval = _CompressedSerializer()
    elif serializer.lower() == "json":
        retval = _JSONSerializer()
    elif serializer.lower() == "pickle":
        retval = _PickleSerializer()
    elif serializer.lower() == "yaml" and yaml is not None:
        retval = _YAMLSerializer()
    elif serializer.lower() == "yaml" and yaml is None:
            logger.trace("Batch has no mask")
            retval = dict(targets=batch)
          targets = [batch[..., :3] for batch in size_list_of_batches]
          if size_list_of_batches[-1].shape[-1] == 4:
              masks = [size_list_of_batches[-1][..., 3:]]
          else:
            logger.trace("Batch has no mask")
            retval = dict(targets=batch)
            logger.trace("Batch has no mask")
            retval = dict(targets=batch)
          return retval
  
      # <<< COLOR AUGMENTATION >>> #
      def color_adjust(self, batch):
          """ Perform color augmentation on the passed in batch.
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/training_data.py