SegmentationVisualizationConfig
Options & Configuration · AiDotNet.ComputerVision.Segmentation.Common
Visualization settings and utilities for segmentation outputs.
For Beginners
After segmenting an image, you usually want to visualize the result. This class provides configuration for creating color-coded overlay images where each class or instance gets a distinct color. The overlay can be blended with the original image to see both the segmentation and the original content.
Constructors
| Constructor | Summary |
|---|---|
SegmentationVisualizationConfig() |
Properties
| Property | Summary |
|---|---|
ValueTuple<byte, byte, byte> BackgroundColor { get; set; } |
Background color for areas with no segmentation (R, G, B). |
bool DrawContours { get; set; } |
Whether to draw contours/boundaries around segmented regions. |
bool ShowBoundingBoxes { get; set; } |
Whether to display instance bounding boxes. |
bool ShowLabels { get; set; } |
Whether to display class labels on the visualization. |
bool ShowScores { get; set; } |
Whether to display confidence scores alongside labels. |
bool UseFixedPalette { get; set; } |
Whether to use a fixed color palette or generate random colors. |
byte[] ColorPalette { get; set; } |
Custom color palette as RGB triplets [numColors, 3] with values in [0, 255]. |
double Alpha { get; set; } |
Alpha blending factor for overlay (0 = fully transparent, 1 = fully opaque). |
double MinDisplayConfidence { get; set; } |
Minimum confidence threshold for displaying instances. |
int ContourThickness { get; set; } |
Contour thickness in pixels. |
Methods
| Method | Summary |
|---|---|
byte[] GetADE20KPalette() |
Gets the default ADE20K color palette (150 classes). |
byte[] GetCOCOPalette() |
Gets the default COCO panoptic color palette (133 classes). |
byte[] GetCityscapesPalette() |
Gets a Cityscapes-style color palette (19 classes). |