public class ImageClassificationTranslator extends BaseImageTranslator<Classifications>
Translator for Image Classification tasks.| Modifier and Type | Class and Description |
|---|---|
static class |
ImageClassificationTranslator.Builder
A Builder to construct a
ImageClassificationTranslator. |
BaseImageTranslator.BaseBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.ClassificationBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.SynsetLoader| Constructor and Description |
|---|
ImageClassificationTranslator(ImageClassificationTranslator.Builder builder)
Constructs an Image Classification using
ImageClassificationTranslator.Builder. |
| Modifier and Type | Method and Description |
|---|---|
static ImageClassificationTranslator.Builder |
builder()
Creates a builder to build a
ImageClassificationTranslator. |
static ImageClassificationTranslator.Builder |
builder(java.util.Map<java.lang.String,?> arguments)
Creates a builder to build a
ImageClassificationTranslator with specified arguments. |
void |
prepare(NDManager manager,
Model model)
Prepares the translator with the manager and model to use.
|
Classifications |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
getBatchifier, getBooleanValue, getFloatValue, getIntValue, getPipeline, getStringValue, processInputpublic ImageClassificationTranslator(ImageClassificationTranslator.Builder builder)
ImageClassificationTranslator.Builder.builder - the data to build withpublic void prepare(NDManager manager, Model model) throws java.io.IOException
manager - the manager for the translatormodel - the model to translate forjava.io.IOException - if there is an error reading inputs for preparing the translatorpublic Classifications processOutput(TranslatorContext ctx, NDList list)
ctx - the toolkit used for post-processinglist - the output NDList after inferencepublic static ImageClassificationTranslator.Builder builder()
ImageClassificationTranslator.public static ImageClassificationTranslator.Builder builder(java.util.Map<java.lang.String,?> arguments)
ImageClassificationTranslator with specified arguments.arguments - arguments to specify builder options