Interface PostProcessor<O>

Type Parameters:
O - the type of the output object expected
All Known Subinterfaces:
NoBatchifyTranslator<I,O>, ServingTranslator, StreamingTranslator<I,O>, Translator<I,O>
All Known Implementing Classes:
BaseImageTranslator, BasicTranslator, BigGANTranslator, CrossEncoderServingTranslator, ImageClassificationTranslator, ImageFeatureExtractor, ImageServingTranslator, InstanceSegmentationTranslator, NoopTranslator, ObjectDetectionTranslator, QaServingTranslator, QATranslator, Sam2ServingTranslator, Sam2Translator, SemanticSegmentationTranslator, SimplePoseTranslator, SimpleText2TextTranslator, SingleShotDetectionTranslator, SpeechRecognitionTranslator, StyleTransferTranslator, TextClassificationServingTranslator, TextEmbeddingServingTranslator, TokenClassificationServingTranslator, YoloPoseTranslator, YoloSegmentationTranslator, YoloTranslator, YoloV5Translator, YoloV8Translator, ZeroShotClassificationServingTranslator

public interface PostProcessor<O>
An interface that provides post-processing functionality.
  • Method Summary

    Modifier and Type
    Method
    Description
    Processes the output NDList to the corresponding output object.
  • Method Details

    • processOutput

      O processOutput(TranslatorContext ctx, NDList list) throws Exception
      Processes the output NDList to the corresponding output object.
      Parameters:
      ctx - the toolkit used for post-processing
      list - the output NDList after inference, usually immutable in engines like PyTorch. @see Issue 1774
      Returns:
      the output object of expected type
      Throws:
      Exception - if an error occurs during processing output