      def add_comboboxes(self, parent, defaults):
          """ Add the comboboxes to the Action Frame """
          for opt in self.options:
              if opt == "mask_type":
                  choices = ["dfl_full", "components", "extended", "predicted"]
              else:
                  choices = PluginLoader.get_available_convert_plugins(opt, True)
              choices = [self.format_to_display(choice) for choice in choices]
              ctl = ControlBuilder(parent,
                                   opt,
 
</s> remove             masks = [np.ones((size_list_of_batches[-1].shape[:-1] + (1,)), dtype='float32')]
        retval = dict(targets=targets, masks=masks)
 </s> add             logger.trace("Batch has no mask")
            retval = dict(targets=batch) </s> remove         if self.config["replicate_input_mask"] or self.config["penalized_mask_loss"]:
            # penalized mask doesn't have a mask ouput, so we can't use output shapes
            # mask should always be last output..this needs to be a rule
            mask_shape = output_network.output_shapes[-1]
            inputs.append(Input(shape=(mask_shape[1:-1] + (1,)), name="mask_in"))
 </s> add         mask_idx = [idx for idx, name in enumerate(output_network.output_names)
                    if name.startswith("mask")]
        if mask_idx:
            # Add the final mask shape as input
            mask_shape = output_network.output_shapes[mask_idx[0]]
            inputs.append(Input(shape=mask_shape[1:], name="mask_in")) </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: </s> remove         final_faces = list()
        for detected_face in faces["detected_faces"]:
            filename = self.output_dir / Path(detected_face.filename).stem
            final_faces.append({"file_location": filename,
                                "face": detected_face})
        faces["detected_faces"] = final_faces
 </s> add         self.align_face(faces, size, filename) </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
                choices = get_available_masks() + ["predicted"]
      def add_comboboxes(self, parent, defaults):
          """ Add the comboboxes to the Action Frame """
          for opt in self.options:
              if opt == "mask_type":
                choices = get_available_masks() + ["predicted"]
              else:
                  choices = PluginLoader.get_available_convert_plugins(opt, True)
              choices = [self.format_to_display(choice) for choice in choices]
              ctl = ControlBuilder(parent,
                                   opt,
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 
tools/preview.py