          self.image_canvas = ImagesCanvas(container, self.tk_vars)
          container.add(self.image_canvas, height=400 * self.scaling)
  
          options_frame = ttk.Frame(container)
          self.cli_frame = ActionFrame(options_frame,
                                       self.patch.converter.args.color_adjustment.replace("-", "_"),
                                       self.patch.converter.args.mask_type.replace("-", "_"),
                                       self.patch.converter.args.scaling.replace("-", "_"),
                                       self.config_tools,
                                       self.refresh,
                                       self.samples.generate,
                                       self.tk_vars)
          self.opts_book = OptionsBook(options_frame, self.config_tools, self.refresh, self.scaling)
          container.add(options_frame)
  
  
  class Samples():
      """ Holds 5 random test faces """
 
</s> remove         container.preview_display = self.display
        self.image_canvas = ImagesCanvas(container, self.tk_vars)
        container.add(self.image_canvas, height=400 * self.scaling)
 </s> add         container.preview_display = self._display
        self._image_canvas = ImagesCanvas(container, self._tk_vars)
        container.add(self._image_canvas, height=400 * self._scaling) </s> remove         self.display = FacesDisplay(256, 64, self.tk_vars)
        self.samples = Samples(arguments, 5, self.display, self.lock, self.trigger_patch)
        self.patch = Patch(arguments,
                           self.samples,
                           self.display,
                           self.lock,
                           self.trigger_patch,
                           self.config_tools,
                           self.tk_vars)

        self.initialize_tkinter()
        self.image_canvas = None
        self.opts_book = None
        self.cli_frame = None  # cli frame holds cli options
 </s> add         self._display = FacesDisplay(256, 64, self._tk_vars)

        trigger_patch = Event()
        self._samples = Samples(arguments, 5, self._display, self._lock, trigger_patch)
        self._patch = Patch(arguments,
                            self._samples,
                            self._display,
                            self._lock,
                            trigger_patch,
                            self._config_tools,
                            self._tk_vars)

        self._initialize_tkinter()
        self._image_canvas = None
        self._opts_book = None
        self._cli_frame = None  # cli frame holds cli options </s> remove         self.root.geometry("{}x{}+80+80".format(str(width), str(height)))
 </s> add         self.geometry("{}x{}+80+80".format(str(width), str(height))) </s> remove     def set_geometry(self):
        """ Set GUI geometry """
        self.root.tk.call("tk", "scaling", self.scaling)
        width = int(940 * self.scaling)
        height = int(600 * self.scaling)
 </s> add     def _set_geometry(self):
        """ Set the GUI window geometry. """
        self.tk.call("tk", "scaling", self._scaling)
        width = int(940 * self._scaling)
        height = int(600 * self._scaling) </s> remove     """ Holds 5 random test faces """
 </s> add     """ The display samples.

    Obtains and holds :attr:`sample_size` semi random test faces for displaying in the
    preview GUI.

    The file list is split into evenly sized groups of :attr:`sample_size`. When a display set is
    generated, a random image from each of the groups is selected to provide an array of images
    across the length of the video.

    Parameters
    ----------
    arguments: :class:`argparse.Namespace`
        The :mod:`argparse` arguments as passed in from :mod:`tools.py`
    sample_size: int
        The number of samples to take from the input video/images
    display: :class:`FacesDisplay`
        The display section of the Preview GUI.
    lock: :class:`threading.Lock`
        A threading lock to prevent multiple GUI updates at the same time.
    trigger_patch:  :class:`threading.Event`
        An event to indicate that a converter patch should be run
    """
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
          self.image_canvas = ImagesCanvas(container, self.tk_vars)
          container.add(self.image_canvas, height=400 * self.scaling)
  
          options_frame = ttk.Frame(container)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
        self._cli_frame = ActionFrame(
            options_frame,
            list(self._samples.alignments.mask_summary.keys()),
            self._samples.predictor.has_predicted_mask,
            self._patch.converter.cli_arguments.color_adjustment.replace("-", "_"),
            self._patch.converter.cli_arguments.mask_type.replace("-", "_"),
            self._patch.converter.cli_arguments.scaling.replace("-", "_"),
            self._config_tools,
            self._refresh,
            self._samples.generate,
            self._tk_vars)
        self._opts_book = OptionsBook(options_frame,
                                      self._config_tools,
                                      self._refresh,
                                      self._scaling)
          container.add(options_frame)
  
  
  class Samples():
      """ Holds 5 random test faces """
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Smart Masks to Convert (#957)

- scripts.convert - Use Smart Masks for Convert
    * Make on-the-fly conversion an explicit option

- Move BlurMask to lib.faces_detect

- tools.preview - Fix for smart masks
    * Subclass from tk.Tk
    * Options to lib.gui.control_helper
    *variable cleanup

- lib.logger - Demote more tensorflow deprecation messages

- Documentation:
    * lib.faces_detect.BlurMask
    * plugins.convert.mask
    * lib.convert
    * scripts.convert
    * scripts.fsmedia
    * tools.preview 
tools/preview.py