              filename, image, faces = item
              skip = self.opts.check_skipframe(filename)
  
              if not skip:
                  for idx, face in enumerate(faces):
                      image = self.convert_one_face(converter,
                                                    (filename, image, idx, face))
                  filename = str(self.output_dir / Path(filename).name)
                  cv2.imwrite(filename, image)  # pylint: disable=no-member
          except Exception as err:
              logger.error("Failed to convert image: '%s'. Reason: %s", filename, err)
              raise
 
</s> remove     def convert_one_face(self, converter, imagevars):
 </s> add     def convert_one_face(self, converter, image, face): </s> remove     def process_faces(self, filename, faces, save_queue):
        """ Perform processing on found faces """
 </s> add     def output_faces(self, filename, faces, save_queue):
        """ Output faces to save thread """ </s> remove         filename, image, idx, face = imagevars

        if self.opts.check_skipface(filename, idx):
            return image

 </s> add  </s> remove             index = 0
            original_file = ""
            if not self.dfl:
                index = int(filename[filename.rindex("_") + 1:])
                original_file = "{}".format(filename[:filename.rindex("_")])
            yield {"face_fullname": face,
                   "face_name": filename,
                   "face_extension": file_extension,
                   "frame_name": original_file,
                   "face_index": index}
 </s> add             face_hash = hash_image_file(os.path.join(self.folder, face))
            retval = {"face_fullname": face,
                      "face_name": filename,
                      "face_extension": file_extension,
                      "face_hash": face_hash}
            logger.trace(retval)
            yield retval </s> remove         filename = faces["filename"]

 </s> add 
                for face in faces:
                    image = self.convert_one_face(converter, image, face)
              filename, image, faces = item
              skip = self.opts.check_skipframe(filename)
  
              if not skip:
                for face in faces:
                    image = self.convert_one_face(converter, image, face)
                for face in faces:
                    image = self.convert_one_face(converter, image, face)
                for face in faces:
                    image = self.convert_one_face(converter, image, face)
                  filename = str(self.output_dir / Path(filename).name)
                  cv2.imwrite(filename, image)  # pylint: disable=no-member
          except Exception as err:
              logger.error("Failed to convert image: '%s'. Reason: %s", filename, err)
              raise
keep keep keep keep replace replace replace keep keep keep keep keep
 Add Face Hashes to Alignments (#550)

* Convert main scripts to use face hashes

* Alignment tool: Use hashes, add logging, add face rename function

* More logging. Update Manual tool to work with hashing 
scripts/convert.py