  
      def patch_faces(self, queue_in, queue_out, sample_size):
          """ Patch faces """
          logger.trace("Patching faces")
          self.converter.process(queue_in, queue_out)
          swapped = list()
          idx = 0
          while idx < sample_size:
              logger.trace("Patching image %s of %s", idx + 1, sample_size)
              item = queue_out.get()
 
</s> remove     def patch_faces(self, queue_in, queue_out, sample_size):
        """ Patch faces """
 </s> add     def _patch_faces(self, queue_in, queue_out, sample_size):
        """ Patch faces.

        Run the convert process on the swapped faces and return the patched faces.

        patch_queue_in: :class:`queue.Queue`
            The input queue for the patching process
        queue_out: :class:`queue.Queue`
            The output queue from the patching process
        sample_size: int
            The number of samples to be displayed

        Returns
        -------
        list
            The swapped faces patched with the selected convert settings
        """ </s> remove             while idx < self.sample_size:
                logger.debug("Predicting face %s of %s", idx + 1, self.sample_size)
                items = self.predictor.out_queue.get()
 </s> add             while idx < self._sample_size:
                logger.debug("Predicting face %s of %s", idx + 1, self._sample_size)
                items = self._predictor.out_queue.get() </s> remove             self.input_images.append({"filename": filename,
                                      "image": image,
                                      "detected_faces": [detected_face]})
        self.display.source = self.input_images
        self.display.update_source = True
        logger.debug("Selected frames: %s", [frame["filename"] for frame in self.input_images])

    def predict(self):
        """ Predict from the loaded frames """
        with self.lock:
            self.predicted_images = list()
            for frame in self.input_images:
                self.predictor.in_queue.put(frame)
 </s> add             self._input_images.append({"filename": filename,
                                       "image": image,
                                       "detected_faces": [detected_face]})
        self._display.source = self._input_images
        self._display.update_source = True
        logger.debug("Selected frames: %s", [frame["filename"] for frame in self._input_images])

    def _predict(self):
        """ Predict from the loaded frames.

        With a threading lock (to prevent stacking), run the selected faces through the Faceswap
        model predict function and add the output to :attr:`predicted`
        """
        with self._lock:
            self._predicted_images = list()
            for frame in self._input_images:
                self._predictor.in_queue.put(frame) </s> remove                     self.predicted_images.append(item)
                    logger.debug("Predicted face %s of %s", idx + 1, self.sample_size)
 </s> add                     self._predicted_images.append(item)
                    logger.debug("Predicted face %s of %s", idx + 1, self._sample_size) </s> remove                       for idx in range(self.total_columns)]
        # Get X and Y co-ords for each text item
 </s> add                       for idx in range(self._total_columns)]
        # Get X and Y co-ordinates for each text item
        self._converter.process(queue_in, queue_out)
  
      def patch_faces(self, queue_in, queue_out, sample_size):
          """ Patch faces """
          logger.trace("Patching faces")
        self._converter.process(queue_in, queue_out)
          swapped = list()
          idx = 0
          while idx < sample_size:
              logger.trace("Patching image %s of %s", idx + 1, sample_size)
              item = queue_out.get()
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 
tools/preview.py