public class SingleShotDetectionTranslator extends ImageTranslator<DetectedObjects>
Modifier and Type | Class and Description |
---|---|
static class |
SingleShotDetectionTranslator.Builder
The builder for SSD translator.
|
ImageTranslator.BaseBuilder<T extends ImageTranslator.BaseBuilder>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.String> |
classes |
protected java.lang.String |
synsetArtifactName |
protected float |
threshold |
Constructor and Description |
---|
SingleShotDetectionTranslator(SingleShotDetectionTranslator.Builder builder)
Creates the SSD translator from the given builder.
|
Modifier and Type | Method and Description |
---|---|
static SingleShotDetectionTranslator.Builder |
builder()
Creates a builder to build a
SingleShotDetectionTranslator . |
void |
prepare(NDManager manager,
Model model)
Prepares the translator with the manager and model to use.
|
DetectedObjects |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
getPipeline, processInput
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBatchifier
protected float threshold
protected java.lang.String synsetArtifactName
protected java.util.List<java.lang.String> classes
public SingleShotDetectionTranslator(SingleShotDetectionTranslator.Builder builder)
builder
- the builder for the translatorpublic void prepare(NDManager manager, Model model) throws java.io.IOException
Translator
manager
- the manager for the translatormodel
- the model to translate forjava.io.IOException
- if there is an error reading inputs for preparing the translatorpublic DetectedObjects processOutput(TranslatorContext ctx, NDList list) throws java.io.IOException
ctx
- the toolkit used for post-processinglist
- the output NDList after inferencejava.io.IOException
public static SingleShotDetectionTranslator.Builder builder()
SingleShotDetectionTranslator
.