              A ``dict`` for each frame containing the ``image``, ``filename`` and list of
              :class:`lib.faces_detect.DetectedFace` objects.
  
          """
          # TODO Migrate these settings to retrieval rather than storage
          # if self.blur_kernel is not None:
          #    predicted = np.array([cv2.GaussianBlur(mask, (self.blur_kernel, self.blur_kernel), 0)
          #                          for mask in batch["prediction"]])
          # else:
          #    predicted = batch["prediction"]
          # predicted[predicted < 0.04] = 0.0
          # predicted[predicted > 0.96] = 1.0
          for mask, face in zip(batch["prediction"], batch["detected_faces"]):
              face.add_mask(self._storage_name,
                            mask,
                            face.feed_matrix,
                            (face.image.shape[1], face.image.shape[0]),
 
</s> remove         self.blur_kernel = 5  # Override for model specific blur_kernel size
 </s> add  </s> remove         self._mask = self._load_mask(masker, configfile)
 </s> add         self._mask = self._load_mask(masker, image_is_aligned, configfile) </s> remove         """ numpy.ndarray: The mask at the size of :attr:`stored_size` """
        return np.frombuffer(decompress(self._mask),
                             dtype="uint8").reshape((self.stored_size, self.stored_size, 1))
 </s> add         """ numpy.ndarray: The mask at the size of :attr:`stored_size` with any requested blurring
        and threshold amount applied."""
        dims = (self.stored_size, self.stored_size, 1)
        mask = np.frombuffer(decompress(self._mask), dtype="uint8").reshape(dims)
        if self._threshold != 0.0:
            mask[mask < self._threshold] = 0.0
            mask[mask > 255.0 - self._threshold] = 255.0
        if self._blur_kernel != 0:
            mask = cv2.GaussianBlur(mask, (self._blur_kernel, self._blur_kernel), 0)[..., None]
        logger.trace("mask shape: %s", mask.shape)
        return mask </s> remove     def __init__(self, git_model_id=None, model_filename=None, configfile=None):
 </s> add     def __init__(self, git_model_id=None, model_filename=None, configfile=None,
                 image_is_aligned=False):
              A ``dict`` for each frame containing the ``image``, ``filename`` and list of
              :class:`lib.faces_detect.DetectedFace` objects.
  
          """








          for mask, face in zip(batch["prediction"], batch["detected_faces"]):
              face.add_mask(self._storage_name,
                            mask,
                            face.feed_matrix,
                            (face.image.shape[1], face.image.shape[0]),
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 Extract - Mask updates

- Remove none mask plugin
- Make pipeline more flexible
- Add support for pre-aligned faces to masker plugin
- Migrate blur and threshold settings to mask output 
plugins/extract/mask/_base.py