Class BaseImagePreProcessor

java.lang.Object
ai.djl.modality.cv.translator.BaseImageTranslator<Void>
ai.djl.modality.cv.translator.BaseImagePreProcessor
All Implemented Interfaces:
PostProcessor<Void>, PreProcessor<Image>, Translator<Image,Void>

public class BaseImagePreProcessor extends BaseImageTranslator<Void>
A BaseImageTranslator that only handles pre-processing inputs.
  • Constructor Details

    • BaseImagePreProcessor

      public BaseImagePreProcessor(BaseImageTranslator.BaseBuilder<?> builder)
      Constructs an ImageTranslator with the provided builder.
      Parameters:
      builder - the data to build with
  • Method Details

    • processOutput

      public Void processOutput(TranslatorContext ctx, NDList list)
      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