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 aInputStreamImagePreProcessor
instance. -
Method Summary
Modifier and TypeMethodDescriptionprocessInput
(TranslatorContext ctx, InputStream input) Processes the input and converts it to NDList.
-
Constructor Details
-
InputStreamImagePreProcessor
Creates aInputStreamImagePreProcessor
instance.- Parameters:
preProcessor
- aPreProcessor
that can process image
-
-
Method Details
-
processInput
Processes the input and converts it to NDList.- Specified by:
processInput
in interfacePreProcessor<T>
- Parameters:
ctx
- the toolkit for creating the input NDArrayinput
- the input object- Returns:
- the
NDList
after pre-processing - Throws:
Exception
- if an error occurs during processing input
-