          final_faces = []
          filename = os.path.splitext(os.path.basename(extract_media.filename))[0]
          extension = ".png"
  
          for idx, face in enumerate(extract_media.detected_faces):
              output_filename = f"{filename}_{idx}{extension}"
              meta = dict(alignments=face.to_png_meta(),
                          source=dict(alignments_version=self._alignments.version,
                                      original_filename=output_filename,
                                      face_index=idx,
                                      source_filename=os.path.basename(extract_media.filename),
 
</s> remove                                     face_index=idx,
 </s> add                                     face_index=real_face_id, </s> remove                 sub_folder = extract_media.sub_folders[idx]
                saver.save(output_filename, image, sub_folder)
            if extract_media.sub_folders[idx]:  # This is a filtered out face being binned
 </s> add                 saver.save(out_name, image, sub_folder)

            if sub_folder:  # This is a filtered out face being binned
                skip_idx += 1
        skip_idx = 0
        for face_id, face in enumerate(extract_media.detected_faces):
            real_face_id = face_id - skip_idx
            output_filename = f"{filename}_{real_face_id}{extension}"
          final_faces = []
          filename = os.path.splitext(os.path.basename(extract_media.filename))[0]
          extension = ".png"
  
        skip_idx = 0
        for face_id, face in enumerate(extract_media.detected_faces):
            real_face_id = face_id - skip_idx
            output_filename = f"{filename}_{real_face_id}{extension}"
        skip_idx = 0
        for face_id, face in enumerate(extract_media.detected_faces):
            real_face_id = face_id - skip_idx
            output_filename = f"{filename}_{real_face_id}{extension}"
              meta = dict(alignments=face.to_png_meta(),
                          source=dict(alignments_version=self._alignments.version,
                                      original_filename=output_filename,
                                      face_index=idx,
                                      source_filename=os.path.basename(extract_media.filename),
keep keep keep keep replace replace keep keep keep keep keep
 Bugfix: Extract. numbering issue when binning results 
scripts/extract.py