T - the output object typepublic abstract class BaseImageTranslator<T> extends java.lang.Object implements Translator<Image,T>
Translator that provides default image pre-processing.| Modifier and Type | Class and Description |
|---|---|
static class |
BaseImageTranslator.BaseBuilder<T extends BaseImageTranslator.BaseBuilder>
A builder to extend for all classes extending the
BaseImageTranslator. |
static class |
BaseImageTranslator.ClassificationBuilder<T extends BaseImageTranslator.BaseBuilder>
A Builder to construct a
ImageClassificationTranslator. |
protected static class |
BaseImageTranslator.SynsetLoader |
| Constructor and Description |
|---|
BaseImageTranslator(BaseImageTranslator.BaseBuilder<?> builder)
Constructs an ImageTranslator with the provided builder.
|
| Modifier and Type | Method and Description |
|---|---|
Batchifier |
getBatchifier()
Gets the
Batchifier. |
NDList |
processInput(TranslatorContext ctx,
Image input)
Processes the input and converts it to NDList.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprepareprocessOutputprotected Pipeline pipeline
public BaseImageTranslator(BaseImageTranslator.BaseBuilder<?> builder)
builder - the data to build withpublic Batchifier getBatchifier()
Batchifier.getBatchifier in interface Translator<Image,T>Batchifierpublic NDList processInput(TranslatorContext ctx, Image input)
processInput in interface PreProcessor<Image>ctx - the toolkit for creating the input NDArrayinput - the input objectNDList after pre-processing