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 aFileImagePreProcessorinstance. -
Method Summary
Modifier and TypeMethodDescriptionprocessInput(TranslatorContext ctx, Path input) Processes the input and converts it to NDList.
-
Constructor Details
-
FileImagePreProcessor
Creates aFileImagePreProcessorinstance.- Parameters:
preProcessor- aPreProcessorthat can process image
-
-
Method Details
-
processInput
Processes the input and converts it to NDList.- Specified by:
processInputin interfacePreProcessor<Path>- 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
-