  
          logger.debug("Initialized %s", self.__class__.__name__)
  
      @property
      def random_choice(self):
          """ Return for random indices from the indices group """
          retval = [random.choice(indices) for indices in self.indices]
          logger.debug(retval)
          return retval
  
      def get_filelist(self):
          """ Return a list of files, filtering out those frames which do not contain faces """
 
</s> remove     def get_filelist(self):
        """ Return a list of files, filtering out those frames which do not contain faces """
 </s> add     def _get_filelist(self):
        """ Get a list of files for the input, filtering out those frames which do
        not contain faces.

        Returns
        -------
        list
            A list of filenames of frames that contain faces.
        """ </s> remove         if self.images.is_video:
            filelist = ["{}_{:06d}.png".format(os.path.splitext(self.images.input_images)[0],
 </s> add         if self._images.is_video:
            filelist = ["{}_{:06d}.png".format(os.path.splitext(self._images.input_images)[0], </s> remove     def get_indices(self):
        """ Returns a list of 'self.sample_size' evenly sized partition indices
            pertaining to the filtered file list """
 </s> add     def _get_indices(self):
        """ Get indices for each sample group.

        Obtain :attr:`self.sample_size` evenly sized groups of indices
        pertaining to the filtered :attr:`self._file_list`

        Returns
        -------
        list
            list of indices relating to the filtered file list, split into groups
        """ </s> remove     def queue_size(self):
        """ Set 16 for single process otherwise 32 """
        if self.args.singleprocess:
 </s> add     def _queue_size(self):
        """ int: Size of the converter queues. 16 for single process otherwise 32 """
        if self._args.singleprocess: </s> remove         """ Generate a random test set """
        self.load_frames()
        self.predict()
        self.trigger_patch.set()

    def load_frames(self):
        """ Load a sample of random frames """
        self.input_images = list()
        for selection in self.random_choice:
            filename = os.path.basename(self.filelist[selection])
            image = self.images.load_one_image(self.filelist[selection])
 </s> add         """ Generate a sample set.

        Selects :attr:`sample_size` random faces. Runs them through prediction to obtain the
        swap, then trigger the patch event to run the faces through patching.
        """
        self._load_frames()
        self._predict()
        self._trigger_patch.set()

    def _load_frames(self):
        """ Load a sample of random frames.

        * Picks a random face from each indices group.

        * Takes the first face from the image (if there) are multiple faces. Adds the images to \
            :attr:`self._input_images`.

        * Sets :attr:`_display.source` to the input images and flags that the display should \
            be updated
        """
        self._input_images = list()
        for selection in self._random_choice:
            filename = os.path.basename(self._filelist[selection])
            image = self._images.load_one_image(self._filelist[selection])
    def sample_size(self):
        """ int: The number of samples to take from the input video/images """
        return self._sample_size

    @property
    def predicted_images(self):
        """ list: The predicted faces output from the Faceswap model """
        return self._predicted_images

    @property
    def alignments(self):
        """ :class:`~lib.alignments.Alignments`: The alignments for the preview faces """
        return self._alignments

    @property
    def predictor(self):
        """ :class:`~scripts.convert.Predict`: The Predictor for the Faceswap model """
        return self._predictor

    @property
    def _random_choice(self):
        """ list: Random indices from the :attr:`_indices` group """
        retval = [random.choice(indices) for indices in self._indices]
  
          logger.debug("Initialized %s", self.__class__.__name__)
  
      @property
    def sample_size(self):
        """ int: The number of samples to take from the input video/images """
        return self._sample_size

    @property
    def predicted_images(self):
        """ list: The predicted faces output from the Faceswap model """
        return self._predicted_images

    @property
    def alignments(self):
        """ :class:`~lib.alignments.Alignments`: The alignments for the preview faces """
        return self._alignments

    @property
    def predictor(self):
        """ :class:`~scripts.convert.Predict`: The Predictor for the Faceswap model """
        return self._predictor

    @property
    def _random_choice(self):
        """ list: Random indices from the :attr:`_indices` group """
        retval = [random.choice(indices) for indices in self._indices]
    def sample_size(self):
        """ int: The number of samples to take from the input video/images """
        return self._sample_size

    @property
    def predicted_images(self):
        """ list: The predicted faces output from the Faceswap model """
        return self._predicted_images

    @property
    def alignments(self):
        """ :class:`~lib.alignments.Alignments`: The alignments for the preview faces """
        return self._alignments

    @property
    def predictor(self):
        """ :class:`~scripts.convert.Predict`: The Predictor for the Faceswap model """
        return self._predictor

    @property
    def _random_choice(self):
        """ list: Random indices from the :attr:`_indices` group """
        retval = [random.choice(indices) for indices in self._indices]
    def sample_size(self):
        """ int: The number of samples to take from the input video/images """
        return self._sample_size

    @property
    def predicted_images(self):
        """ list: The predicted faces output from the Faceswap model """
        return self._predicted_images

    @property
    def alignments(self):
        """ :class:`~lib.alignments.Alignments`: The alignments for the preview faces """
        return self._alignments

    @property
    def predictor(self):
        """ :class:`~scripts.convert.Predict`: The Predictor for the Faceswap model """
        return self._predictor

    @property
    def _random_choice(self):
        """ list: Random indices from the :attr:`_indices` group """
        retval = [random.choice(indices) for indices in self._indices]
          logger.debug(retval)
          return retval
  
      def get_filelist(self):
          """ Return a list of files, filtering out those frames which do not contain faces """
keep keep keep keep 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