Class 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.PipelineStep
    Draw 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DrawSegmentationStep classColors​(java.lang.String... classColors)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface ai.konduit.serving.pipeline.api.step.PipelineStep

        name
      • Methods inherited from interface ai.konduit.serving.pipeline.api.TextConfig

        toJson, toYaml
    • Constructor Detail

      • DrawSegmentationStep

        public DrawSegmentationStep()