      # <<< PREDICT WRAPPER >>> #
      def _predict(self, batch):
          """ Just return the aligner's predict function """
          try:
              batch["prediction"] = [self.predict(feed) for feed in batch["feed"]]
              return batch
          except tf_errors.ResourceExhaustedError as err:
              msg = ("You do not have enough GPU memory available to run detection at the "
                     "selected batch size. You can try a number of things:"
                     "\n1) Close any other application that is using your GPU (web browsers are "
 
</s> remove     def _predict(self, batch):
        """ Just return the aligner's predict function """
 </s> add     def _predict(self, batch: AlignerBatch) -> AlignerBatch:
        """ Just return the aligner's predict function

        Parameters
        ----------
        batch: :class:`AlignerBatch`
            The current batch to find alignments for

        Returns
        -------
        :class:`AlignerBatch`
            The batch item with the :attr:`prediction` populated

        Raises
        ------
        FaceswapError
            If GPU resources are exhausted
        """ </s> remove         logger.trace(retval)
 </s> add         logger.trace(retval)  # type:ignore </s> remove         batch.update(retval)
 </s> add  </s> remove             subbatch = {key: val
                        for key, val in batch.items()
                        if key not in ["feed", "prediction"] + self._additional_keys}
            subbatch["prediction"] = batch["prediction"][idx]
            for key in self._additional_keys:
                subbatch[key] = batch[key][idx]
 </s> add             # Create a pseudo object that only populates the data, feed and prediction slots with
            # the current re-feed iteration
            subbatch = AlignerBatch(image=batch.image,
                                    detected_faces=batch.detected_faces,
                                    filename=batch.filename,
                                    feed=[batch.feed[idx]],
                                    prediction=batch.prediction[idx],
                                    data=[batch.data[idx]])
            batch.prediction = np.array([self.predict(feed) for feed in batch.feed])
      # <<< PREDICT WRAPPER >>> #
      def _predict(self, batch):
          """ Just return the aligner's predict function """
          try:
            batch.prediction = np.array([self.predict(feed) for feed in batch.feed])
              return batch
          except tf_errors.ResourceExhaustedError as err:
              msg = ("You do not have enough GPU memory available to run detection at the "
                     "selected batch size. You can try a number of things:"
                     "\n1) Close any other application that is using your GPU (web browsers are "
keep keep keep keep 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