Visualizers

May 22, 2026 ยท View on GitHub

Note

Important: In all visualizations, the left side always displays the Ground Truth (GT) and the right side shows the Prediction.

Note

๐Ÿ“ Looking for expected predictions and targets shapes for each task?
Refer to the Prediction Shapes Overview for the expected prediction formats, and see LuxonisLoaderTorch for details on the target formats.

Visualizers are used to render the output of a node. They are used in the visualizers field of the Node configuration.

Table Of Contents

BBoxVisualizer

Visualizer for bounding box detection task.

Parameters:

KeyTypeDefault valueDescription
labelsdict[int, str] | list[str] | NoneNoneEither a dictionary mapping class indices to names, or a list of names. If list is provided, the label mapping is done by index. By default, no labels are drawn
draw_labelsboolTrueWhether to draw class labels for predictions and targets
draw_scoresboolFalseWhether to append prediction confidence scores to the rendered labels. If draw_labels=False, only the score is drawn
colorsdict[str, tuple[int, int, int] | str] | list[tuple[int, int, int] | str] | NoneNoneColors to use for the bounding boxes. Either a dictionary mapping class names to colors, or a list of colors. Color can be either a tuple of RGB values or a hex string
fillboolFalseWhether to fill the bounding boxes
widthint1The width of the bounding box lines
fontstr | NoneNoneA filename containing a TrueType font
font_sizeint | NoneNoneFont size used for the labels
scalefloat1.0Scales the canvas and the annotations by a given factor

Example:

bounding_box_viz_example

KeypointVisualizer

Visualizer for instance keypoint detection task.

Parameters:

KeyTypeDefault valueDescription
visibility_thresholdfloat0.5Threshold for visibility of keypoints. If the visibility of a keypoint is below this threshold, it is considered as not visible
connectivitylist[tuple[int, int]] | NoneNoneList of tuples of keypoint indices that define the connections in the skeleton
visible_colorstr | tuple[int, int, int]"red"Color of visible keypoints
nonvisible_colorstr | tuple[int, int, int ] | NoneNoneColor of non-visible keypoints. If None, non-visible keypoints are not drawn
radiusint | NoneNoneRadius of drawn keypoint dots. If None, dynamically determine this based on image dimensions
scalefloat1.0Scales the canvas and the annotations by a given factor
draw_indicesboolFalseDraw keypoint indices next to the keypoints

This visualizer also supports inherited BBoxVisualizer options for the bounding box overlay, including draw_labels and draw_scores.

Example:

keypoints_viz_example

SegmentationVisualizer

Visualizer for segmentation tasks.

Parameters:

KeyTypeDefault valueDescription
colorstr | tuple[int, int, int]"#5050FF"Color of the segmentation masks
alphafloat0.6Alpha value of the segmentation masks
scalefloat1.0Scales the canvas and the annotations by a given factor

Example:

segmentation_viz_example

ClassificationVisualizer

Visualizer for classification tasks.

Parameters:

KeyTypeDefault valueDescription
include_plotboolTrueWhether to include a plot of the class probabilities in the visualization
colortuple[int, int, int](255, 0, 0)Color of the text
font_scalefloat1.0Scale of the font
thicknessint1Line thickness of the font
multi_labelboolFalseSet to True for multi-label classification, otherwise False for single-label
scalefloat1.0Scales the canvas and the annotations by a given factor

Example:

class_viz_example

EmbeddingsVisualizer

Visualizer for embedding tasks.

Parameters:

KeyTypeDefault valueDescription
z_score_thresholdfloat3.0Threshold for z-score filtering. Embeddings with z-score higher than this value are considered as outliers and are not drawn.

Example:

emb_viz_example

OCRVisualizer

Visualizer for OCR tasks.

Parameters:

KeyTypeDefault valueDescription
font_scalefloat0.5Font scale of the text. Defaults to 0.5.
colortuple[int, int, int](0, 0, 0)Color of the text. Defaults to (0, 0, 0).
thicknessint1Thickness of the text. Defaults to 1.
scalefloat1.0Scales the canvas and the annotations by a given factor

Example:

ocr_viz_example

InstanceSegmentationVisualizer

Visualizer for instance segmentation tasks.

Parameters:

KeyTypeDefault valueDescription
labelsdict[int, str] | list[str] | NoneNoneEither a dictionary mapping class indices to names, or a list of names. If list is provided, the label mapping is done by index. By default, no labels are drawn
draw_labelsboolTrueWhether to draw class labels for predictions and targets
draw_scoresboolFalseWhether to append prediction confidence scores to the rendered labels. If draw_labels=False, only the score is drawn
colorsdict[str, tuple[int, int, int] | str] | list[tuple[int, int, int] | str] | NoneNoneColors to use for the bounding boxes. Either a dictionary mapping class names to colors, or a list of colors. Color can be either a tuple of RGB values or a hex string
fillboolFalseWhether to fill the bounding boxes
widthint1The width of the bounding box lines
fontstr | NoneNoneA filename containing a TrueType font
font_sizeint | NoneNoneFont size used for the labels
scalefloat1.0Scales the canvas and the annotations by a given factor

Example:

instance_esg_viz_example

InstanceSegKeypointVisualizer

Visualizer for joint instance segmentation and keypoint tasks.

This visualizer overlays:

  • bounding boxes
  • instance segmentation masks
  • keypoints

Parameters:

KeyTypeDefault valueDescription
labelsdict[int, str] | list[str] | NoneNoneEither a dictionary mapping class indices to names, or a list of names. If list is provided, the label mapping is done by index
draw_labelsboolTrueWhether to draw class labels. Defaults to True
draw_scoresboolFalseWhether to append prediction confidence scores to the rendered labels. If draw_labels=False, only the score is drawn
colorsdict[str, tuple[int, int, int] | str] | list[tuple[int, int, int] | str] | NoneNoneColors to use for the bounding boxes and masks. Either a dictionary mapping class names to colors, or a list of colors. Color can be either a tuple of RGB values or a hex string
fillboolFalseWhether to fill the bounding boxes
widthint | NoneNoneThe width of the bounding box lines
fontstr | NoneNoneA filename containing a TrueType font
font_sizeint | NoneNoneFont size used for the labels
alphafloat0.6Alpha value of the segmentation masks
visibility_thresholdfloat0.5Threshold for visibility of keypoints. If the visibility of a keypoint is below this threshold, it is considered as not visible
connectivitylist[tuple[int, int]] | NoneNoneList of tuples of keypoint indices that define the connections in the skeleton
visible_colorstr | tuple[int, int, int]"red"Color of visible keypoints
nonvisible_colorstr | tuple[int, int, int] | NoneNoneColor of non-visible keypoints. If None, non-visible keypoints are not drawn
radiusint | NoneNoneRadius of drawn keypoint dots. If None, dynamically determine this based on image dimensions
draw_indicesboolFalseDraw keypoint indices next to the keypoints
scalefloat1.0Scales the canvas and the annotations by a given factor

Example

instance_seg_keypoints

FOMOVisualizer

Visualizer for FOMO object detection.

Parameters:

KeyTypeDefault valueDescription
colorsdict[str, tuple[int, int, int] | str] | list[tuple[int, int, int] | str] | NoneNoneColors to use for the different point classes. Either a dictionary mapping class names to colors, or a list of colors. Color can be either a tuple of RGB values or a hex string
visibility_thresholdfloat0.5Threshold for visibility of detected points. If the visibility of a point is below this threshold, it will not be shown
radiusint5Radius to draw the points
scalefloat1.0Scales the canvas and the annotations by a given factor

Example:

fomo_viz_example