          for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
              if self.save_queue.shutdown.is_set():
                  logger.debug("Save Queue: Stop signal received. Terminating")
                  break
              item = self.save_queue.get()
              if item == "EOF":
                  logger.debug("EOF Received")
                  break
              filename, image = item
              # Write out preview image for the GUI every 10 frames if writing to stream
 
</s> remove         for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
            if self.save_queue.shutdown.is_set():
 </s> add         for idx in tqdm(range(self._total_count), desc="Converting", file=sys.stdout):
            if self._queues["save"].shutdown.is_set(): </s> remove                 imwrite(preview_image, image)
            self.writer.write(filename, image)
        self.writer.close()
 </s> add                 cv2.imwrite(preview_image, image)
            self._writer.write(filename, image)
        self._writer.close() </s> remove         write_preview = self.args.redirect_gui and self.writer.is_stream
        preview_image = os.path.join(self.writer.output_folder, ".gui_preview.jpg")
 </s> add         write_preview = self._args.redirect_gui and self._writer.is_stream
        preview_image = os.path.join(self._writer.output_folder, ".gui_preview.jpg") </s> remove         for filename, image in self.images.load():
 </s> add         for filename, image in self._images.load(): </s> remove             if self.load_queue.shutdown.is_set():
 </s> add             if self._queues["load"].shutdown.is_set():
            item = self._queues["save"].get()
          for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
              if self.save_queue.shutdown.is_set():
                  logger.debug("Save Queue: Stop signal received. Terminating")
                  break
            item = self._queues["save"].get()
              if item == "EOF":
                  logger.debug("EOF Received")
                  break
              filename, image = item
              # Write out preview image for the GUI every 10 frames if writing to stream
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