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:
Dynamic Crop,Detections Classes Replacement,OCR Model,Byte Tracker,Instance Segmentation Model,Detection Event Log,Gaze Detection,Bounding Rectangle,VLM As Detector,OC-SORT Tracker,Moondream2,Detections Stabilizer,Overlap Filter,Seg Preview,Object Detection Model,SORT Tracker,Detections Transformation,EasyOCR,Path Deviation,YOLO-World Model,SAM 3,Segment Anything 2 Model,Object Detection Model,Time in Zone,BoT-SORT Tracker,Template Matching,Perspective Correction,ByteTrack Tracker,Byte Tracker,Mask Area Measurement,Detection Offset,Velocity,Path Deviation,Motion Detection,Detections Combine,Time in Zone,PTZ Tracking (ONVIF),SAM 3,Detections Consensus,Detections Stitch,Identify Changes,SAM 3,Cosine Similarity,Line Counter,Detections Merge,Google Vision OCR,Detections List Roll-Up,Object Detection Model,Instance Segmentation Model,Mask Edge Snap,Time in Zone,Instance Segmentation Model,Camera Focus,Instance Segmentation Model,SAM2 Video Tracker,VLM As Detector,Camera Focus,Byte Tracker,Per-Class Confidence Filter,Dynamic Zone,Detections Filter - outputs:
Detections Classes Replacement,Morphological Transformation,Image Preprocessing,Email Notification,Halo Visualization,Morphological Transformation,Detections Transformation,Pixel Color Count,Time in Zone,BoT-SORT Tracker,Object Detection Model,Text Display,Image Threshold,Model Monitoring Inference Aggregator,Pixelate Visualization,Keypoint Detection Model,Time in Zone,Crop Visualization,Dot Visualization,Detections Merge,PLC EthernetIP,Detections List Roll-Up,Florence-2 Model,Roboflow Dataset Upload,Mask Edge Snap,Roboflow Vision Events,Polygon Visualization,SIFT Comparison,Absolute Static Crop,Twilio SMS/MMS Notification,QR Code Generator,SIFT Comparison,Per-Class Confidence Filter,Stitch OCR Detections,Dynamic Zone,Detections Filter,Byte Tracker,Color Visualization,Roboflow Dataset Upload,Roboflow Custom Metadata,Bounding Rectangle,Detections Stabilizer,Stability AI Inpainting,Line Counter Visualization,Image Blur,Object Detection Model,Blur Visualization,Path Deviation,SAM 3,Perspective Correction,Keypoint Visualization,Byte Tracker,Detection Offset,Anthropic Claude,MQTT Writer,Image Slicer,Identify Changes,Detections Consensus,Ellipse Visualization,Detections Stitch,Object Detection Model,Slack Notification,Overlap Analysis,Identify Outliers,Time in Zone,Image Stack,Bounding Box Visualization,Label Visualization,Keypoint Detection Model,Size Measurement,Stitch OCR Detections,Keypoint Detection Model,Anthropic Claude,Roboflow Asset Library Attributes,OC-SORT Tracker,Florence-2 Model,Overlap Filter,Segment Anything 2 Model,Twilio SMS Notification,Triangle Visualization,Icon Visualization,Mask Area Measurement,Path Deviation,Dominant Color,Instance Segmentation Model,Distance Measurement,Instance Segmentation Model,Background Color Visualization,Byte Tracker,Grid Visualization,Corner Visualization,Reference Path Visualization,Image Slicer,Line Counter,Halo Visualization,Dynamic Crop,Webhook Sink,Instance Segmentation Model,Detection Event Log,Stability AI Outpainting,Anthropic Claude,SORT Tracker,ByteTrack Tracker,Velocity,Motion Detection,Detections Combine,PTZ Tracking (ONVIF),Model Comparison Visualization,Trace Visualization,Line Counter,OPC UA Writer Sink,Circle Visualization,Email Notification,Event Writer,Instance Segmentation Model,Heatmap Visualization,Camera Focus,Background Subtraction,SAM2 Video Tracker,Image Contours,Classification Label Visualization,Stitch Images,Mask Visualization,Microsoft SQL Server Sink,Polygon Visualization
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[instance_segmentation_prediction,object_detection_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
}