          mask.set_blur_and_threshold(blur_kernel=self._config["kernel_size"],
                                      blur_type=self._config["type"],
                                      blur_passes=self._config["passes"],
                                      threshold=self._config["threshold"])
          if sub_crop_offset is not None and np.any(sub_crop_offset):
              mask.set_sub_crop(sub_crop_offset, centering)
          mask = self._crop_to_coverage(mask.mask)
          mask_size = mask.shape[0]
          face_size = self._box.shape[0]
          if mask_size != face_size:
              interp = cv2.INTER_CUBIC if mask_size < face_size else cv2.INTER_AREA
              mask = cv2.resize(mask,
                                self._box.shape[:2],
 
</s> remove             mask = cv2.resize(mask,
                              self._box.shape[:2],
                              interpolation=interp)[..., None].astype("float32") / 255.
 </s> add             face_mask = cv2.resize(face_mask,
                                   self._box.shape[:2],
                                   interpolation=interp)[..., None].astype("float32") / 255. </s> remove             mask = np.float32(mask) / 255.
        return mask

    def _crop_to_coverage(self, mask: np.ndarray) -> np.ndarray:
        """ Crop the mask to the correct dimensions based on coverage ratio.

        Parameters
        ----------
        mask: :class:`numpy.ndarray`
            The original mask to be cropped

        Returns
        -------
        :class:`numpy.ndarray`
            The cropped mask
        """
        if self._coverage_ratio == 1.0:
            return mask
        mask_size = mask.shape[0]
        padding = round((mask_size * (1 - self._coverage_ratio)) / 2)
        mask_slice = slice(padding, mask_size - padding)
        mask = mask[mask_slice, mask_slice, :]
        logger.trace("mask_size: %s, coverage: %s, padding: %s, final shape: %s",  # type: ignore
                     mask_size, self._coverage_ratio, padding, mask.shape)
        return mask
 </s> add             face_mask = face_mask.astype("float32") / 255.
        return face_mask </s> remove                      "sub_crop_offset: %s, centering: '%s', predicted_mask: %s",
                     detected_face, sub_crop_offset, centering, predicted_mask is not None)
        mask = self._get_mask(detected_face, predicted_mask, centering, sub_crop_offset)
 </s> add                      "source_offset: %s, target_offset: %s, centering: '%s', predicted_mask: %s",
                     detected_face, source_offset, target_offset, centering,
                     predicted_mask is not None)
        mask = self._get_mask(detected_face,
                              predicted_mask,
                              centering,
                              source_offset,
                              target_offset) </s> remove             mask = self._get_stored_mask(detected_face, centering, sub_crop_offset)
 </s> add             mask = self._get_stored_mask(detected_face, centering, source_offset, target_offset) </s> remove         blur_type = self._config["type"]
 </s> add         blur_type = self._config["type"].lower()
        mask.set_sub_crop(source_offset, target_offset, centering, self._coverage_ratio)
        face_mask = mask.mask
        mask_size = face_mask.shape[0]
          mask.set_blur_and_threshold(blur_kernel=self._config["kernel_size"],
                                      blur_type=self._config["type"],
                                      blur_passes=self._config["passes"],
                                      threshold=self._config["threshold"])
        mask.set_sub_crop(source_offset, target_offset, centering, self._coverage_ratio)
        face_mask = mask.mask
        mask_size = face_mask.shape[0]
        mask.set_sub_crop(source_offset, target_offset, centering, self._coverage_ratio)
        face_mask = mask.mask
        mask_size = face_mask.shape[0]
        mask.set_sub_crop(source_offset, target_offset, centering, self._coverage_ratio)
        face_mask = mask.mask
        mask_size = face_mask.shape[0]
        mask.set_sub_crop(source_offset, target_offset, centering, self._coverage_ratio)
        face_mask = mask.mask
        mask_size = face_mask.shape[0]
          face_size = self._box.shape[0]
          if mask_size != face_size:
              interp = cv2.INTER_CUBIC if mask_size < face_size else cv2.INTER_AREA
              mask = cv2.resize(mask,
                                self._box.shape[:2],
keep keep keep keep replace replace replace replace keep keep keep keep keep
 lib.detected_face.Mask
  - Add source + target offset and coverage to set_sub_crop method 
plugins/convert/mask/mask_blend.py