          Pairs the detected faces back up with their original frame before yielding each frame.
  
          Parameters
          ----------
          batch : dict
              The final ``dict`` from the `plugin` process. It must contain the `keys`:
              ``detected_faces``, ``landmarks``, ``filename``
  
          Yields
          ------
          :class:`~plugins.extract.pipeline.ExtractMedia`
              The :attr:`DetectedFaces` list will be populated for this class with the bounding boxes
 
</s> remove     def finalize(self, batch):
 </s> add     def finalize(self, batch: AlignerBatch) -> Generator[ExtractMedia, None, None]: </s> remove         for face, landmarks in zip(batch["detected_faces"], batch["landmarks"]):
 </s> add         for face, landmarks in zip(batch.detected_faces, batch.landmarks): </s> remove     def _collect_item(self, queue):
        """ Collect the item from the :attr:`_rollover` dict or from the queue
            Add face count per frame to self._faces_per_filename for joining
            batches back up in finalize """
 </s> add     def _collect_item(self, queue: "Queue") -> Union[Literal["EOF"], ExtractMedia]:
        """ Collect the item from the :attr:`_rollover` dict or from the queue. Add face count per
        frame to self._faces_per_filename for joining batches back up in finalize

        Parameters
        ----------
        queue: :class:`queue.Queue`
            The input queue to the aligner. Should contain
            :class:`~plugins.extract.pipeline.ExtractMedia` objects

        Returns
        -------
        :class:`~plugins.extract.pipeline.ExtractMedia` or EOF
            The next extract media object, or EOF if pipe has ended
        """ </s> remove         batch.update(retval)
 </s> add  </s> remove     def process_output(self, batch):
        """ Process the output from the model """
 </s> add     def process_output(self, batch: AlignerBatch) -> AlignerBatch:
        """ Process the output from the model

        Parameters
        ----------
        batch: :class:`AlignerBatch`
            The current batch from the model with :attr:`predictions` populated

        Returns
        -------
        :class:`AlignerBatch`
            The current batch with the :attr:`landmarks` populated
        """
        batch : :class:`AlignerBatch`
            The final batch item from the `plugin` process.
          Pairs the detected faces back up with their original frame before yielding each frame.
  
          Parameters
          ----------
        batch : :class:`AlignerBatch`
            The final batch item from the `plugin` process.
        batch : :class:`AlignerBatch`
            The final batch item from the `plugin` process.
        batch : :class:`AlignerBatch`
            The final batch item from the `plugin` process.
  
          Yields
          ------
          :class:`~plugins.extract.pipeline.ExtractMedia`
              The :attr:`DetectedFaces` list will be populated for this class with the bounding boxes
keep keep keep keep replace replace replace keep keep keep keep keep
 Extract updates:
  - Default CPU detector to MTCNN
  - add basic Aligner false positive filters
  - Typing: align + plugins
  - Use specific AlignerBatch class for alignment
  - 
plugins/extract/align/_base.py