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