Image Stack¶
Class: ImageStackBlockV1
Source: inference.core.workflows.core_steps.fusion.image_stack.v1.ImageStackBlockV1
Accumulate compressed video frames into a fixed-size stack, returning the most recent N frames as JPEG-encoded binary blobs. Designed for shared-hosting safety: frames are always JPEG-compressed and downsampled to fit within resolution limits, preventing out-of-memory conditions.
How This Block Works¶
- Receives a video frame (WorkflowImageData) each workflow cycle.
- Downsamples the frame if it exceeds the configured resolution limits (default 1920x1080), preserving aspect ratio.
- JPEG-encodes the frame at quality 75 and stores the resulting bytes.
- Maintains a per-camera FIFO buffer (deque) of up to
stack_sizecompressed frames. When the buffer is full the oldest frame is automatically evicted. - If
stack_sizechanges between calls (e.g. via a dynamic selector), the buffer is resized and existing frames are preserved up to the new limit. - If the
clearinput is True the buffer is flushed before the current frame is added. - Outputs the list of JPEG byte blobs (newest first) and the current frame count.
Common Use Cases¶
- Action / activity recognition: accumulate a clip of N frames and pass them to a vision-language model (e.g. Google Gemini, Qwen) that can reason over multiple images to classify actions, detect events, or describe what is happening in a scene.
- Time-lapse snapshots: collect the last N frames for periodic visual comparison.
- Event buffering: keep a rolling window of frames around an event of interest.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/image_stack@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
stack_size |
int |
Maximum number of frames to keep in the stack (1-64). When the stack is full the oldest frame is evicted.. | ✅ |
resolution_width |
int |
Maximum frame width in pixels (64-1920). Frames wider than this are downsampled preserving aspect ratio.. | ✅ |
resolution_height |
int |
Maximum frame height in pixels (64-1080). Frames taller than this are downsampled preserving aspect ratio.. | ✅ |
clear |
bool |
When True the entire frame buffer is flushed before the current frame is added. Useful for resetting state on scene changes.. | ✅ |
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 - Frame stack is stored in process memory per video_identifier. With remote step execution on stateless or multi-replica HTTP runtimes, successive frames may be served by different worker processes, so the stack resets or contains only a partial frame history. 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 Image Stack in version v1.
- inputs:
Keypoint Visualization,Twilio SMS/MMS Notification,OPC UA Writer Sink,Blur Visualization,SIFT Comparison,Grid Visualization,Color Visualization,PLC Writer,Dynamic Zone,JSON Parser,Image Convert Grayscale,Motion Detection,Absolute Static Crop,Distance Measurement,Roboflow Visual Search Classifier,Image Threshold,Icon Visualization,Polygon Zone Visualization,Trace Visualization,PLC Reader,Model Comparison Visualization,Camera Focus,QR Code Generator,Image Stack,MQTT Writer,Contrast Equalization,Background Subtraction,Mask Visualization,Reference Path Visualization,Contrast Enhancement,Twilio SMS Notification,Microsoft SQL Server Sink,PTZ Tracking (ONVIF),Text Display,VLM As Detector,Dynamic Crop,Halo Visualization,Image Blur,Stability AI Image Generation,Webhook Sink,VLM As Detector,Ellipse Visualization,Identify Outliers,Pixelate Visualization,Stitch Images,Line Counter,S3 Sink,Classification Label Visualization,Polygon Visualization,Roboflow Dataset Upload,Event Writer,Morphological Transformation,Detection Event Log,Bounding Box Visualization,Template Matching,VLM As Classifier,Image Contours,Image Slicer,Heatmap Visualization,Stability AI Outpainting,Slack Notification,Email Notification,Circle Visualization,Roboflow Custom Metadata,Perspective Correction,Camera Focus,Camera Calibration,Roboflow Asset Library Attributes,Crop Visualization,Morphological Transformation,Polygon Visualization,Detections Consensus,Line Counter,Relative Static Crop,Background Color Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Corner Visualization,VLM As Classifier,SIFT,Image Slicer,Roboflow Vision Events,Roboflow Visual Search,Identify Changes,Local File Sink,Email Notification,Triangle Visualization,Pixel Color Count,Roboflow Dataset Upload,Dot Visualization,Image Preprocessing,SIFT Comparison,Line Counter Visualization,Halo Visualization,Depth Estimation,Label Visualization - outputs:
Keypoint Visualization,Keypoint Detection Model,Twilio SMS/MMS Notification,OPC UA Writer Sink,Qwen 3.6 API,SIFT Comparison,Grid Visualization,SAM 3,Object Detection Model,Llama 3.2 Vision,Absolute Static Crop,Roboflow Visual Search Classifier,Image Threshold,Polygon Zone Visualization,BoT-SORT Tracker,MQTT Writer,Google Gemini,Detections List Roll-Up,Background Subtraction,Reference Path Visualization,Google Gemma API,Instance Segmentation Model,Twilio SMS Notification,Mask Edge Snap,Detections Classes Replacement,PTZ Tracking (ONVIF),VLM As Detector,Florence-2 Model,Halo Visualization,Image Blur,Seg Preview,SAM 3,Ellipse Visualization,OpenAI,Florence-2 Model,Byte Tracker,Line Counter,LMM For Classification,Time in Zone,Path Deviation,Cache Set,OpenAI,Instance Segmentation Model,Event Writer,Time in Zone,Keypoint Detection Model,Google Gemma,Byte Tracker,Buffer,Slack Notification,Heatmap Visualization,SORT Tracker,Email Notification,Circle Visualization,Perspective Correction,Byte Tracker,Detections Consensus,Keypoint Detection Model,Crop Visualization,Polygon Visualization,Line Counter,ByteTrack Tracker,Stability AI Inpainting,SAM 3,VLM As Classifier,Object Detection Model,Google Gemini,Image Slicer,Roboflow Vision Events,Size Measurement,Object Detection Model,SAM3 Video Tracker,Dot Visualization,Line Counter Visualization,Time in Zone,Instance Segmentation Model,Stitch OCR Detections,Clip Comparison,Blur Visualization,Anthropic Claude,PLC EthernetIP,Color Visualization,Dynamic Zone,Motion Detection,Stitch OCR Detections,Qwen 3.5 API,Trace Visualization,Icon Visualization,PLC Reader,QR Code Generator,Google Gemini,Image Stack,Instance Segmentation Model,Qwen-VL,Mask Visualization,MoonshotAI Kimi,Text Display,Webhook Sink,OpenAI,VLM As Detector,Identify Outliers,Pixelate Visualization,Stitch Images,Detection Offset,Classification Label Visualization,MoonshotAI Kimi,Polygon Visualization,Anthropic Claude,Roboflow Dataset Upload,Morphological Transformation,Bounding Box Visualization,VLM As Classifier,Image Contours,Image Slicer,Stability AI Outpainting,Anthropic Claude,SAM2 Video Tracker,Roboflow Asset Library Attributes,Morphological Transformation,Detections Stabilizer,Path Deviation,Clip Comparison,Corner Visualization,Track Class Lock,Dominant Color,Roboflow Visual Search,OpenRouter,Llama 3.2 Vision,Identify Changes,Email Notification,Triangle Visualization,Roboflow Dataset Upload,Pixel Color Count,OC-SORT Tracker,Image Preprocessing,SIFT Comparison,YOLO-World Model,Halo Visualization,Label Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Image Stack in version v1 has.
Bindings
-
input
image(image): Video frame to add to the stack..stack_size(integer): Maximum number of frames to keep in the stack (1-64). When the stack is full the oldest frame is evicted..resolution_width(integer): Maximum frame width in pixels (64-1920). Frames wider than this are downsampled preserving aspect ratio..resolution_height(integer): Maximum frame height in pixels (64-1080). Frames taller than this are downsampled preserving aspect ratio..clear(boolean): When True the entire frame buffer is flushed before the current frame is added. Useful for resetting state on scene changes..
-
output
frames(list_of_values): List of values of any type.frames_count(integer): Integer value.
Example JSON definition of step Image Stack in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/image_stack@v1",
"image": "$inputs.image",
"stack_size": 5,
"resolution_width": 640,
"resolution_height": 480,
"clear": false
}