public class InstanceSegmentationTranslator extends BaseImageTranslator<DetectedObjects>
BaseImageTranslator
that post-process the NDArray
into DetectedObjects
with boundaries at the detailed pixel level.Modifier and Type | Class and Description |
---|---|
static class |
InstanceSegmentationTranslator.Builder
The builder for Instance Segmentation translator.
|
BaseImageTranslator.BaseBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.ClassificationBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.SynsetLoader
pipeline
Constructor and Description |
---|
InstanceSegmentationTranslator(InstanceSegmentationTranslator.Builder builder)
Creates the Instance Segmentation translator from the given builder.
|
Modifier and Type | Method and Description |
---|---|
static InstanceSegmentationTranslator.Builder |
builder()
Creates a builder to build a
InstanceSegmentationTranslator . |
static InstanceSegmentationTranslator.Builder |
builder(java.util.Map<java.lang.String,?> arguments)
Creates a builder to build a
InstanceSegmentationTranslator with specified arguments. |
void |
prepare(TranslatorContext ctx)
Prepares the translator with the manager and model to use.
|
NDList |
processInput(TranslatorContext ctx,
Image image)
Processes the input and converts it to NDList.
|
DetectedObjects |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
getBatchifier
public InstanceSegmentationTranslator(InstanceSegmentationTranslator.Builder builder)
builder
- the builder for the translatorpublic void prepare(TranslatorContext ctx) throws java.io.IOException
ctx
- the context for the Predictor
.java.io.IOException
public NDList processInput(TranslatorContext ctx, Image image)
processInput
in interface PreProcessor<Image>
processInput
in class BaseImageTranslator<DetectedObjects>
ctx
- the toolkit for creating the input NDArrayimage
- the input objectNDList
after pre-processingpublic DetectedObjects processOutput(TranslatorContext ctx, NDList list)
ctx
- the toolkit used for post-processinglist
- the output NDList after inferencepublic static InstanceSegmentationTranslator.Builder builder()
InstanceSegmentationTranslator
.public static InstanceSegmentationTranslator.Builder builder(java.util.Map<java.lang.String,?> arguments)
InstanceSegmentationTranslator
with specified arguments.arguments
- arguments to specify builder options