Delta Filter¶
Class: DeltaFilterBlockV1
Source: inference.core.workflows.core_steps.flow_control.delta_filter.v1.DeltaFilterBlockV1
Trigger workflow execution only when an input value changes from its previous state, enabling change detection, avoiding redundant processing when values remain constant, and optimizing system efficiency by executing downstream steps only on state transitions.
How This Block Works¶
This block monitors a value and only continues workflow execution when that value changes compared to its previous state. The block:
- Takes an image (for video metadata context) and a value to monitor as input
- Extracts video metadata from the image to identify the video stream (video_identifier)
- Retrieves the previously cached value for this video identifier from an internal cache
- Compares the current input value against the cached previous value
- If the value has changed (current value ≠ previous value):
- Updates the cache with the new value for this video identifier
- Continues execution to the specified
next_stepsblocks, allowing downstream processing - If the value has not changed (current value == previous value):
- Terminates the current workflow branch, preventing redundant downstream execution
- Returns flow control directives that either continue to next steps or terminate the branch
The block maintains separate cached values for each video stream (identified by video_identifier), allowing it to track value changes independently across multiple video sources. This per-video tracking ensures that the filter resets appropriately when switching between different video streams. The block supports monitoring any value type (numbers, strings, detection counts, etc.), making it versatile for detecting changes in counters, metrics, detection results, or any other workflow data. By only triggering downstream blocks when values actually change, the Delta Filter prevents unnecessary processing when values remain constant, which is especially useful in video workflows where many frames may have the same detection count or metric value.
Common Use Cases¶
- Change Detection for Counters: Trigger actions only when counter values change (e.g., execute data logging when line counter count_in changes from 5 to 6, skip processing when count remains at 6), avoiding redundant writes or updates when values are stable
- State Transition Monitoring: Detect transitions in system states or detection results and trigger workflows only on state changes (e.g., execute notification when detection class changes from "empty" to "occupied", skip when state remains "occupied"), preventing repeated actions for the same state
- Conditional Data Logging: Write to databases, CSV files, or external systems only when values change (e.g., log count changes to OPC or PLC systems, skip logging when counts are unchanged), reducing storage and network overhead
- Event-Based Notifications: Send alerts or notifications only when values transition (e.g., trigger email notification when zone count changes, avoid spam when count remains constant), ensuring notifications represent meaningful changes rather than repeated states
- Optimized Processing Pipelines: Reduce computational load in video workflows by skipping downstream processing when monitored values haven't changed (e.g., skip expensive analysis when detection count is unchanged across frames), improving overall workflow efficiency
- Multi-Stream Change Tracking: Monitor value changes independently across multiple video streams (e.g., track zone counts separately for different camera feeds), with automatic per-video caching ensuring correct change detection for each stream
Connecting to Other Blocks¶
This block monitors values and controls workflow execution flow, and can be connected:
- After counting or metric blocks (e.g., Line Counter, Time in Zone, Velocity, Detection Filter) to detect when counts, metrics, or aggregated values change and conditionally trigger downstream processing based on value transitions
- After detection blocks (e.g., Object Detection, Classification, Keypoint Detection) to monitor detection results, class changes, or confidence metrics and execute actions only when detection outcomes change from previous frames
- After data processing blocks (e.g., Property Definition, Expression, Delta Filter) to track computed values or processed metrics and trigger workflows only when these computed values transition, avoiding redundant processing
- Before data storage blocks (e.g., Local File Sink, CSV Formatter, Roboflow Dataset Upload, Webhook Sink) to conditionally log or store data only when monitored values change, preventing duplicate entries or unnecessary writes when values remain constant
- Before notification blocks (e.g., Email Notification, Slack Notification, Twilio SMS Notification) to trigger alerts only when meaningful changes occur (e.g., count changes, state transitions), avoiding notification spam when values are stable
- In video processing workflows where per-frame values may remain constant for many frames, using the block to efficiently detect changes and trigger expensive downstream operations only when necessary, optimizing resource usage
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/delta_filter@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
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 Delta Filter in version v1.
- inputs:
SAM 3,Image Preprocessing,Single-Label Classification Model,Anthropic Claude,Image Slicer,CLIP Embedding Model,Dynamic Crop,Time in Zone,Mask Area Measurement,BoT-SORT Tracker,Bounding Box Visualization,Cache Get,Object Detection Model,Mask Edge Snap,First Non Empty Or Default,Path Deviation,QR Code Detection,Expression,Absolute Static Crop,SIFT Comparison,Stitch Images,Stitch OCR Detections,OpenAI,Instance Segmentation Model,Email Notification,Stability AI Inpainting,Frame Delay,Cosine Similarity,Distance Measurement,EasyOCR,Llama 3.2 Vision,Track Class Lock,Florence-2 Model,Gaze Detection,Roboflow Custom Metadata,Dynamic Zone,Auto Rotate on Edges,YOLO-World Model,Dominant Color,Detections Transformation,Property Definition,Byte Tracker,Keypoint Detection Model,Continue If,Stability AI Outpainting,Model Comparison Visualization,Detections Classes Replacement,Slack Notification,Line Counter Visualization,Camera Calibration,Byte Tracker,Single-Label Classification Model,Clip Comparison,PLC Reader,VLM As Detector,CogVLM,SORT Tracker,Camera Focus,Corner Visualization,Ellipse Visualization,PP-OCR,Detections List Roll-Up,Rate Limiter,Morphological Transformation,Anthropic Claude,Roboflow Visual Search,Color Visualization,Instance Segmentation Model,OpenAI,Time in Zone,Triangle Visualization,Detections Stabilizer,Detection Event Log,Object Detection Model,Image Contours,SAM 3,Image Threshold,SAM 3,Barcode Detection,Detections Merge,Current Time,Roboflow Visual Search Classifier,QR Code Generator,Qwen2.5-VL,OpenAI-Compatible LLM,Florence-2 Model,Semantic Segmentation Model,SmolVLM2,Polygon Zone Visualization,Stitch OCR Detections,Roboflow Asset Library Attributes,Path Deviation,GeoTag Detection,Microsoft SQL Server Sink,Moondream2,VLM As Classifier,Camera Focus,Inner Workflow,Image Convert Grayscale,Label Visualization,Detection Offset,Stability AI Image Generation,Llama 3.2 Vision,VLM As Detector,Perception Encoder Embedding Model,Instance Segmentation Model,Line Counter,MQTT Writer,Roboflow Dataset Upload,Local File Sink,Identify Outliers,Cache Set,Bounding Rectangle,VLM As Classifier,Google Gemini,Semantic Segmentation Model,Event Writer,Depth Estimation,Seg Preview,Byte Tracker,Google Gemini,OpenAI,Trace Visualization,Twilio SMS Notification,Pixel Color Count,SAM 3 Interactive,PLC EthernetIP,Detections Filter,LMM For Classification,Object Detection Model,Velocity,Webhook Sink,Halo Visualization,Buffer,Mask Visualization,Switch Case,Template Matching,Pixelate Visualization,Twilio SMS/MMS Notification,Environment Secrets Store,MoonshotAI Kimi,Dot Visualization,Image Stack,Multi-Label Classification Model,OPC UA Writer Sink,Google Gemini,OC-SORT Tracker,Keypoint Visualization,Dimension Collapse,LMM,Detections Combine,Image Slicer,PTZ Tracking (ONVIF),Time in Zone,OCR Model,Circle Visualization,Contrast Enhancement,Relative Static Crop,SAM2 Video Tracker,ByteTrack Tracker,Morphological Transformation,Per-Class Confidence Filter,Email Notification,Halo Visualization,Clip Comparison,Cosmos 3,Polygon Visualization,Qwen-VL,PLC Writer,Google Gemma,Crop Visualization,Qwen 3.5 API,Model Monitoring Inference Aggregator,Qwen3-VL,Qwen3.5,Keypoint Detection Model,Size Measurement,Icon Visualization,Heatmap Visualization,Single-Label Classification Model,Motion Detection,Multi-Label Classification Model,Google Gemma API,Detections Consensus,Instance Segmentation Model,Delta Filter,Overlap Analysis,CSV Formatter,Image Blur,Segment Anything 2 Model,Background Color Visualization,Detections Stitch,Grid Visualization,SAM3 Video Tracker,Blur Visualization,GLM-OCR,Anthropic Claude,Reference Path Visualization,Classification Label Visualization,Google Vision OCR,Perspective Correction,Background Subtraction,Polygon Visualization,Data Aggregator,Contrast Equalization,SIFT,Qwen 3.6 API,Text Display,JSON Parser,MoonshotAI Kimi,OpenRouter,Qwen3.5-VL,Roboflow Vision Events,Identify Changes,OpenAI,SIFT Comparison,Keypoint Detection Model,PLC ModbusTCP,Multi-Label Classification Model,Overlap Filter,S3 Sink,Line Counter,Roboflow Dataset Upload - outputs: None
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Delta Filter in version v1 has.
Bindings
-
input
image(image): not available.value(*): Value to monitor for changes. Can be any data type (numbers, strings, detection counts, metrics, etc.) from workflow inputs or step outputs. The workflow branch continues to next_steps only when this value differs from the previously cached value for the current video stream. If the value remains the same, the branch terminates to avoid redundant processing. Example: Monitor a line counter count ($steps.line_counter.count_in) and trigger actions only when the count changes..next_steps(step): List of workflow steps to execute when the monitored value changes from its previous state. These steps receive control flow only when a change is detected, allowing conditional downstream processing. If the value hasn't changed, these steps will not execute as the branch terminates. Each step selector references a block in the workflow that should execute on value transitions..
-
output
Example JSON definition of step Delta Filter in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/delta_filter@v1",
"image": "<block_does_not_provide_example>",
"value": "$steps.line_counter.count_in",
"next_steps": "$steps.write_to_csv"
}