              logger.trace("Saving face: (frame: %s, face index: %s)",  # type: ignore
                           frame_name, face_index)
  
              self._alignments.update_face(frame_name, face_index, face.to_alignment())
              metadata = dict(alignments=face.to_png_meta(),
                              source=extractor_output.frame_metadata)
              self._faces_saver.save(extractor_output.filename,
                                     encode_image(extractor_output.image, ".png", metadata=metadata))
  
              if self._saver is not None:
                  face.image = extractor_output.image
 
</s> remove                      "detected_faces: %s)", self.__class__.__name__, filename, image.shape,
                     detected_faces)
 </s> add                      "detected_faces: %s, is_aligned: %s)", self.__class__.__name__, filename,
                     image.shape, detected_faces, is_aligned) </s> remove                  detected_faces: Optional[List["DetectedFace"]] = None) -> None:
 </s> add                  detected_faces: Optional[List["DetectedFace"]] = None,
                 is_aligned: bool = False) -> None: </s> remove     def add_frame_metadata(self, metadata: Dict[str, Any]) -> None:
 </s> add     def add_frame_metadata(self, metadata: "PNGHeaderSourceDict") -> None: </s> remove             if not item.detected_faces:
 </s> add             if not item.is_aligned and not item.detected_faces: </s> remove         skip_list = []
        for idx, filename in enumerate(self._images.file_list):
            if idx % self._skip_num != 0:
                logger.trace("Adding image '%s' to skip list due to "  # type: ignore
                             "extract_every_n = %s", filename, self._skip_num)
                skip_list.append(idx)
            # Items may be in the alignments file if skip-existing[-faces] is selected
            elif os.path.basename(filename) in self._alignments.data:
                self._existing_count += 1
                logger.trace("Removing image: '%s' due to previously existing",  # type: ignore
                             filename)
                skip_list.append(idx)
        if self._existing_count != 0:
            logger.info("Skipping %s frames due to skip_existing/skip_existing_faces.",
                        self._existing_count)
        logger.debug("Adding skip list: %s", skip_list)
        self._images.add_skip_list(skip_list)
 </s> add 
            metadata: "PNGHeaderDict" = dict(alignments=face.to_png_meta(),
                                             source=extractor_output.frame_metadata)
              logger.trace("Saving face: (frame: %s, face index: %s)",  # type: ignore
                           frame_name, face_index)
  
              self._alignments.update_face(frame_name, face_index, face.to_alignment())
            metadata: "PNGHeaderDict" = dict(alignments=face.to_png_meta(),
                                             source=extractor_output.frame_metadata)
            metadata: "PNGHeaderDict" = dict(alignments=face.to_png_meta(),
                                             source=extractor_output.frame_metadata)
              self._faces_saver.save(extractor_output.filename,
                                     encode_image(extractor_output.image, ".png", metadata=metadata))
  
              if self._saver is not None:
                  face.image = extractor_output.image
keep keep keep keep replace replace keep keep keep keep keep
 Update Face Filter
  - Remove old face filter
  - plugins.extract.pipeline: Expose plugins directly
  - Change `is_aligned` from plugin level to ExtractMedia level
  - Allow extract pipeline to take faceswap aligned images
  - Add ability for recognition plugins to accept aligned faces as input
  - Add face filter to recognition plugin
  - Move extractor pipeline IO ops to own class 
tools/mask/mask.py