Heatmap Visualization¶
Class: HeatmapVisualizationBlockV1
Source: inference.core.workflows.core_steps.visualizations.heatmap.v1.HeatmapVisualizationBlockV1
Draw heatmaps on an image based on provided detections. Heat accumulates over time and is drawn as a semi-transparent overlay of blurred circles.
How This Block Works¶
This block takes an image and detection predictions and draws a heatmap. The block:
- Takes an image and predictions as input.
- Accumulates heat based on the position of detections.
- Draws a semi-transparent overlay of blurred circles representing the heat.
Common Use Cases¶
- Density Analysis: Visualize the density of objects in a scene.
- Traffic Monitoring: Identify high-traffic areas.
- Retail Analytics: Analyze foot traffic in stores.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/heatmap_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.. | ❌ |
copy_image |
bool |
Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations.. | ✅ |
position |
str |
The position of the heatmap relative to the detection.. | ✅ |
opacity |
float |
Opacity of the overlay mask, between 0 and 1.. | ✅ |
radius |
int |
Radius of the heat circle.. | ✅ |
kernel_size |
int |
Kernel size for blurring the heatmap.. | ✅ |
top_hue |
int |
Hue at the top of the heatmap. Defaults to 0 (red).. | ✅ |
low_hue |
int |
Hue at the bottom of the heatmap. Defaults to 125 (blue).. | ✅ |
ignore_stationary |
bool |
If True, only moving objects (based on tracker ID) will contribute to the heatmap.. | ✅ |
motion_threshold |
int |
Minimum movement in pixels required to consider an object as moving.. | ✅ |
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 - Heatmap accumulation and stationary-object filtering keep per-video tracking state in process memory. With remote step execution on stateless or multi-replica HTTP runtimes, successive frames may be served by different worker processes, so heat history resets or splits across workers. Use local step execution in an InferencePipeline for stable cross-frame visualizations.
-
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 Heatmap Visualization in version v1.
- inputs:
Crop Visualization,Image Slicer,Detection Event Log,Roboflow Dataset Upload,ByteTrack Tracker,Instance Segmentation Model,Google Gemini,Classification Label Visualization,Mask Edge Snap,Dynamic Crop,Per-Class Confidence Filter,Detections Transformation,Time in Zone,SAM 3 Interactive,Velocity,Image Slicer,Absolute Static Crop,Detections Classes Replacement,Template Matching,Current Time,Pixel Color Count,Roboflow Custom Metadata,Multi-Label Classification Model,SIFT Comparison,Mask Area Measurement,Morphological Transformation,Background Subtraction,Line Counter Visualization,BoT-SORT Tracker,Ellipse Visualization,OpenAI,MoonshotAI Kimi,SAM 3,Grid Visualization,Bounding Box Visualization,Morphological Transformation,Segment Anything 2 Model,Google Gemma,Byte Tracker,Object Detection Model,Motion Detection,Cosmos 3,Overlap Filter,OpenAI,Cosine Similarity,Webhook Sink,VLM As Detector,Path Deviation,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Detections Stabilizer,Bounding Rectangle,SAM 3,Line Counter,Stitch Images,Roboflow Dataset Upload,OpenAI,SAM2 Video Tracker,Camera Calibration,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,Detection Offset,SAM3 Video Tracker,VLM As Classifier,Detections List Roll-Up,Pixelate Visualization,SORT Tracker,Qwen 3.6 API,PLC Writer,CSV Formatter,Detections Stitch,Track Class Lock,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Byte Tracker,Relative Static Crop,Anthropic Claude,PP-OCR,Anthropic Claude,Image Stack,Roboflow Visual Search Classifier,VLM As Detector,OCR Model,SAM 3,PTZ Tracking (ONVIF),Qwen 3.5 API,Halo Visualization,OpenRouter,Frame Delay,Local File Sink,Text Display,Roboflow Asset Library Attributes,Image Threshold,Image Blur,Gaze Detection,Color Visualization,LMM,Corner Visualization,JSON Parser,S3 Sink,MQTT Writer,Qwen-VL,Instance Segmentation Model,Google Gemini,Slack Notification,Stitch OCR Detections,Event Writer,Detections Consensus,Identify Outliers,SIFT,Nearest Neighbor Detection Match,VLM As Classifier,Auto Rotate on Edges,Time in Zone,Stitch OCR Detections,Google Gemini,Instance Segmentation Model,Twilio SMS Notification,Trace Visualization,Single-Label Classification Model,Perspective Correction,Seg Preview,Camera Focus,EasyOCR,Google Gemma API,Object Detection Model,Instance Segmentation Model,OC-SORT Tracker,MoonshotAI Kimi,Distance Measurement,Twilio SMS/MMS Notification,Blur Visualization,Path Deviation,LMM For Classification,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Image Convert Grayscale,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Moondream2,Clip Comparison,Dynamic Zone,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,SIFT Comparison,Halo Visualization,Contrast Enhancement,Keypoint Detection Model,Llama 3.2 Vision,Detections Combine,GLM-OCR,CogVLM,Circle Visualization,Byte Tracker,Image Contours,Camera Focus,Heatmap Visualization,Roboflow Vision Events,Line Counter,YOLO-World Model,Llama 3.2 Vision,OpenAI-Compatible LLM,Label Visualization,Time in Zone,Background Color Visualization,Keypoint Detection Model,PLC Reader,Model Comparison Visualization,Keypoint Detection Model,Detections Merge,Detections Filter,Object Detection Model,Email Notification,Anthropic Claude,Identify Changes - outputs:
Crop Visualization,Image Slicer,Roboflow Dataset Upload,ByteTrack Tracker,Instance Segmentation Model,Google Gemini,Classification Label Visualization,Mask Edge Snap,Dynamic Crop,SAM 3 Interactive,Image Slicer,Absolute Static Crop,Template Matching,Pixel Color Count,Multi-Label Classification Model,SIFT Comparison,Morphological Transformation,Background Subtraction,Line Counter Visualization,BoT-SORT Tracker,Ellipse Visualization,MoonshotAI Kimi,Multi-Label Classification Model,OpenAI,SAM 3,Grid Visualization,Segment Anything 2 Model,Bounding Box Visualization,Morphological Transformation,Google Gemma,Semantic Segmentation Model,Perception Encoder Embedding Model,Object Detection Model,Byte Tracker,Cosmos 3,Motion Detection,OpenAI,Multi-Label Classification Model,VLM As Detector,Depth Estimation,Image Preprocessing,Detections Stabilizer,Single-Label Classification Model,SAM 3,QR Code Detection,Stitch Images,Roboflow Dataset Upload,OpenAI,SAM2 Video Tracker,Qwen3.5,Camera Calibration,Google Vision OCR,OpenAI,Florence-2 Model,Qwen3-VL,Polygon Zone Visualization,Contrast Equalization,SAM3 Video Tracker,VLM As Classifier,Clip Comparison,Pixelate Visualization,SORT Tracker,Qwen 3.6 API,Detections Stitch,Track Class Lock,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Anthropic Claude,Relative Static Crop,PP-OCR,Anthropic Claude,Image Stack,Roboflow Visual Search Classifier,VLM As Detector,OCR Model,SAM 3,GeoTag Detection,Qwen 3.5 API,Halo Visualization,OpenRouter,Frame Delay,Semantic Segmentation Model,Text Display,Image Threshold,Image Blur,Gaze Detection,Color Visualization,LMM,Corner Visualization,Qwen-VL,Instance Segmentation Model,CLIP Embedding Model,Google Gemini,Event Writer,SIFT,VLM As Classifier,Google Gemini,Auto Rotate on Edges,Instance Segmentation Model,Single-Label Classification Model,Trace Visualization,Perspective Correction,Seg Preview,Camera Focus,EasyOCR,Google Gemma API,Object Detection Model,Instance Segmentation Model,OC-SORT Tracker,MoonshotAI Kimi,Twilio SMS/MMS Notification,Blur Visualization,Polygon Visualization,Stability AI Inpainting,Image Convert Grayscale,Florence-2 Model,Qwen3.5-VL,Barcode Detection,Moondream2,Dominant Color,Clip Comparison,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,SmolVLM2,Contrast Enhancement,Keypoint Detection Model,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Image Contours,Camera Focus,Heatmap Visualization,Roboflow Vision Events,Llama 3.2 Vision,YOLO-World Model,Qwen2.5-VL,Label Visualization,Time in Zone,Background Color Visualization,Keypoint Detection Model,Buffer,Single-Label Classification Model,Model Comparison Visualization,Keypoint Detection Model,LMM For Classification,Object Detection Model,Anthropic Claude
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Heatmap Visualization in version v1 has.
Bindings
-
input
image(image): The image to visualize on..copy_image(boolean): Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations..predictions(Union[instance_segmentation_prediction,object_detection_prediction,rle_instance_segmentation_prediction,keypoint_detection_prediction]): Model predictions to visualize..metadata(video_metadata): Video metadata containing video_identifier to maintain separate state for different videos..position(string): The position of the heatmap relative to the detection..opacity(float): Opacity of the overlay mask, between 0 and 1..radius(integer): Radius of the heat circle..kernel_size(integer): Kernel size for blurring the heatmap..top_hue(integer): Hue at the top of the heatmap. Defaults to 0 (red)..low_hue(integer): Hue at the bottom of the heatmap. Defaults to 125 (blue)..ignore_stationary(boolean): If True, only moving objects (based on tracker ID) will contribute to the heatmap..motion_threshold(integer): Minimum movement in pixels required to consider an object as moving..
-
output
image(image): Image in workflows.
Example JSON definition of step Heatmap Visualization in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/heatmap_visualization@v1",
"image": "$inputs.image",
"copy_image": true,
"predictions": "$steps.object_detection_model.predictions",
"metadata": "$inputs.video_metadata",
"position": "BOTTOM_CENTER",
"opacity": 0.2,
"radius": 40,
"kernel_size": 25,
"top_hue": 0,
"low_hue": 125,
"ignore_stationary": true,
"motion_threshold": 25
}