Detection Event Log¶
Class: DetectionEventLogBlockV1
Source: inference.core.workflows.core_steps.analytics.detection_event_log.v1.DetectionEventLogBlockV1
This block maintains a log of detection events from tracked objects. For each tracked object it records: class name, first and last seen frame numbers, absolute wall-clock timestamps (Unix epoch floats derived from frame_timestamp metadata, or time.time() as fallback), and relative timestamps in seconds since the video started. Objects must be seen for a minimum number of frames (frame_threshold) before being moved from 'pending' to 'logged' status. Stale events (not seen for stale_frames frames) are removed during periodic cleanup (every flush_interval frames). When a logged event goes stale it is emitted in the complete_events output, which contains the full event data for objects that were tracked long enough to be logged and have since left the scene. The reference_timestamp parameter is deprecated and no longer used.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/detection_event_log@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
frame_threshold |
int |
Number of frames an object must be seen before being logged.. | ✅ |
flush_interval |
int |
How often (in frames) to run the cleanup operation for stale events.. | ✅ |
stale_frames |
int |
Remove events that haven't been seen for this many frames.. | ✅ |
reference_timestamp |
float |
Deprecated, no longer used. Absolute timestamps are now taken directly from frame_timestamp metadata (or time.time() as fallback).. | ✅ |
fallback_fps |
float |
Fallback FPS to use when video metadata does not provide FPS information. Used to calculate relative timestamps.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
soft— runtimehosted_serverless,dedicated_deployment; executionremote; inputvideo - Block keeps per-video state in process memory (keyed by video_metadata.video_identifier). With remote step execution on stateless or multi-replica HTTP runtimes, successive requests may be served by different worker processes, so the state resets between calls and the output is meaningless for tracking / counting / aggregation. Use local step execution in an InferencePipeline for stable cross-frame results.
-
soft— inputimage - Block depends on temporal context from video or repeated-frame workflows. With a still image/photo, there is no meaningful history to track, compare, aggregate, or visualize, so the block provides little or no benefit.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Detection Event Log in version v1.
- inputs:
VLM As Detector,PTZ Tracking (ONVIF),Detections Transformation,Camera Focus,Detections Stitch,ByteTrack Tracker,Gaze Detection,Byte Tracker,Perspective Correction,Mask Area Measurement,Camera Focus,SAM 3,Object Detection Model,YOLO-World Model,Path Deviation,Segment Anything 2 Model,Detections Classes Replacement,Template Matching,Time in Zone,SAM 3,Seg Preview,Detection Offset,Mask Edge Snap,SAM2 Video Tracker,Detections Merge,Time in Zone,Byte Tracker,Byte Tracker,Google Vision OCR,Object Detection Model,Time in Zone,SORT Tracker,Motion Detection,Detections Consensus,Cosine Similarity,Detections Combine,Object Detection Model,Detections List Roll-Up,Instance Segmentation Model,EasyOCR,Dynamic Zone,BoT-SORT Tracker,Moondream2,VLM As Detector,SAM 3,Overlap Filter,Line Counter,OCR Model,Detections Stabilizer,Path Deviation,Instance Segmentation Model,Detection Event Log,Instance Segmentation Model,Identify Changes,Detections Filter,Bounding Rectangle,Instance Segmentation Model,OC-SORT Tracker,Per-Class Confidence Filter,Velocity,Dynamic Crop - outputs:
Event Writer,Ellipse Visualization,Camera Focus,SAM 3,Image Preprocessing,Background Subtraction,Image Contours,Color Visualization,Crop Visualization,Segment Anything 2 Model,Mask Visualization,SAM2 Video Tracker,SIFT Comparison,Object Detection Model,Instance Segmentation Model,Keypoint Detection Model,Image Blur,Keypoint Visualization,Identify Changes,MQTT Writer,OC-SORT Tracker,Anthropic Claude,PTZ Tracking (ONVIF),SIFT Comparison,Twilio SMS Notification,Overlap Analysis,Detections Stitch,Perspective Correction,Detections Classes Replacement,Time in Zone,Detection Offset,Mask Edge Snap,SORT Tracker,Image Stack,PLC EthernetIP,Model Comparison Visualization,Identify Outliers,Dot Visualization,Dynamic Zone,Reference Path Visualization,Polygon Visualization,Size Measurement,Detections Stabilizer,Dominant Color,Microsoft SQL Server Sink,Path Deviation,Webhook Sink,Instance Segmentation Model,Image Slicer,Stability AI Outpainting,Halo Visualization,Email Notification,QR Code Generator,ByteTrack Tracker,Classification Label Visualization,Bounding Box Visualization,Object Detection Model,Pixelate Visualization,Path Deviation,Image Slicer,Roboflow Vision Events,Text Display,Byte Tracker,Time in Zone,Distance Measurement,Object Detection Model,Icon Visualization,Motion Detection,Blur Visualization,Anthropic Claude,Grid Visualization,Detections List Roll-Up,Anthropic Claude,Stability AI Inpainting,Roboflow Dataset Upload,Model Monitoring Inference Aggregator,Overlap Filter,Image Threshold,Trace Visualization,Circle Visualization,Instance Segmentation Model,Label Visualization,Pixel Color Count,Morphological Transformation,Morphological Transformation,Keypoint Detection Model,Dynamic Crop,Polygon Visualization,Florence-2 Model,Detections Transformation,Byte Tracker,Mask Area Measurement,Absolute Static Crop,Roboflow Dataset Upload,Stitch Images,Florence-2 Model,Twilio SMS/MMS Notification,Line Counter,Time in Zone,Detections Merge,Byte Tracker,Triangle Visualization,Roboflow Asset Library Attributes,Detections Consensus,Background Color Visualization,Keypoint Detection Model,Stitch OCR Detections,Corner Visualization,Detections Combine,Line Counter Visualization,BoT-SORT Tracker,Stitch OCR Detections,Halo Visualization,Roboflow Custom Metadata,Line Counter,Email Notification,Slack Notification,Detection Event Log,Detections Filter,Heatmap Visualization,Bounding Rectangle,Instance Segmentation Model,OPC UA Writer Sink,Per-Class Confidence Filter,Velocity
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Detection Event Log in version v1 has.
Bindings
-
input
image(image): Reference to the image for video metadata (frame number, timestamp)..detections(Union[object_detection_prediction,instance_segmentation_prediction]): Tracked detections from byte tracker (must have tracker_id)..frame_threshold(integer): Number of frames an object must be seen before being logged..flush_interval(integer): How often (in frames) to run the cleanup operation for stale events..stale_frames(integer): Remove events that haven't been seen for this many frames..reference_timestamp(float): Deprecated, no longer used. Absolute timestamps are now taken directly from frame_timestamp metadata (or time.time() as fallback)..fallback_fps(float): Fallback FPS to use when video metadata does not provide FPS information. Used to calculate relative timestamps..
-
output
event_log(dictionary): Dictionary.detections(Union[object_detection_prediction,instance_segmentation_prediction]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_predictionor Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction.total_logged(integer): Integer value.total_pending(integer): Integer value.complete_events(dictionary): Dictionary.
Example JSON definition of step Detection Event Log in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/detection_event_log@v1",
"image": "$inputs.image",
"detections": "$steps.byte_tracker.tracked_detections",
"frame_threshold": 5,
"flush_interval": 30,
"stale_frames": 150,
"reference_timestamp": 1726570875.0,
"fallback_fps": 1.0
}