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] |
Coordinates of the target zone.. | ✅ |
triggering_anchor |
str |
The point on the detection that must be inside the zone.. | ✅ |
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:
Bounding Rectangle
,Identify Outliers
,Multi-Label Classification Model
,Single-Label Classification Model
,Dimension Collapse
,Webhook Sink
,Dynamic Crop
,Clip Comparison
,Google Vision OCR
,Twilio SMS Notification
,Buffer
,Segment Anything 2 Model
,Detection Offset
,Model Monitoring Inference Aggregator
,Florence-2 Model
,LMM For Classification
,Roboflow Dataset Upload
,Identify Changes
,CogVLM
,OCR Model
,Clip Comparison
,Template Matching
,VLM as Detector
,JSON Parser
,SIFT Comparison
,Path Deviation
,OpenAI
,Stitch OCR Detections
,Velocity
,Detections Stitch
,OpenAI
,Detections Stabilizer
,Path Deviation
,VLM as Classifier
,Time in Zone
,Keypoint Detection Model
,Perspective Correction
,Moondream2
,SIFT Comparison
,Slack Notification
,Anthropic Claude
,Email Notification
,LMM
,Llama 3.2 Vision
,Instance Segmentation Model
,CSV Formatter
,VLM as Detector
,Time in Zone
,Byte Tracker
,Florence-2 Model
,Detections Filter
,Detections Transformation
,YOLO-World Model
,Detections Consensus
,Google Gemini
,Detections Merge
,Local File Sink
,Dynamic Zone
,Size Measurement
,Instance Segmentation Model
,Roboflow Custom Metadata
,VLM as Classifier
,Detections Classes Replacement
,Object Detection Model
,Roboflow Dataset Upload
,Byte Tracker
,Byte Tracker
,Line Counter
,Object Detection Model
- outputs:
Bounding Rectangle
,Blur Visualization
,Pixelate Visualization
,Background Color Visualization
,Dynamic Crop
,Mask Visualization
,Time in Zone
,Byte Tracker
,Segment Anything 2 Model
,Detection Offset
,Model Monitoring Inference Aggregator
,Florence-2 Model
,Florence-2 Model
,Detections Filter
,Detections Transformation
,Roboflow Dataset Upload
,Circle Visualization
,Crop Visualization
,Trace Visualization
,Path Deviation
,Triangle Visualization
,Detections Consensus
,Stitch OCR Detections
,Polygon Visualization
,Stability AI Inpainting
,Halo Visualization
,Dot Visualization
,Velocity
,Detections Merge
,Detections Stitch
,Dynamic Zone
,Size Measurement
,Roboflow Custom Metadata
,Detections Classes Replacement
,Detections Stabilizer
,Label Visualization
,Path Deviation
,Line Counter
,Corner Visualization
,Time in Zone
,Model Comparison Visualization
,Bounding Box Visualization
,Roboflow Dataset Upload
,Perspective Correction
,Byte Tracker
,Byte Tracker
,Line Counter
,Distance Measurement
,Color Visualization
,Ellipse Visualization
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[object_detection_prediction
,instance_segmentation_prediction
]): Model predictions to calculate the time spent in zone for..zone
(list_of_values
): Coordinates of the target zone..triggering_anchor
(string
): The point on the detection that must be inside the zone..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": [
[
100,
100
],
[
100,
200
],
[
300,
200
],
[
300,
100
]
],
"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] |
Coordinates of the target zone.. | ✅ |
triggering_anchor |
str |
The point on the detection that must be inside the zone.. | ✅ |
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:
Bounding Rectangle
,Identify Outliers
,Multi-Label Classification Model
,Single-Label Classification Model
,Classification Label Visualization
,Dimension Collapse
,Background Color Visualization
,Webhook Sink
,Dynamic Crop
,Mask Visualization
,Clip Comparison
,Google Vision OCR
,Twilio SMS Notification
,Buffer
,Segment Anything 2 Model
,Absolute Static Crop
,Detection Offset
,Stability AI Image Generation
,Florence-2 Model
,Image Blur
,Model Monitoring Inference Aggregator
,LMM For Classification
,Roboflow Dataset Upload
,Identify Changes
,CogVLM
,Circle Visualization
,OCR Model
,Clip Comparison
,Crop Visualization
,Template Matching
,VLM as Detector
,JSON Parser
,SIFT Comparison
,Path Deviation
,OpenAI
,Stitch OCR Detections
,Velocity
,Detections Stitch
,OpenAI
,Image Preprocessing
,Label Visualization
,Detections Stabilizer
,Path Deviation
,VLM as Classifier
,Time in Zone
,Model Comparison Visualization
,Stitch Images
,Bounding Box Visualization
,Keypoint Detection Model
,Perspective Correction
,Moondream2
,SIFT Comparison
,Relative Static Crop
,Color Visualization
,Slack Notification
,Ellipse Visualization
,Reference Path Visualization
,Blur Visualization
,Pixelate Visualization
,Anthropic Claude
,Email Notification
,LMM
,Llama 3.2 Vision
,Instance Segmentation Model
,CSV Formatter
,VLM as Detector
,Keypoint Visualization
,Camera Focus
,Time in Zone
,Byte Tracker
,Florence-2 Model
,Detections Filter
,Detections Transformation
,YOLO-World Model
,Grid Visualization
,Image Convert Grayscale
,Image Threshold
,Trace Visualization
,Polygon Visualization
,Triangle Visualization
,Stability AI Inpainting
,Detections Consensus
,Halo Visualization
,Dot Visualization
,Polygon Zone Visualization
,Google Gemini
,Detections Merge
,Local File Sink
,Dynamic Zone
,Size Measurement
,Instance Segmentation Model
,Roboflow Custom Metadata
,VLM as Classifier
,Detections Classes Replacement
,Camera Calibration
,Object Detection Model
,SIFT
,Corner Visualization
,Image Contours
,Line Counter Visualization
,Roboflow Dataset Upload
,Image Slicer
,Byte Tracker
,Image Slicer
,Byte Tracker
,Line Counter
,Object Detection Model
- outputs:
Bounding Rectangle
,Blur Visualization
,Pixelate Visualization
,Background Color Visualization
,Dynamic Crop
,Mask Visualization
,Time in Zone
,Byte Tracker
,Segment Anything 2 Model
,Detection Offset
,Model Monitoring Inference Aggregator
,Florence-2 Model
,Florence-2 Model
,Detections Filter
,Detections Transformation
,Roboflow Dataset Upload
,Circle Visualization
,Crop Visualization
,Trace Visualization
,Path Deviation
,Triangle Visualization
,Detections Consensus
,Stitch OCR Detections
,Polygon Visualization
,Stability AI Inpainting
,Halo Visualization
,Dot Visualization
,Velocity
,Detections Merge
,Detections Stitch
,Dynamic Zone
,Size Measurement
,Roboflow Custom Metadata
,Detections Classes Replacement
,Detections Stabilizer
,Label Visualization
,Path Deviation
,Line Counter
,Corner Visualization
,Time in Zone
,Model Comparison Visualization
,Bounding Box Visualization
,Roboflow Dataset Upload
,Perspective Correction
,Byte Tracker
,Byte Tracker
,Line Counter
,Distance Measurement
,Color Visualization
,Ellipse Visualization
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[object_detection_prediction
,instance_segmentation_prediction
]): Model predictions to calculate the time spent in zone for..zone
(list_of_values
): Coordinates of the target zone..triggering_anchor
(string
): The point on the detection that must be inside the zone..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
}