public class InstanceSegmentationTranslator extends ImageTranslator<DetectedObjects> implements Transform
ImageTranslator 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.
|
ImageTranslator.BaseBuilder<T extends ImageTranslator.BaseBuilder>| 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. |
NDList |
processInput(TranslatorContext ctx,
java.awt.image.BufferedImage image)
Processes the
BufferedImage input and converts it to NDList. |
DetectedObjects |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
NDArray |
transform(NDArray array)
Applies the
Transform to the given NDArray. |
getPipelineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBatchifierpublic InstanceSegmentationTranslator(InstanceSegmentationTranslator.Builder builder)
builder - the builder for the translatorpublic NDList processInput(TranslatorContext ctx, java.awt.image.BufferedImage image)
BufferedImage input and converts it to NDList.processInput in interface PreProcessor<java.awt.image.BufferedImage>processInput in class ImageTranslator<DetectedObjects>ctx - the toolkit that helps create the input NDArrayimage - the BufferedImage inputNDListpublic DetectedObjects processOutput(TranslatorContext ctx, NDList list) throws java.io.IOException
processOutput in interface PostProcessor<DetectedObjects>ctx - the toolkit used for post-processinglist - the output NDList after inferencejava.io.IOExceptionpublic static InstanceSegmentationTranslator.Builder builder()
InstanceSegmentationTranslator.