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