Class FileImagePreProcesor
java.lang.Object
ai.djl.modality.cv.translator.wrapper.FileImagePreProcesor
- All Implemented Interfaces:
PreProcessor<Path>
Built-in
PreProcessor that provides image pre-processing from file path.-
Constructor Summary
ConstructorsConstructorDescriptionFileImagePreProcesor(PreProcessor<Image> preProcessor) Creates aFileImagePreProcesorinstance. -
Method Summary
Modifier and TypeMethodDescriptionprocessInput(TranslatorContext ctx, Path input) Processes the input and converts it to NDList.
-
Constructor Details
-
FileImagePreProcesor
Creates aFileImagePreProcesorinstance.- Parameters:
preProcessor- a{@link PreProcessor}that 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
-