Package ai.djl.modality.cv.translator
Class InstanceSegmentationTranslator.Builder
- java.lang.Object
-
- ai.djl.modality.cv.translator.BaseImageTranslator.BaseBuilder<T>
-
- ai.djl.modality.cv.translator.BaseImageTranslator.ClassificationBuilder<InstanceSegmentationTranslator.Builder>
-
- ai.djl.modality.cv.translator.InstanceSegmentationTranslator.Builder
-
- Enclosing class:
- InstanceSegmentationTranslator
public static class InstanceSegmentationTranslator.Builder extends BaseImageTranslator.ClassificationBuilder<InstanceSegmentationTranslator.Builder>
The builder for Instance Segmentation translator.
-
-
Field Summary
-
Fields inherited from class ai.djl.modality.cv.translator.BaseImageTranslator.ClassificationBuilder
synsetLoader
-
Fields inherited from class ai.djl.modality.cv.translator.BaseImageTranslator.BaseBuilder
batchifier, flag, height, pipeline, width
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstanceSegmentationTranslatorbuild()Builds the translator.protected voidconfigPostProcess(java.util.Map<java.lang.String,?> arguments)InstanceSegmentationTranslator.BuilderoptMaxEdge(int maxEdge)Sets the maximum edge length of the rescaled image.InstanceSegmentationTranslator.BuilderoptShortEdge(int shortEdge)Sets the shorter edge length of the rescaled image.InstanceSegmentationTranslator.BuilderoptThreshold(float threshold)Sets the threshold for prediction accuracy.protected InstanceSegmentationTranslator.Builderself()-
Methods inherited from class ai.djl.modality.cv.translator.BaseImageTranslator.ClassificationBuilder
optSynset, optSynsetArtifactName, optSynsetUrl, validate
-
Methods inherited from class ai.djl.modality.cv.translator.BaseImageTranslator.BaseBuilder
addTransform, configPreProcess, optBatchifier, optFlag, setPipeline
-
-
-
-
Method Detail
-
optThreshold
public InstanceSegmentationTranslator.Builder optThreshold(float threshold)
Sets the threshold for prediction accuracy.Predictions below the threshold will be dropped.
- Parameters:
threshold- the threshold for prediction accuracy- Returns:
- the builder
-
optShortEdge
public InstanceSegmentationTranslator.Builder optShortEdge(int shortEdge)
Sets the shorter edge length of the rescaled image.- Parameters:
shortEdge- the length of the short edge- Returns:
- the builder
-
optMaxEdge
public InstanceSegmentationTranslator.Builder optMaxEdge(int maxEdge)
Sets the maximum edge length of the rescaled image.- Parameters:
maxEdge- the length of the longest edge- Returns:
- the builder
-
self
protected InstanceSegmentationTranslator.Builder self()
- Specified by:
selfin classBaseImageTranslator.BaseBuilder<InstanceSegmentationTranslator.Builder>
-
configPostProcess
protected void configPostProcess(java.util.Map<java.lang.String,?> arguments)
-
build
public InstanceSegmentationTranslator build()
Builds the translator.- Returns:
- the new translator
-
-