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:
Model Monitoring Inference Aggregator
,Twilio SMS Notification
,Email Notification
,JSON Parser
,VLM as Classifier
,Cosine Similarity
,Detections Stabilizer
,SIFT Comparison
,Gaze Detection
,Distance Measurement
,Time in Zone
,Image Contours
,Camera Focus
,Detection Offset
,Detections Consensus
,Detections Transformation
,Velocity
,Perspective Correction
,Instance Segmentation Model
,Path Deviation
,Dynamic Crop
,VLM as Classifier
,Segment Anything 2 Model
,Roboflow Dataset Upload
,Local File Sink
,Template Matching
,Webhook Sink
,SIFT Comparison
,Clip Comparison
,Instance Segmentation Model
,Identify Outliers
,PTZ Tracking (ONVIF)
.md),Line Counter
,Bounding Rectangle
,Pixel Color Count
,Line Counter
,Identify Changes
,Dynamic Zone
,Time in Zone
,Detections Classes Replacement
,VLM as Detector
,Roboflow Dataset Upload
,VLM as Detector
,Detections Filter
,Detections Stitch
,Slack Notification
,Roboflow Custom Metadata
,Path Deviation
- outputs:
Model Monitoring Inference Aggregator
,Bounding Box Visualization
,Llama 3.2 Vision
,Twilio SMS Notification
,Keypoint Detection Model
,Detections Merge
,Overlap Filter
,Detections Stabilizer
,Model Comparison Visualization
,SIFT Comparison
,Gaze Detection
,Corner Visualization
,Background Color Visualization
,Distance Measurement
,Time in Zone
,Mask Visualization
,Classification Label Visualization
,Buffer
,Detections Transformation
,Trace Visualization
,Polygon Visualization
,Instance Segmentation Model
,Florence-2 Model
,Path Deviation
,Perspective Correction
,Grid Visualization
,Clip Comparison
,Instance Segmentation Model
,Byte Tracker
,LMM For Classification
,PTZ Tracking (ONVIF)
.md),Line Counter
,Dot Visualization
,Google Gemini
,Ellipse Visualization
,Object Detection Model
,Keypoint Detection Model
,Dynamic Zone
,Polygon Zone Visualization
,Halo Visualization
,Time in Zone
,VLM as Detector
,Icon Visualization
,Triangle Visualization
,Crop Visualization
,Size Measurement
,Slack Notification
,Pixelate Visualization
,Single-Label Classification Model
,Path Deviation
,Color Visualization
,Single-Label Classification Model
,Email Notification
,Blur Visualization
,VLM as Classifier
,Anthropic Claude
,Florence-2 Model
,Label Visualization
,Line Counter Visualization
,Detections Consensus
,Detection Offset
,Multi-Label Classification Model
,Reference Path Visualization
,Velocity
,Dynamic Crop
,OpenAI
,VLM as Classifier
,Byte Tracker
,Roboflow Dataset Upload
,Circle Visualization
,Segment Anything 2 Model
,Template Matching
,Cache Set
,Webhook Sink
,YOLO-World Model
,Byte Tracker
,Bounding Rectangle
,OpenAI
,Stability AI Inpainting
,Line Counter
,Keypoint Visualization
,Multi-Label Classification Model
,Detections Classes Replacement
,Roboflow Dataset Upload
,Clip Comparison
,Object Detection Model
,VLM as Detector
,Detections Filter
,Detections Stitch
,Roboflow Custom Metadata
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
}