Polygon Zone Visualization¶
Class: PolygonZoneVisualizationBlockV1
Source: inference.core.workflows.core_steps.visualizations.polygon_zone.v1.PolygonZoneVisualizationBlockV1
Draw polygon zones on an image to visualize monitoring areas, displaying colored polygon overlays for zone-based detection and counting workflows that track objects within irregular, custom-defined regions.
How This Block Works¶
This block takes an image and polygon zone coordinates (a list of points defining a polygon shape) and draws a filled polygon overlay to visualize the monitoring zone. The block:
- Takes an image and polygon zone coordinates (a list of points: [(x1, y1), (x2, y2), (x3, y3), ...]) as input
- Creates a filled polygon mask from the zone coordinates using the specified color
- Overlays the filled polygon onto the image with the specified opacity, creating a semi-transparent zone visualization
- Returns an annotated image with the polygon zone overlay on the original image
The block visualizes polygon zones used to define irregular monitoring areas for detection, counting, or tracking workflows. The polygon is drawn as a filled shape between the specified points, creating a closed region that can represent any custom area shape (unlike rectangular bounding boxes). This allows for flexible zone definitions that match real-world boundaries, such as specific floor areas, irregular regions of interest, or complex monitoring zones. The zone overlay is semi-transparent, allowing the underlying image details to remain visible while clearly indicating the monitoring area. Note: This block should typically be placed before other visualization blocks in the workflow, as the polygon zone provides a background reference layer for object detection visualizations.
Common Use Cases¶
- Zone Detection Visualization: Visualize polygon zones for object detection or counting workflows where objects are tracked within irregular, custom-defined areas, displaying the monitoring boundaries clearly
- Area-Based Monitoring: Display polygon zones for area-based monitoring applications such as occupancy tracking, people counting in specific regions, or object presence detection within defined spaces
- Custom Region Visualization: Visualize custom monitoring regions that don't fit rectangular boundaries, such as irregular floor areas, complex room layouts, or specific zones within larger spaces
- Security and Surveillance: Display polygon zones for security monitoring, access control, or surveillance workflows where specific areas need to be visually marked and monitored
- Retail and Business Analytics: Visualize polygon zones for foot traffic analysis, customer movement tracking, or space utilization monitoring in retail, hospitality, or business intelligence applications
- Real-Time Zone Monitoring: Create visual overlays for real-time monitoring dashboards, live video feeds, or monitoring interfaces where polygon zones need to be clearly visible to indicate monitored areas
Connecting to Other Blocks¶
The annotated image from this block can be connected to:
- Zone detection or counting blocks to receive polygon zone coordinates that are visualized
- Other visualization blocks (e.g., Bounding Box Visualization, Label Visualization, Polygon Visualization) to add object detection annotations on top of the polygon zone visualization
- Data storage blocks (e.g., Local File Sink, CSV Formatter, Roboflow Dataset Upload) to save images with polygon zone visualizations for documentation, reporting, or analysis
- Webhook blocks to send visualized results with polygon zones to external systems, APIs, or web applications for display in dashboards or monitoring tools
- Notification blocks (e.g., Email Notification, Slack Notification) to send annotated images with polygon zones as visual evidence in alerts or reports
- Video output blocks to create annotated video streams or recordings with polygon zone visualizations for live monitoring, zone visualization, or post-processing analysis
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 zone coordinates in the format [[(x1, y1), (x2, y2), (x3, y3), ...], ...] defining one or more polygon shapes. Each zone must consist of more than 2 points to form a valid polygon. The polygon is drawn as a filled shape connecting these points in order, creating a closed region. Typically connected from zone detection or counting blocks that define monitoring areas.. | ✅ |
color |
str |
Color of the polygon zone overlay. Can be specified as a color name (e.g., 'WHITE', 'RED'), hex color code (e.g., '#5bb573', '#FFFFFF'), or RGB format (e.g., 'rgb(255, 255, 255)'). The polygon is filled with this color and overlaid with the specified opacity.. | ✅ |
opacity |
float |
Opacity of the polygon zone overlay, ranging from 0.0 (fully transparent) to 1.0 (fully opaque). Controls how transparent the polygon zone appears over the image. Lower values create more transparent zones that blend with the background, while higher values create more opaque, visible zones. Typical values range from 0.2 to 0.5 for balanced visibility where both the zone and underlying image are visible.. | ✅ |
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.
- inputs:
PLC Writer,Image Blur,Crop Visualization,VLM As Detector,Polygon Visualization,Roboflow Visual Search Classifier,Image Slicer,Qwen3.5-VL,Image Convert Grayscale,Webhook Sink,VLM As Classifier,Motion Detection,Clip Comparison,Buffer,SIFT,Slack Notification,Label Visualization,MoonshotAI Kimi,PLC Reader,Stitch OCR Detections,Label Visualization,S3 Sink,Email Notification,Background Subtraction,Ellipse Visualization,Stitch Images,OPC UA Writer Sink,CSV Formatter,Corner Visualization,Triangle Visualization,Qwen-VL,JSON Parser,Camera Calibration,Google Gemini,Polygon Zone Visualization,Roboflow Custom Metadata,LMM For Classification,Camera Focus,PP-OCR,SIFT Comparison,Trace Visualization,Color Visualization,Local File Sink,Llama 3.2 Vision,Llama 3.2 Vision,Morphological Transformation,Dynamic Zone,Google Vision OCR,Google Gemma API,Google Gemma,Microsoft SQL Server Sink,Polygon Visualization,Icon Visualization,PLC ModbusTCP,Rich Label Visualization,Identify Changes,Twilio SMS/MMS Notification,Keypoint Visualization,Image Slicer,OpenAI,Clip Comparison,OpenAI,Keypoint Detection Model,Object Detection Model,Qwen 3.6 API,Instance Segmentation Model,Single-Label Classification Model,Mask Visualization,OpenAI,OpenAI-Compatible LLM,Roboflow Visual Search,VLM As Detector,Stability AI Outpainting,Blur Visualization,Frame Delay,Bounding Box Visualization,Absolute Static Crop,Roboflow Dataset Upload,Reference Path Visualization,OpenAI,Anthropic Claude,Google Gemini,Event Writer,Stitch OCR Detections,CogVLM,VLM As Classifier,Email Notification,Contrast Enhancement,Current Time,Perspective Correction,Detections List Roll-Up,Halo Visualization,Dimension Collapse,Multi-Label Classification Model,Dynamic Crop,OpenRouter,Detections Consensus,PLC EthernetIP,OCR Model,GeoTag Detection,Halo Visualization,Line Counter Visualization,Roboflow Asset Library Attributes,Size Measurement,LMM,Relative Static Crop,Depth Estimation,SIFT Comparison,Dot Visualization,GLM-OCR,Florence-2 Model,EasyOCR,Background Color Visualization,Google Gemini,Image Contours,Roboflow Dataset Upload,Qwen 3.5 API,MoonshotAI Kimi,Stability AI Inpainting,Contrast Equalization,Morphological Transformation,Image Threshold,Camera Focus,Stability AI Image Generation,Circle Visualization,QR Code Generator,Google Gemini,Model Monitoring Inference Aggregator,Roboflow Vision Events,Heatmap Visualization,Twilio SMS Notification,Auto Rotate on Edges,Cosmos 3,MQTT Writer,Anthropic Claude,Image Preprocessing,Anthropic Claude,Text Display,Image Stack,Grid Visualization,Model Comparison Visualization,PTZ Tracking (ONVIF),Identify Outliers,Florence-2 Model,Classification Label Visualization,Pixelate Visualization - outputs:
Image Blur,Track Class Lock,Mask Edge Snap,Crop Visualization,VLM As Detector,Object Detection Model,Polygon Visualization,Roboflow Visual Search Classifier,Detections Stabilizer,Image Slicer,Qwen3.5-VL,Image Convert Grayscale,CLIP Embedding Model,Semantic Segmentation Model,VLM As Classifier,Motion Detection,SAM 3 Interactive,Keypoint Detection Model,Clip Comparison,YOLO-World Model,Buffer,SIFT,OC-SORT Tracker,Label Visualization,MoonshotAI Kimi,Label Visualization,Instance Segmentation Model,Perception Encoder Embedding Model,Email Notification,Keypoint Detection Model,BoT-SORT Tracker,Pixel Color Count,Single-Label Classification Model,Background Subtraction,Ellipse Visualization,Stitch Images,Corner Visualization,Triangle Visualization,Qwen-VL,Camera Calibration,Seg Preview,Google Gemini,Polygon Zone Visualization,LMM For Classification,Camera Focus,PP-OCR,SIFT Comparison,Trace Visualization,Object Detection Model,Color Visualization,Llama 3.2 Vision,Llama 3.2 Vision,SAM3 Video Tracker,Dominant Color,Morphological Transformation,SAM2 Video Tracker,Google Vision OCR,Google Gemma API,Google Gemma,Polygon Visualization,Icon Visualization,Rich Label Visualization,Qwen2.5-VL,Twilio SMS/MMS Notification,Keypoint Visualization,OpenAI,Image Slicer,OpenAI,Keypoint Detection Model,Clip Comparison,Object Detection Model,Qwen 3.6 API,Instance Segmentation Model,Single-Label Classification Model,Mask Visualization,Moondream2,OpenAI,Byte Tracker,Instance Segmentation Model,Roboflow Visual Search,VLM As Detector,Stability AI Outpainting,Blur Visualization,Multi-Label Classification Model,Frame Delay,Bounding Box Visualization,Absolute Static Crop,Roboflow Dataset Upload,OpenAI,Anthropic Claude,Reference Path Visualization,Google Gemini,Detections Stitch,Event Writer,CogVLM,VLM As Classifier,Barcode Detection,Contrast Enhancement,Template Matching,QR Code Detection,Perspective Correction,Semantic Segmentation Model,Halo Visualization,Multi-Label Classification Model,Dynamic Crop,OpenRouter,OCR Model,GeoTag Detection,Halo Visualization,Line Counter Visualization,Time in Zone,Multi-Label Classification Model,LMM,Relative Static Crop,Depth Estimation,SAM 3,ByteTrack Tracker,Dot Visualization,GLM-OCR,Florence-2 Model,EasyOCR,Background Color Visualization,Qwen3.5,Google Gemini,Image Contours,Roboflow Dataset Upload,MoonshotAI Kimi,Segment Anything 2 Model,Qwen 3.5 API,Stability AI Inpainting,Contrast Equalization,Morphological Transformation,Image Threshold,Camera Focus,SAM 3,Stability AI Image Generation,Instance Segmentation Model,Circle Visualization,Google Gemini,Roboflow Vision Events,Single-Label Classification Model,Heatmap Visualization,Cosmos 3,Auto Rotate on Edges,SAM 3,Anthropic Claude,SORT Tracker,Image Preprocessing,Qwen3-VL,Gaze Detection,Anthropic Claude,Text Display,Image Stack,Grid Visualization,Model Comparison Visualization,Florence-2 Model,Classification Label Visualization,SmolVLM2,Pixelate Visualization
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): 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..zone(list_of_values): Polygon zone coordinates in the format [[(x1, y1), (x2, y2), (x3, y3), ...], ...] defining one or more polygon shapes. Each zone must consist of more than 2 points to form a valid polygon. The polygon is drawn as a filled shape connecting these points in order, creating a closed region. Typically connected from zone detection or counting blocks that define monitoring areas..color(string): Color of the polygon zone overlay. Can be specified as a color name (e.g., 'WHITE', 'RED'), hex color code (e.g., '#5bb573', '#FFFFFF'), or RGB format (e.g., 'rgb(255, 255, 255)'). The polygon is filled with this color and overlaid with the specified opacity..opacity(float_zero_to_one): Opacity of the polygon zone overlay, ranging from 0.0 (fully transparent) to 1.0 (fully opaque). Controls how transparent the polygon zone appears over the image. Lower values create more transparent zones that blend with the background, while higher values create more opaque, visible zones. Typical values range from 0.2 to 0.5 for balanced visibility where both the zone and underlying image are visible..
-
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
}