Class FileImagePreProcessor
java.lang.Object
ai.djl.modality.cv.translator.wrapper.FileImagePreProcessor
- All Implemented Interfaces:
PreProcessor<Path>
Built-in
PreProcessor
that provides image pre-processing from file path.-
Constructor Summary
ConstructorsConstructorDescriptionFileImagePreProcessor
(PreProcessor<Image> preProcessor) Creates aFileImagePreProcessor
instance. -
Method Summary
Modifier and TypeMethodDescriptionprocessInput
(TranslatorContext ctx, Path input) Processes the input and converts it to NDList.
-
Constructor Details
-
FileImagePreProcessor
Creates aFileImagePreProcessor
instance.- Parameters:
preProcessor
- aPreProcessor
that can process image
-
-
Method Details
-
processInput
Processes the input and converts it to NDList.- Specified by:
processInput
in interfacePreProcessor<Path>
- 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
-