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