                       "affine_matrix: %s, interpolator: %s)", mask.shape, mask.dtype, mask.min(),
                       affine_matrix, mask.max(), interpolator)
          self._affine_matrix = self._adjust_affine_matrix(mask.shape[0], affine_matrix)
          self._interpolator = interpolator
          mask = (cv2.resize(mask,
                             (self.stored_size, self.stored_size),
                             interpolation=cv2.INTER_AREA) * 255.0).astype("uint8")
          self._mask = compress(mask)
  
 
</s> remove         if self.aligned:
 </s> add         if self.aligned and not force: </s> remove         if image is not None and self.aligned["face"] is None:
 </s> add         if image is not None and (self.aligned["face"] is None or force): </s> remove     def load_aligned(self, image, size=256, dtype=None):
 </s> add     def load_aligned(self, image, size=256, dtype=None, force=False):
        self.replace_mask(mask)

    def replace_mask(self, mask):
        """ Replace the existing :attr:`_mask` with the given mask.

        Parameters
        ----------
        mask: numpy.ndarray
            The mask that is to be added as output from :mod:`plugins.extract.mask`.
            It should be in the range 0.0 - 1.0 ideally with a ``dtype`` of ``float32``
        """
                       "affine_matrix: %s, interpolator: %s)", mask.shape, mask.dtype, mask.min(),
                       affine_matrix, mask.max(), interpolator)
          self._affine_matrix = self._adjust_affine_matrix(mask.shape[0], affine_matrix)
          self._interpolator = interpolator
        self.replace_mask(mask)

    def replace_mask(self, mask):
        """ Replace the existing :attr:`_mask` with the given mask.

        Parameters
        ----------
        mask: numpy.ndarray
            The mask that is to be added as output from :mod:`plugins.extract.mask`.
            It should be in the range 0.0 - 1.0 ideally with a ``dtype`` of ``float32``
        """
          mask = (cv2.resize(mask,
                             (self.stored_size, self.stored_size),
                             interpolation=cv2.INTER_AREA) * 255.0).astype("uint8")
          self._mask = compress(mask)
  
keep keep keep add keep keep keep keep keep
 Core updates (#981)

* Icon + minor files update

* lib.faces_detect
      - Add option to force reload an aligned face
      - Make sure a default blur and threshold parameter is set
      - Add ability to replace an existing mask 
lib/faces_detect.py