      def __init__(self, arguments, sample_size, display, lock, trigger_patch):
          logger.debug("Initializing %s: (arguments: '%s', sample_size: %s, display: %s, lock: %s, "
                       "trigger_patch: %s)", self.__class__.__name__, arguments, sample_size,
                       display, lock, trigger_patch)
          self.sample_size = sample_size
          self.display = display
          self.lock = lock
          self.trigger_patch = trigger_patch
          self.input_images = list()
          self.predicted_images = list()
  
          self.images = Images(arguments)
          self.alignments = Alignments(arguments,
                                       is_extract=False,
                                       input_is_video=self.images.is_video)
          if not self.alignments.have_alignments_file:
              logger.error("Alignments file not found at: '%s'", self.alignments.file)
              exit(1)
          self.filelist = self.get_filelist()
          self.indices = self.get_indices()
  
          self.predictor = Predict(queue_manager.get_queue("preview_predict_in"),
 
</s> remove         self.filelist = self.get_filelist()
        self.indices = self.get_indices()
 </s> add         self._filelist = self._get_filelist()
        self._indices = self._get_indices() </s> remove         self.samples = samples
        self.queue_patch_in = queue_manager.get_queue("preview_patch_in")
        self.display = display
        self.lock = lock
        self.trigger = trigger
 </s> add         self._samples = samples
        self._queue_patch_in = queue_manager.get_queue("preview_patch_in")
        self._display = display
        self._lock = lock
        self._trigger = trigger </s> remove         self.predictor = Predict(queue_manager.get_queue("preview_predict_in"),
                                 sample_size,
                                 arguments)
 </s> add         self._predictor = Predict(queue_manager.get_queue("preview_predict_in"),
                                  sample_size,
                                  arguments) </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
    """ </s> remove         self.config_tools = ConfigTools()
        self.lock = Lock()
        self.trigger_patch = Event()

        self.root = tk.Tk()
        self.scaling = self.get_scaling()
 </s> add         super().__init__()
        self._config_tools = ConfigTools()
        self._lock = Lock()
        self._scaling = self._get_scaling()
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
      def __init__(self, arguments, sample_size, display, lock, trigger_patch):
          logger.debug("Initializing %s: (arguments: '%s', sample_size: %s, display: %s, lock: %s, "
                       "trigger_patch: %s)", self.__class__.__name__, arguments, sample_size,
                       display, lock, trigger_patch)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
        self._sample_size = sample_size
        self._display = display
        self._lock = lock
        self._trigger_patch = trigger_patch
        self._input_images = list()
        self._predicted_images = list()

        self._images = Images(arguments)
        self._alignments = Alignments(arguments,
                                      is_extract=False,
                                      input_is_video=self._images.is_video)
        if not self._alignments.have_alignments_file:
            logger.error("Alignments file not found at: '%s'", self._alignments.file)
              exit(1)
          self.filelist = self.get_filelist()
          self.indices = self.get_indices()
  
          self.predictor = Predict(queue_manager.get_queue("preview_predict_in"),
keep keep keep keep replace replace replace replace 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