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