          return self.writer.config.get("draw_transparent", False)
  
      @property
      def pre_encode(self):
          """ Return the writer's pre-encoder """
          dummy = np.zeros((20, 20, 3), dtype="uint8")
          test = self.writer.pre_encode(dummy)
          retval = None if test is None else self.writer.pre_encode
          logger.debug("Writer pre_encode function: %s", retval)
          return retval
 
</s> remove         """ Return either selected value or default """
 </s> add         """ Return either initial value or default """ </s> remove     def count_images(self):
        """ Number of images or frames """
        if self.is_video:
            retval = int(count_frames(self.args.input_dir, fast=True))
 </s> add     @property
    def is_video(self):
        """bool: ``True`` if the input is a video file otherwise ``False``. """
        return self._is_video

    @property
    def input_images(self):
        """str or list: Path to the video file if the input is a video otherwise list of
        image paths. """
        return self._input_images

    @property
    def images_found(self):
        """int: The number of frames that exist in the video file, or the folder of images. """
        return self._images_found

    def _count_images(self):
        """ Get the number of Frames from a video file or folder of images.

        Returns
        -------
        int
            The number of frames in the image source
        """
        if self._is_video:
            retval = int(count_frames(self._args.input_dir, fast=True)) </s> remove     def random_choice(self):
        """ Return for random indices from the indices group """
        retval = [random.choice(indices) for indices in self.indices]
 </s> add     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] </s> remove             logger.info("Input Directory: %s", self.args.input_dir)
 </s> add             logger.info("Input Directory: %s", self._args.input_dir) </s> remove         elif self.args.jobs > 0:
            retval = min(self.args.jobs, total_cpus(), self.images.images_found)
 </s> add         elif self._args.jobs > 0:
            retval = min(self._args.jobs, total_cpus(), self._images.images_found)
        """ python function: Selected writer's pre-encode function, if it has one,
        otherwise ``None`` """
          return self.writer.config.get("draw_transparent", False)
  
      @property
      def pre_encode(self):
        """ python function: Selected writer's pre-encode function, if it has one,
        otherwise ``None`` """
          dummy = np.zeros((20, 20, 3), dtype="uint8")
          test = self.writer.pre_encode(dummy)
          retval = None if test is None else self.writer.pre_encode
          logger.debug("Writer pre_encode function: %s", retval)
          return retval
keep keep keep keep 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 
scripts/convert.py