Interface PreProcessor<I>

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

public interface PreProcessor<I>
An interface that provides pre-processing functionality.
  • Method Summary

    Modifier and Type
    Method
    Description
    Processes the input and converts it to NDList.
  • Method Details

    • processInput

      NDList processInput(TranslatorContext ctx, I input) throws Exception
      Processes the input and converts it to NDList.
      Parameters:
      ctx - the toolkit for creating the input NDArray
      input - the input object
      Returns:
      the NDList after pre-processing
      Throws:
      Exception - if an error occurs during processing input