Package ai.djl.translate
Interface PreProcessor<I>
-
- Type Parameters:
I
- the type of the input object
- All Known Subinterfaces:
NoBatchifyTranslator<I,O>
,ServingTranslator
,Translator<I,O>
- All Known Implementing Classes:
BaseImageTranslator
,BigGANTranslator
,FileTranslator
,ImageClassificationTranslator
,ImageServingTranslator
,InputStreamTranslator
,InstanceSegmentationTranslator
,NoopTranslator
,ObjectDetectionTranslator
,QaServingTranslator
,QATranslator
,SemanticSegmentationTranslator
,SimplePoseTranslator
,SimpleText2TextTranslator
,SingleShotDetectionTranslator
,StyleTransferTranslator
,TextClassificationServingTranslator
,UrlTranslator
,YoloTranslator
,YoloV5Translator
public interface PreProcessor<I>
An interface that provides pre-processing functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NDList
processInput(TranslatorContext ctx, I input)
Processes the input and converts it to NDList.
-
-
-
Method Detail
-
processInput
NDList processInput(TranslatorContext ctx, I input) throws java.lang.Exception
Processes the input and converts it to NDList.- Parameters:
ctx
- the toolkit for creating the input NDArrayinput
- the input object- Returns:
- the
NDList
after pre-processing - Throws:
java.lang.Exception
- if an error occurs during processing input
-
-