          self.alignments.filter_hashes(face_hashes, filter_out=False)
          post_face_count = self.alignments.faces_count
          return pre_face_count - post_face_count
  
      def remove_alignment(self, item):
          """ Remove the alignment from the alignments file """
          del_count = 0
          frame_name, alignments, number_alignments = item[:3]
          for idx in self.alignments.yield_original_index_reverse(alignments, number_alignments):
              face_indexes = self.items.items.get(frame_name, [-1])
              if idx not in face_indexes:
                  del alignments[idx]
                  self.removed.add(frame_name)
                  logger.verbose("Removed alignment data for image: '%s' index: %s",
                                 frame_name, str(idx))
                  del_count += 1
              else:
                  logger.trace("Not removing alignment data for image: '%s' index: %s",
                               frame_name, str(idx))
          return del_count
  
  
  class Rename():
      """ Rename faces to match their source frame and position index """
      def __init__(self, alignments, arguments, faces=None):
          logger.debug("Initializing %s: (arguments: %s, faces: %s)",
 
</s> remove         face_hashes = list(self.items.items.keys())
 </s> add         face_hashes = self.items.items </s> remove         frame_faces = list()
        frame_faces = [(f_hash, idx)
                       for f_hash, details in self.alignments.hashes_to_frame.items()
                       for frame_name, idx in details.items()
                       if frame_name == frame_fullname]
 </s> add         frame_faces = [(x["hash"], idx) for idx, x in enumerate(details)] </s> remove         existing_frame = self.final_alignments.hashes_to_frame.get(alignment["hash"], None)
 </s> add         existing_frame = self._hashes_to_frame.get(alignment["hash"], None) </s> remove                          for frame, idx in self.alignments.hashes_to_frame[f_hash].items()]
 </s> add                          for frame, idx in hashes_to_frame[f_hash].items()]
          self.alignments.filter_hashes(face_hashes, filter_out=False)
          post_face_count = self.alignments.faces_count
          return pre_face_count - post_face_count
  

















  
  class Rename():
      """ Rename faces to match their source frame and position index """
      def __init__(self, alignments, arguments, faces=None):
          logger.debug("Initializing %s: (arguments: %s, faces: %s)",
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Multiple Tools->Alignmet speed ups (#785) 
tools/lib_alignments/jobs.py