Skip to content

Icon Visualization

Class: IconVisualizationBlockV1

Source: inference.core.workflows.core_steps.visualizations.icon.v1.IconVisualizationBlockV1

The IconVisualization block draws icons on an image using Supervision's sv.IconAnnotator. It supports two modes: 1. Static Mode: Position an icon at a fixed location (e.g., for watermarks) 2. Dynamic Mode: Position icons based on detection coordinates

Type identifier

Use the following identifier in step "type" field: roboflow_core/icon_visualization@v1to add the block as as step in your workflow.

Properties

Name Type Description Refs
name str Enter a unique identifier for this step..
copy_image bool Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations..
mode str Mode for placing icons: 'static' for fixed position (watermark), 'dynamic' for detection-based.
icon_width int Width of the icon in pixels.
icon_height int Height of the icon in pixels.
position str Position relative to detection for dynamic mode.
x_position int X coordinate for static mode. Positive values from left edge, negative from right edge.
y_position int Y coordinate for static mode. Positive values from top edge, negative from bottom edge.

The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.

Available Connections

Compatible Blocks

Check what blocks you can connect to Icon Visualization in version v1.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds Icon Visualization in version v1 has.

Bindings
  • input

    • image (image): The image to visualize on..
    • copy_image (boolean): Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations..
    • icon (image): The icon image to place on the input image (PNG with transparency recommended).
    • mode (string): Mode for placing icons: 'static' for fixed position (watermark), 'dynamic' for detection-based.
    • predictions (Union[keypoint_detection_prediction, object_detection_prediction, instance_segmentation_prediction]): Model predictions to place icons on (required for dynamic mode).
    • icon_width (integer): Width of the icon in pixels.
    • icon_height (integer): Height of the icon in pixels.
    • position (string): Position relative to detection for dynamic mode.
    • x_position (integer): X coordinate for static mode. Positive values from left edge, negative from right edge.
    • y_position (integer): Y coordinate for static mode. Positive values from top edge, negative from bottom edge.
  • output

    • image (image): Image in workflows.
Example JSON definition of step Icon Visualization in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/icon_visualization@v1",
    "image": "$inputs.image",
    "copy_image": true,
    "icon": "$inputs.icon",
    "mode": "static",
    "predictions": "$steps.object_detection_model.predictions",
    "icon_width": 64,
    "icon_height": 64,
    "position": "TOP_CENTER",
    "x_position": 10,
    "y_position": 10
}