Skip to content

Polygon Zone Visualization

Class: PolygonZoneVisualizationBlockV1

Source: inference.core.workflows.core_steps.visualizations.polygon_zone.v1.PolygonZoneVisualizationBlockV1

The PolygonZoneVisualization block draws polygon zone in an image with a specified color and opacity. Please note: zones will be drawn on top of image passed to this block, this block should be placed before other visualization blocks in the workflow.

Type identifier

Use the following identifier in step "type" field: roboflow_core/polygon_zone_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..
zone List[Any] Polygon zones (one for each batch) in a format [[(x1, y1), (x2, y2), (x3, y3), ...], ...]; each zone must consist of more than 2 points.
color str Color of the zone..
opacity float Transparency of the Mask overlay..

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 Polygon Zone Visualization in version v1.

Input and Output Bindings

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

Bindings
  • input

    • image (image): Select the input 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..
    • zone (list_of_values): Polygon zones (one for each batch) in a format [[(x1, y1), (x2, y2), (x3, y3), ...], ...]; each zone must consist of more than 2 points.
    • color (string): Color of the zone..
    • opacity (float_zero_to_one): Transparency of the Mask overlay..
  • output

    • image (image): Image in workflows.
Example JSON definition of step Polygon Zone Visualization in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/polygon_zone_visualization@v1",
    "image": "$inputs.image",
    "copy_image": true,
    "zone": "$inputs.zones",
    "color": "WHITE",
    "opacity": 0.3
}