      # SKIP FACES #
      def remove_skipped_faces(self):
          """ Remove deleted faces from the loaded alignments """
          logger.debug("Filtering Faces")
          face_hashes = self.get_face_hashes()
          if not face_hashes:
              logger.debug("No face hashes. Not skipping any faces")
              return
          pre_face_count = self.alignments.faces_count
          self.alignments.filter_hashes(face_hashes, filter_out=False)
 
</s> remove         pre_face_count = self.alignments.faces_count
        self.alignments.filter_hashes(face_hashes, filter_out=False)
        logger.info("Faces filtered out: %s", pre_face_count - self.alignments.faces_count)

    def get_face_hashes(self):
        """ Check for the existence of an aligned directory for identifying
            which faces in the target frames should be swapped.
            If it exists, obtain the hashes of the faces in the folder """
 </s> add         pre_face_count = self._alignments.faces_count
        self._alignments.filter_hashes(face_hashes, filter_out=False)
        logger.info("Faces filtered out: %s", pre_face_count - self._alignments.faces_count)

    def _get_face_hashes(self):
        """ Check for the existence of an aligned directory for identifying which faces in the
        target frames should be swapped.

        Returns
        -------
        list
            A list of face hashes that exist in the given input aligned directory.
        """ </s> remove         faces = self.alignments.get_faces_in_frame(frame)
 </s> add         faces = self._alignments.get_faces_in_frame(frame_name) </s> remove     def detect_faces(self, filename, image):
        """ Extract the face from a frame (If alignments file not found) """
        self.extractor.input_queue.put(ExtractMedia(filename, image))
        faces = next(self.extractor.detected_faces())
 </s> add     def _detect_faces(self, filename, image):
        """ Extract the face from a frame for On-The-Fly conversion.

        Pulls detected faces out of the Extraction pipeline.

        Parameters
        ----------
        filename: str
            The filename to return the detected faces for
        image: :class:`numpy.ndarray`
            The frame that the detected faces exist in

        Returns
        -------
        list
            List of :class:`lib.faces_detect.DetectedFace` objects
         """
        self._extractor.input_queue.put(ExtractMedia(filename, image))
        faces = next(self._extractor.detected_faces()) </s> remove     def alignments_faces(self, frame, image):
        """ Get the face from alignments file """
        if not self.check_alignments(frame):
 </s> add     def _alignments_faces(self, frame_name, image):
        """ Return detected faces from an alignments file.

        Parameters
        ----------
        frame_name: str
            The name of the frame to return the detected faces for
        image: :class:`numpy.ndarray`
            The frame that the detected faces exist in

        Returns
        -------
        list
            List of :class:`lib.faces_detect.DetectedFace` objects
        """
        if not self._check_alignments(frame_name): </s> remove             detected_faces = self.detect_faces(filename, image)
 </s> add             detected_faces = self._detect_faces(filename, image)
        face_hashes = self._get_face_hashes()
      # SKIP FACES #
      def remove_skipped_faces(self):
          """ Remove deleted faces from the loaded alignments """
          logger.debug("Filtering Faces")
        face_hashes = self._get_face_hashes()
          if not face_hashes:
              logger.debug("No face hashes. Not skipping any faces")
              return
          pre_face_count = self.alignments.faces_count
          self.alignments.filter_hashes(face_hashes, filter_out=False)
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