Class DrawSegmentationStep
- java.lang.Object
-
- ai.konduit.serving.data.image.step.segmentation.index.DrawSegmentationStep
-
- All Implemented Interfaces:
ai.konduit.serving.pipeline.api.step.PipelineStep,ai.konduit.serving.pipeline.api.TextConfig,java.io.Serializable
public class DrawSegmentationStep extends java.lang.Object implements ai.konduit.serving.pipeline.api.step.PipelineStepDraw segmentation mask, optionally on an image.
Configuration:
- classColors: Optional: A list of colors to use for each class. Must be in one of the following formats: hex/HTML - "#788E87", RGB - "rgb(128,0,255)", or one of 16 HTML color name such as \"green\" (https://en.wikipedia.org/wiki/Web_colors#HTML_color_names). If no colors are specified, or not enough colors are specified, random colors are used instead (note consistent between runs)
- segmentArray: Name of the NDArray with the class indices, 0 to numClasses-1. Shape [1, height, width]
- image: Optional. Name of the image to draw the segmentation classes on to. If not provided, the segmentation classes are drawn onto a black background image
- outputName: Name of the output image
- opacity: Optional. Only used when "image" configuration is set. The opacity, between 0.0 and 1.0, of the mask to draw on the image. Default value of 0.5 if not set. Value of 0.0 is fully transparent, 1.0 is fully opaque.
- backgroundClass: Optional. If set: Don't draw this class. If not set: all classes will be drawn
- Author:
- Alex Black
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_OPACITYstatic java.lang.StringDEFAULT_OUTPUT_NAME
-
Constructor Summary
Constructors Constructor Description DrawSegmentationStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DrawSegmentationStepclassColors(java.lang.String... classColors)
-
-
-
Field Detail
-
DEFAULT_OUTPUT_NAME
public static final java.lang.String DEFAULT_OUTPUT_NAME
- See Also:
- Constant Field Values
-
DEFAULT_OPACITY
public static final double DEFAULT_OPACITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
classColors
public DrawSegmentationStep classColors(java.lang.String... classColors)
-
-