Class UrlImagePreProcessor<T>
java.lang.Object
ai.djl.modality.cv.translator.wrapper.UrlImagePreProcessor<T>
- Type Parameters:
T- the output object type
- All Implemented Interfaces:
PreProcessor<URL>
Built-in
PreProcessor that provides image pre-processing from URL.-
Constructor Summary
ConstructorsConstructorDescriptionUrlImagePreProcessor(PreProcessor<Image> preProcessor) Creates aUrlImagePreProcessorinstance. -
Method Summary
Modifier and TypeMethodDescriptionprocessInput(TranslatorContext ctx, URL input) Processes the input and converts it to NDList.
-
Constructor Details
-
UrlImagePreProcessor
Creates aUrlImagePreProcessorinstance.- 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
-