              The background saver for saving the image
          extract_media: :class:`~plugins.extract.pipeline.ExtractMedia`
              The output from :class:`~plugins.extract.Pipeline.Extractor`
          """
          logger.trace("Outputting faces for %s", extract_media.filename)
          final_faces = []
          filename = os.path.splitext(os.path.basename(extract_media.filename))[0]
          extension = ".png"
  
          for idx, face in enumerate(extract_media.detected_faces):
 
</s> remove         saver: lib.images.ImagesSaver
            The background saver for saving the image
 </s> add         saver: :class:`lib.images.ImagesSaver` or ``None``
            The background saver for saving the image or ``None`` if faces are not to be saved </s> remove         feeds = {}
        figures = {}
        headers = {}
        for idx, side in enumerate(("a", "b")):
            samples = self.images[side]
            faces = samples[1]
 </s> add         feeds: Dict[Literal["a", "b"], np.ndarray] = {}
        for idx, side in enumerate(get_args(Literal["a", "b"])): </s> remove         :class:`numpy.ndarray`
            The batch of face images loaded from disk
 </s> add         raw_faces: :class:`numpy.ndarray`
            The full sized batch of training images for the given filenames
        list
            Batch of :class:`~lib.align.DetectedFace` objects for the given filename including the
            aligned face objects for the model output size </s> remove         model_inputs = []
        model_targets = []
 </s> add         model_inputs: List[List[np.ndarray]] = []
        model_targets: List[List[np.ndarray]] = [] </s> remove                                   raise_error=True, with_metadata=with_metadata): filename
                  for filename in filenames}
        batch = [None for _ in range(len(filenames))]
        if with_metadata:
            meta = [None for _ in range(len(filenames))]
        # There is no guarantee that the same filename will not be passed through multiple times
        # (and when shuffle is true this can definitely happen), so we can't just call
        # filenames.index().
        return_indices = {filename: [idx for idx, fname in enumerate(filenames)
                                     if fname == filename]
                          for filename in set(filenames)}
 </s> add                                   raise_error=True, with_metadata=with_metadata): idx
                  for idx, filename in enumerate(filenames)}
        logger.trace("Outputting faces for %s", extract_media.filename)  # type: ignore
              The background saver for saving the image
          extract_media: :class:`~plugins.extract.pipeline.ExtractMedia`
              The output from :class:`~plugins.extract.Pipeline.Extractor`
          """
        logger.trace("Outputting faces for %s", extract_media.filename)  # type: ignore
          final_faces = []
          filename = os.path.splitext(os.path.basename(extract_media.filename))[0]
          extension = ".png"
  
          for idx, face in enumerate(extract_media.detected_faces):
keep keep keep keep replace keep keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
scripts/extract.py