Dynamic Zone¶
Class: DynamicZonesBlockV1
Source: inference.core.workflows.core_steps.transformations.dynamic_zones.v1.DynamicZonesBlockV1
The DynamicZoneBlock
is a transformer block designed to simplify polygon
so it's geometrically convex and then reduce number of vertices to requested amount.
This block is best suited when Zone needs to be created based on shape of detected object
(i.e. basketball field, road segment, zebra crossing etc.)
Input detections should be filtered and contain only desired classes of interest.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/dynamic_zone@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
required_number_of_vertices |
int |
Keep simplifying polygon until number of vertices matches this number. | ✅ |
scale_ratio |
float |
Expand resulting polygon along imaginary line from centroid to edge by this ratio. | ✅ |
apply_least_squares |
bool |
Apply least squares algorithm to fit resulting polygon edges to base contour. | ✅ |
midpoint_fraction |
float |
Fraction of vertices to keep in the middle of each edge before fitting least squares line. This parameter is useful when vertices of convex polygon are not aligned with edge that would be otherwise fitted to points closer to the center of each 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 Dynamic Zone
in version v1
.
- inputs:
Local File Sink
,Webhook Sink
,Distance Measurement
,Time in Zone
,VLM as Classifier
,Identify Outliers
,Cosine Similarity
,Detections Stitch
,SIFT Comparison
,Time in Zone
,Velocity
,Perspective Correction
,Detections Transformation
,Pixel Color Count
,PTZ Tracking (ONVIF)
.md),SIFT Comparison
,Roboflow Custom Metadata
,Detections Combine
,Detection Offset
,Dynamic Zone
,Model Monitoring Inference Aggregator
,Gaze Detection
,Line Counter
,Time in Zone
,VLM as Detector
,Image Contours
,Path Deviation
,VLM as Classifier
,Slack Notification
,Identify Changes
,JSON Parser
,Twilio SMS Notification
,Camera Focus
,Roboflow Dataset Upload
,Email Notification
,Instance Segmentation Model
,Detections Filter
,Clip Comparison
,Detections Classes Replacement
,Template Matching
,Bounding Rectangle
,Detections Stabilizer
,Line Counter
,Instance Segmentation Model
,VLM as Detector
,Dynamic Crop
,Roboflow Dataset Upload
,Path Deviation
,Detections Consensus
,Segment Anything 2 Model
- outputs:
Byte Tracker
,VLM as Classifier
,Polygon Zone Visualization
,LMM For Classification
,Time in Zone
,Distance Measurement
,Dot Visualization
,Size Measurement
,Perspective Correction
,Blur Visualization
,Clip Comparison
,Corner Visualization
,Florence-2 Model
,PTZ Tracking (ONVIF)
.md),Grid Visualization
,Florence-2 Model
,Halo Visualization
,OpenAI
,Keypoint Detection Model
,Multi-Label Classification Model
,Detections Combine
,Detection Offset
,Byte Tracker
,Line Counter Visualization
,VLM as Detector
,VLM as Classifier
,Twilio SMS Notification
,Keypoint Detection Model
,Roboflow Dataset Upload
,Email Notification
,Instance Segmentation Model
,Clip Comparison
,Keypoint Visualization
,Template Matching
,Llama 3.2 Vision
,Bounding Box Visualization
,Instance Segmentation Model
,Line Counter
,Detections Stabilizer
,Reference Path Visualization
,Dynamic Crop
,Roboflow Dataset Upload
,Mask Visualization
,Background Color Visualization
,Webhook Sink
,Detections Stitch
,Time in Zone
,Trace Visualization
,Velocity
,Object Detection Model
,Detections Transformation
,Buffer
,Byte Tracker
,Cache Set
,Crop Visualization
,Overlap Filter
,SIFT Comparison
,Roboflow Custom Metadata
,Object Detection Model
,Model Comparison Visualization
,Pixelate Visualization
,Dynamic Zone
,Model Monitoring Inference Aggregator
,Gaze Detection
,Line Counter
,Anthropic Claude
,Time in Zone
,Polygon Visualization
,Path Deviation
,OpenAI
,Slack Notification
,Triangle Visualization
,Detections Filter
,YOLO-World Model
,Single-Label Classification Model
,Classification Label Visualization
,Detections Classes Replacement
,Bounding Rectangle
,Circle Visualization
,Label Visualization
,VLM as Detector
,Google Gemini
,Stability AI Inpainting
,Multi-Label Classification Model
,Icon Visualization
,Ellipse Visualization
,Color Visualization
,Detections Merge
,Path Deviation
,Single-Label Classification Model
,Detections Consensus
,Segment Anything 2 Model
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Dynamic Zone
in version v1
has.
Bindings
-
input
predictions
(instance_segmentation_prediction
): .required_number_of_vertices
(integer
): Keep simplifying polygon until number of vertices matches this number.scale_ratio
(float
): Expand resulting polygon along imaginary line from centroid to edge by this ratio.apply_least_squares
(boolean
): Apply least squares algorithm to fit resulting polygon edges to base contour.midpoint_fraction
(float_zero_to_one
): Fraction of vertices to keep in the middle of each edge before fitting least squares line. This parameter is useful when vertices of convex polygon are not aligned with edge that would be otherwise fitted to points closer to the center of each edge..
-
output
zones
(list_of_values
): List of values of any type.predictions
(instance_segmentation_prediction
): Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object.simplification_converged
(boolean
): Boolean flag.
Example JSON definition of step Dynamic Zone
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/dynamic_zone@v1",
"predictions": "$segmentation.predictions",
"required_number_of_vertices": 4,
"scale_ratio": 1.05,
"apply_least_squares": true,
"midpoint_fraction": 0.9
}