Package ai.djl.modality.cv.translator
Class StyleTransferTranslator
- java.lang.Object
-
- ai.djl.modality.cv.translator.StyleTransferTranslator
-
- All Implemented Interfaces:
NoBatchifyTranslator<Image,Image>,PostProcessor<Image>,PreProcessor<Image>,Translator<Image,Image>
public class StyleTransferTranslator extends java.lang.Object implements NoBatchifyTranslator<Image,Image>
Built-inTranslatorthat provides preprocessing and postprocessing for StyleTransfer.
-
-
Constructor Summary
Constructors Constructor Description StyleTransferTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDListprocessInput(TranslatorContext ctx, Image input)Processes the input and converts it to NDList.ImageprocessOutput(TranslatorContext ctx, NDList list)Processes the output NDList to the corresponding output object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ai.djl.translate.NoBatchifyTranslator
getBatchifier
-
Methods inherited from interface ai.djl.translate.Translator
prepare
-
-
-
-
Method Detail
-
processInput
public NDList processInput(TranslatorContext ctx, Image input)
Processes the input and converts it to NDList.- Specified by:
processInputin interfacePreProcessor<Image>- Parameters:
ctx- the toolkit for creating the input NDArrayinput- the input object- Returns:
- the
NDListafter pre-processing
-
processOutput
public Image processOutput(TranslatorContext ctx, NDList list)
Processes the output NDList to the corresponding output object.- Specified by:
processOutputin interfacePostProcessor<Image>- Parameters:
ctx- the toolkit used for post-processinglist- the output NDList after inference- Returns:
- the output object of expected type
-
-