              cv2.rectangle(img, (t_l, b_r), (t_l + length, b_r - length), color, 1)
          logger.debug("Overlayed background. Shape: %s", images.shape)
          return images
  
      @classmethod
      def _compile_masked(cls, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]:
          """ Add the mask to the faces for masked preview.
  
          Places an opaque red layer over areas of the face that are masked out.
  
          Parameters
 
</s> remove         orig_masks = np.tile(1 - np.rint(masks), 3)
        orig_masks[np.where((orig_masks == [1., 1., 1.]).all(axis=3))] = [0., 0., 1.]
 </s> add         orig_masks = 1 - np.rint(masks) </s> remove         if not self._config["penalized_mask_loss"] or int(self._config[f"{area}_multiplier"]) <= 1:
 </s> add         multiplier = self._config[f"{area}_multiplier"]
        assert isinstance(multiplier, int)
        if not self._config["penalized_mask_loss"] or multiplier <= 1: </s> remove         retval = [np.array([cv2.addWeighted(img, 1.0, mask, 0.3, 0)
                            for img, mask in zip(previews, compiled_masks)])
                  for previews, compiled_masks in zip(faces, masks3)]
 </s> add         retval: List[np.ndarray] = []
        alpha = 1.0 - self._mask_opacity
        for previews, compiled_masks in zip(faces, masks3):
            overlays = previews.copy()
            overlays[np.where((compiled_masks == 1.).all(axis=3))] = self._mask_color
            retval.append(np.array([cv2.addWeighted(img, alpha, ovl, self._mask_opacity, 0)
                                    for img, ovl in zip(previews, overlays)]))

    def _compile_masked(self, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]:
              cv2.rectangle(img, (t_l, b_r), (t_l + length, b_r - length), color, 1)
          logger.debug("Overlayed background. Shape: %s", images.shape)
          return images
  
    def _compile_masked(self, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]:
    def _compile_masked(self, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]:
          """ Add the mask to the faces for masked preview.
  
          Places an opaque red layer over areas of the face that are masked out.
  
          Parameters
keep keep keep keep replace replace keep keep keep keep keep
 Preview - Allow mask color/opacity configuration
  - typing: lib.config
  - docs: lib.config
  - bugfix: popup_configure - keep assets on top 
plugins/train/trainer/_base.py