Time in Zone¶
v2¶
Class: TimeInZoneBlockV2
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.analytics.time_in_zone.v2.TimeInZoneBlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
The TimeInZoneBlock
is an analytics block designed to measure time spent by objects in a zone.
The block requires detections to be tracked (i.e. each object must have unique tracker_id assigned,
which persists between frames)
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/time_in_zone@v2
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
zone |
List[Any] |
Zones (one for each batch) in a format [(x1, y1), (x2, y2), (x3, y3), ...]. | ✅ |
triggering_anchor |
str |
Triggering anchor. Allowed values: CENTER, CENTER_LEFT, CENTER_RIGHT, TOP_CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, CENTER_OF_MASS. | ✅ |
remove_out_of_zone_detections |
bool |
If true, detections found outside of zone will be filtered out. | ✅ |
reset_out_of_zone_detections |
bool |
If true, detections found outside of zone will have time reset. | ✅ |
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 Time in Zone
in version v2
.
- inputs:
Path Deviation
,Multi-Label Classification Model
,LMM For Classification
,Instance Segmentation Model
,Single-Label Classification Model
,OCR Model
,Object Detection Model
,Line Counter
,Detections Filter
,YOLO-World Model
,Model Monitoring Inference Aggregator
,VLM as Detector
,Google Vision OCR
,Email Notification
,CogVLM
,Byte Tracker
,Detections Classes Replacement
,Template Matching
,Detection Offset
,Roboflow Dataset Upload
,Slack Notification
,Stitch OCR Detections
,Identify Changes
,Clip Comparison
,Byte Tracker
,LMM
,VLM as Detector
,Byte Tracker
,Bounding Rectangle
,Object Detection Model
,Time in Zone
,Detections Stitch
,Florence-2 Model
,SIFT Comparison
,Keypoint Detection Model
,Perspective Correction
,Local File Sink
,VLM as Classifier
,Dimension Collapse
,Twilio SMS Notification
,Size Measurement
,Detections Consensus
,OpenAI
,Webhook Sink
,Roboflow Custom Metadata
,Instance Segmentation Model
,Buffer
,Roboflow Dataset Upload
,Clip Comparison
,VLM as Classifier
,Anthropic Claude
,Dynamic Zone
,SIFT Comparison
,Google Gemini
,Segment Anything 2 Model
,JSON Parser
,Identify Outliers
,Time in Zone
,Florence-2 Model
,Detections Stabilizer
,Path Deviation
,OpenAI
,CSV Formatter
,Llama 3.2 Vision
,Detections Transformation
- outputs:
Time in Zone
,Florence-2 Model
,Path Deviation
,Pixelate Visualization
,Detections Stitch
,Line Counter
,Corner Visualization
,Blur Visualization
,Mask Visualization
,Perspective Correction
,Line Counter
,Detections Filter
,Model Monitoring Inference Aggregator
,Polygon Visualization
,Halo Visualization
,Trace Visualization
,Model Comparison Visualization
,Size Measurement
,Detections Consensus
,Byte Tracker
,Roboflow Custom Metadata
,Detections Classes Replacement
,Crop Visualization
,Detection Offset
,Roboflow Dataset Upload
,Roboflow Dataset Upload
,Stitch OCR Detections
,Dynamic Zone
,Dot Visualization
,Circle Visualization
,Background Color Visualization
,Segment Anything 2 Model
,Bounding Box Visualization
,Ellipse Visualization
,Label Visualization
,Byte Tracker
,Time in Zone
,Florence-2 Model
,Stability AI Inpainting
,Detections Stabilizer
,Path Deviation
,Dynamic Crop
,Byte Tracker
,Triangle Visualization
,Color Visualization
,Bounding Rectangle
,Detections Transformation
,Distance Measurement
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Time in Zone
in version v2
has.
Bindings
-
input
image
(image
): The input image for this step..detections
(Union[instance_segmentation_prediction
,object_detection_prediction
]): Predictions.zone
(list_of_values
): Zones (one for each batch) in a format [(x1, y1), (x2, y2), (x3, y3), ...].triggering_anchor
(string
): Triggering anchor. Allowed values: CENTER, CENTER_LEFT, CENTER_RIGHT, TOP_CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, CENTER_OF_MASS.remove_out_of_zone_detections
(boolean
): If true, detections found outside of zone will be filtered out.reset_out_of_zone_detections
(boolean
): If true, detections found outside of zone will have time reset.
-
output
timed_detections
(Union[object_detection_prediction
,instance_segmentation_prediction
]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_prediction
or Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction
.
Example JSON definition of step Time in Zone
in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/time_in_zone@v2",
"image": "$inputs.image",
"detections": "$steps.object_detection_model.predictions",
"zone": "$inputs.zones",
"triggering_anchor": "CENTER",
"remove_out_of_zone_detections": true,
"reset_out_of_zone_detections": true
}
v1¶
Class: TimeInZoneBlockV1
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.analytics.time_in_zone.v1.TimeInZoneBlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
The TimeInZoneBlock
is an analytics block designed to measure time spent by objects in a zone.
The block requires detections to be tracked (i.e. each object must have unique tracker_id assigned,
which persists between frames)
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/time_in_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.. | ❌ |
zone |
List[Any] |
Zones (one for each batch) in a format [(x1, y1), (x2, y2), (x3, y3), ...]. | ✅ |
triggering_anchor |
str |
Triggering anchor. Allowed values: CENTER, CENTER_LEFT, CENTER_RIGHT, TOP_CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, CENTER_OF_MASS. | ✅ |
remove_out_of_zone_detections |
bool |
If true, detections found outside of zone will be filtered out. | ✅ |
reset_out_of_zone_detections |
bool |
If true, detections found outside of zone will have time reset. | ✅ |
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 Time in Zone
in version v1
.
- inputs:
Stitch Images
,Pixelate Visualization
,Path Deviation
,Multi-Label Classification Model
,LMM For Classification
,Instance Segmentation Model
,Blur Visualization
,Single-Label Classification Model
,Mask Visualization
,Object Detection Model
,OCR Model
,SIFT
,Line Counter
,Detections Filter
,YOLO-World Model
,Model Monitoring Inference Aggregator
,Polygon Visualization
,Halo Visualization
,VLM as Detector
,Grid Visualization
,Google Vision OCR
,Model Comparison Visualization
,Email Notification
,Camera Focus
,CogVLM
,Image Threshold
,Byte Tracker
,Keypoint Visualization
,Detections Classes Replacement
,Template Matching
,Image Preprocessing
,Detection Offset
,Roboflow Dataset Upload
,Slack Notification
,Stitch OCR Detections
,Identify Changes
,Relative Static Crop
,Background Color Visualization
,Clip Comparison
,Bounding Box Visualization
,Ellipse Visualization
,Image Contours
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,Byte Tracker
,LMM
,Stability AI Inpainting
,Reference Path Visualization
,VLM as Detector
,Dynamic Crop
,Byte Tracker
,Triangle Visualization
,Bounding Rectangle
,Absolute Static Crop
,Object Detection Model
,Time in Zone
,Detections Stitch
,Florence-2 Model
,SIFT Comparison
,Keypoint Detection Model
,Corner Visualization
,Perspective Correction
,Local File Sink
,Polygon Zone Visualization
,VLM as Classifier
,Dimension Collapse
,Image Slicer
,Trace Visualization
,Detections Consensus
,OpenAI
,Size Measurement
,Webhook Sink
,Twilio SMS Notification
,Roboflow Custom Metadata
,Crop Visualization
,Instance Segmentation Model
,Buffer
,Roboflow Dataset Upload
,Clip Comparison
,VLM as Classifier
,Anthropic Claude
,Dynamic Zone
,Image Blur
,Circle Visualization
,Image Convert Grayscale
,Dot Visualization
,Google Gemini
,SIFT Comparison
,Segment Anything 2 Model
,JSON Parser
,Identify Outliers
,Time in Zone
,Florence-2 Model
,Detections Stabilizer
,Path Deviation
,OpenAI
,Color Visualization
,CSV Formatter
,Llama 3.2 Vision
,Detections Transformation
- outputs:
Time in Zone
,Florence-2 Model
,Path Deviation
,Pixelate Visualization
,Detections Stitch
,Line Counter
,Corner Visualization
,Blur Visualization
,Mask Visualization
,Perspective Correction
,Line Counter
,Detections Filter
,Model Monitoring Inference Aggregator
,Polygon Visualization
,Halo Visualization
,Trace Visualization
,Model Comparison Visualization
,Size Measurement
,Detections Consensus
,Byte Tracker
,Roboflow Custom Metadata
,Detections Classes Replacement
,Crop Visualization
,Detection Offset
,Roboflow Dataset Upload
,Roboflow Dataset Upload
,Stitch OCR Detections
,Dynamic Zone
,Dot Visualization
,Circle Visualization
,Background Color Visualization
,Segment Anything 2 Model
,Bounding Box Visualization
,Ellipse Visualization
,Label Visualization
,Byte Tracker
,Time in Zone
,Florence-2 Model
,Stability AI Inpainting
,Detections Stabilizer
,Path Deviation
,Dynamic Crop
,Byte Tracker
,Triangle Visualization
,Color Visualization
,Bounding Rectangle
,Detections Transformation
,Distance Measurement
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Time in Zone
in version v1
has.
Bindings
-
input
image
(image
): The input image for this step..metadata
(video_metadata
): not available.detections
(Union[instance_segmentation_prediction
,object_detection_prediction
]): Predictions.zone
(list_of_values
): Zones (one for each batch) in a format [(x1, y1), (x2, y2), (x3, y3), ...].triggering_anchor
(string
): Triggering anchor. Allowed values: CENTER, CENTER_LEFT, CENTER_RIGHT, TOP_CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, CENTER_OF_MASS.remove_out_of_zone_detections
(boolean
): If true, detections found outside of zone will be filtered out.reset_out_of_zone_detections
(boolean
): If true, detections found outside of zone will have time reset.
-
output
timed_detections
(Union[object_detection_prediction
,instance_segmentation_prediction
]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_prediction
or Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction
.
Example JSON definition of step Time in Zone
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/time_in_zone@v1",
"image": "$inputs.image",
"metadata": "<block_does_not_provide_example>",
"detections": "$steps.object_detection_model.predictions",
"zone": "$inputs.zones",
"triggering_anchor": "CENTER",
"remove_out_of_zone_detections": true,
"reset_out_of_zone_detections": true
}