Grid Visualization¶
Class: GridVisualizationBlockV1
Source: inference.core.workflows.core_steps.visualizations.grid.v1.GridVisualizationBlockV1
Arrange multiple images in a grid layout, automatically organizing a list of images into a square grid pattern with automatic resizing and cell-based positioning for side-by-side comparison, thumbnail displays, or batch visualization.
How This Block Works¶
This block takes a list of images and arranges them into a grid layout within a single output image. The block:
- Takes a list of images and output dimensions (width and height) as input
- Calculates the grid size based on the number of images (creates a square grid with dimensions equal to the square root of the image count, rounded up)
- Divides the output canvas into equal-sized cells based on the grid dimensions
- Resizes each input image to fit within its assigned cell while maintaining aspect ratio (images are scaled to fit the cell dimensions without distortion)
- Places images in the grid starting from the top-left corner, filling left-to-right and top-to-bottom (row-major order)
- Centers each resized image within its cell, creating evenly spaced grid layout
- Returns a single output image containing all input images arranged in the grid
The block automatically organizes multiple images into a grid for easy comparison or batch viewing. Each image is resized to fit its grid cell while preserving aspect ratio, and images are centered within their cells. The grid dimensions are automatically calculated to create a roughly square grid (e.g., 4 images = 2x2, 9 images = 3x3, 10 images = 4x4). This creates a compact, organized layout ideal for comparing multiple images, displaying thumbnails, or creating batch visualization outputs. The block uses caching to optimize performance when the same images are reused.
Common Use Cases¶
- Batch Image Comparison: Arrange multiple images side-by-side in a grid for easy comparison, allowing you to visualize results from different models, time periods, or processing steps simultaneously
- Thumbnail Gallery Creation: Create thumbnail grids from collections of images for gallery displays, image browsers, or preview interfaces where multiple images need to be shown in a compact layout
- Multi-Image Workflow Results: Display results from multi-image workflows (like batch processing, image slicer outputs, or buffer collections) in an organized grid format for overview visualization
- Before/After Comparisons: Arrange before and after images, original and processed versions, or multiple workflow outputs in a grid for comparison and validation workflows
- Time-Series Visualization: Display images from different time points, frames, or snapshots in a grid to visualize temporal changes, sequences, or progression over time
- Quality Control and Review: Create grid layouts for quality control workflows, batch review, or inspection processes where multiple images need to be viewed together for evaluation or validation
Connecting to Other Blocks¶
The grid output image from this block can be connected to:
- Image processing blocks (e.g., Buffer, Image Slicer, Dynamic Crop) to receive lists of images that are arranged into grid layouts
- Data storage blocks (e.g., Local File Sink, CSV Formatter, Roboflow Dataset Upload) to save grid images for documentation, reporting, or batch review purposes
- Webhook blocks to send grid visualizations to external systems, APIs, or web applications for display in dashboards, galleries, or batch viewing interfaces
- Notification blocks (e.g., Email Notification, Slack Notification) to send grid images as visual evidence in alerts or reports containing multiple images
- Video output blocks to create video streams or recordings with grid layouts for live multi-image monitoring or batch visualization workflows
- Other visualization blocks that can accept single images, allowing grid outputs to be further processed or combined with additional annotations
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/grid_visualization@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | โ |
width |
int |
Width of the output grid image in pixels. Controls the total width of the canvas where the image grid will be arranged. The width is divided into equal-sized cells based on the grid dimensions. Typical values range from 1280 to 3840 pixels depending on desired output size and number of images.. | โ |
height |
int |
Height of the output grid image in pixels. Controls the total height of the canvas where the image grid will be arranged. The height is divided into equal-sized cells based on the grid dimensions. Typical values range from 720 to 2160 pixels depending on desired output size and number of images.. | โ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Grid Visualization in version v1.
- inputs:
Florence-2 Model,Google Gemma API,SIFT Comparison,Google Gemini,Dimension Collapse,Qwen 3.6 API,Qwen 3.5 API,Camera Focus,Perspective Correction,Image Contours,MoonshotAI Kimi,Florence-2 Model,Template Matching,Line Counter,Clip Comparison,Distance Measurement,Clip Comparison,Qwen-VL,Image Stack,Motion Detection,SIFT Comparison,Anthropic Claude,PLC EthernetIP,OpenRouter,Detections List Roll-Up,Anthropic Claude,Dynamic Zone,Google Gemini,OpenAI,Llama 3.2 Vision,MoonshotAI Kimi,Size Measurement,PLC ModbusTCP,Line Counter,OpenAI,Google Gemma,Detection Event Log,Google Gemini,OpenAI,Pixel Color Count,Llama 3.2 Vision,Buffer,Anthropic Claude - outputs:
Google Gemma API,Camera Focus,Event Writer,Google Gemini,Ellipse Visualization,Camera Focus,Image Contours,Image Preprocessing,Multi-Label Classification Model,Background Subtraction,SAM 3,YOLO-World Model,Mask Visualization,Crop Visualization,Segment Anything 2 Model,Color Visualization,Seg Preview,Multi-Label Classification Model,Perception Encoder Embedding Model,SAM2 Video Tracker,Relative Static Crop,Google Vision OCR,SIFT Comparison,Single-Label Classification Model,Object Detection Model,Semantic Segmentation Model,Google Gemini,Instance Segmentation Model,EasyOCR,Llama 3.2 Vision,VLM As Detector,SAM 3,Contrast Enhancement,Image Convert Grayscale,Qwen3.5,Google Gemma,Google Gemini,Keypoint Detection Model,Image Blur,Keypoint Visualization,Buffer,OC-SORT Tracker,Anthropic Claude,Camera Calibration,VLM As Detector,Detections Stitch,LMM For Classification,Qwen 3.6 API,Barcode Detection,Semantic Segmentation Model,Perspective Correction,Time in Zone,SAM 3,CLIP Embedding Model,Mask Edge Snap,Contrast Equalization,Clip Comparison,SORT Tracker,Qwen-VL,Image Stack,Single-Label Classification Model,Model Comparison Visualization,Dot Visualization,OpenAI,Moondream2,Reference Path Visualization,Polygon Visualization,QR Code Detection,Detections Stabilizer,Dominant Color,SIFT,Instance Segmentation Model,Image Slicer,Stability AI Outpainting,Halo Visualization,Email Notification,ByteTrack Tracker,Classification Label Visualization,Bounding Box Visualization,MoonshotAI Kimi,Object Detection Model,SmolVLM2,Pixelate Visualization,Image Slicer,Template Matching,Depth Estimation,Roboflow Vision Events,Text Display,Object Detection Model,Icon Visualization,Motion Detection,Blur Visualization,VLM As Classifier,Anthropic Claude,Qwen3-VL,OpenRouter,MoonshotAI Kimi,Anthropic Claude,LMM,Stability AI Inpainting,Roboflow Dataset Upload,Qwen3.5-VL,Image Threshold,Trace Visualization,Circle Visualization,Instance Segmentation Model,Label Visualization,Pixel Color Count,Morphological Transformation,Morphological Transformation,Polygon Zone Visualization,Keypoint Detection Model,VLM As Classifier,Dynamic Crop,Polygon Visualization,Florence-2 Model,OpenAI,Stability AI Image Generation,Single-Label Classification Model,Gaze Detection,Qwen 3.5 API,Byte Tracker,CogVLM,Absolute Static Crop,Roboflow Dataset Upload,Multi-Label Classification Model,Stitch Images,Florence-2 Model,Twilio SMS/MMS Notification,Clip Comparison,Triangle Visualization,Background Color Visualization,Keypoint Detection Model,Corner Visualization,Line Counter Visualization,BoT-SORT Tracker,Halo Visualization,OCR Model,OpenAI,GLM-OCR,Qwen2.5-VL,OpenAI,Llama 3.2 Vision,Heatmap Visualization,Instance Segmentation Model
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Grid Visualization in version v1 has.
Bindings
-
input
images(list_of_values): List of images to arrange in a grid layout. Can be a list of image outputs from blocks like Buffer, Image Slicer, Dynamic Crop, or other blocks that output multiple images. Images will be automatically arranged in a square grid (calculated from the number of images) and resized to fit their grid cells while maintaining aspect ratio..width(integer): Width of the output grid image in pixels. Controls the total width of the canvas where the image grid will be arranged. The width is divided into equal-sized cells based on the grid dimensions. Typical values range from 1280 to 3840 pixels depending on desired output size and number of images..height(integer): Height of the output grid image in pixels. Controls the total height of the canvas where the image grid will be arranged. The height is divided into equal-sized cells based on the grid dimensions. Typical values range from 720 to 2160 pixels depending on desired output size and number of images..
-
output
image(image): Image in workflows.
Example JSON definition of step Grid Visualization in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/grid_visualization@v1",
"images": "$steps.buffer.output",
"width": 2560,
"height": 1440
}