Package ai.djl.translate
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
public interface PostProcessor<O>
An interface that provides post-processing functionality.
-
Method Summary
Modifier and TypeMethodDescriptionprocessOutput(TranslatorContext ctx, NDList list) Processes the output NDList to the corresponding output object.
-
Method Details
-
processOutput
Processes the output NDList to the corresponding output object.- Parameters:
ctx- the toolkit used for post-processinglist- 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
-