Class InputStreamImagePreProcessor<T>
java.lang.Object
ai.djl.modality.cv.translator.wrapper.InputStreamImagePreProcessor<T>
- All Implemented Interfaces:
PreProcessor<InputStream>
Built-in
PreProcessor that provides image pre-processing from InputStream.-
Constructor Summary
ConstructorsConstructorDescriptionInputStreamImagePreProcessor(PreProcessor<Image> preProcessor) Creates aInputStreamImagePreProcessorinstance. -
Method Summary
Modifier and TypeMethodDescriptionprocessInput(TranslatorContext ctx, InputStream input) Processes the input and converts it to NDList.
-
Constructor Details
-
InputStreamImagePreProcessor
Creates aInputStreamImagePreProcessorinstance.- Parameters:
preProcessor- aPreProcessorthat can process image
-
-
Method Details
-
processInput
Processes the input and converts it to NDList.- Specified by:
processInputin interfacePreProcessor<T>- Parameters:
ctx- the toolkit for creating the input NDArrayinput- the input object- Returns:
- the
NDListafter pre-processing - Throws:
Exception- if an error occurs during processing input
-