          if self._display_mask:
              images = self._compile_masked(images, samples[-1])
          images = [self._overlay_foreground(full.copy(), image) for image in images]
  
          if self._scaling != 1.0:
              new_size = int(images[0].shape[1] * self._scaling)
              images = [self._resize_sample(side, image, new_size) for image in images]
          return images
  
      def _process_full(self, side, images, prediction_size, color):
          """ Add a frame overlay to preview images indicating the region of interest.
  
 
</s> remove     def __init__(self, model, coverage_ratio, scaling=1.0):
 </s> add     def __init__(self, model, coverage_ratio): </s> remove     scaling: float, optional
        The amount to scale the final preview image by. Default: `1.0`
 </s> add  </s> remove     @classmethod
    def _create_resizable_window(cls, name: str, image_shape: tuple) -> None:
        """ Create a resizable OpenCV window to hold the preview image.

        Parameters
        ----------
        name: str
            The name to display in the window header and for window identification
        shape: tuple
            The (`rows`, `columns`, `channels`) of the image to be displayed
        """
        logger.debug("Creating named window '%s' for image shape %s", name, image_shape)
        height, width = image_shape[:2]
        cv2.namedWindow(name, cv2.WINDOW_GUI_EXPANDED)
        cv2.resizeWindow(name, width, height)

    def _do_preview(self, window_created: bool) -> bool:
        """" Display an image preview in a resizable window

        Parameters
        ----------
        window_created: bool
            ``True`` if a preview window has been created otherwise ``False``

        Returns
        -------
        bool
            ``True`` if a preview window has been created otherwise ``False``
        """
        with self._lock:
            for name, image in self._preview_buffer.items():
                if not window_created:
                    self._create_resizable_window(name, image.shape)
                cv2.imshow(name, image)  # pylint: disable=no-member
            window_created = bool(self._preview_buffer) if not window_created else window_created
        return window_created

 </s> add  </s> remove                 with self._lock:
                    self._preview_buffer[name] = image
 </s> add                 self._preview.add_image(name, image) </s> remove         self._scaling = scaling
 </s> add 
          if self._display_mask:
              images = self._compile_masked(images, samples[-1])
          images = [self._overlay_foreground(full.copy(), image) for image in images]
  



          return images
  
      def _process_full(self, side, images, prediction_size, color):
          """ Add a frame overlay to preview images indicating the region of interest.
  
keep keep keep keep replace replace replace keep keep keep keep keep
 Live Preview - Replace cv2 with matplotlib viewer 
plugins/train/trainer/_base.py