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:
Roboflow Asset Library Attributes,MoonshotAI Kimi,Path Deviation,Image Blur,Overlap Filter,Reference Path Visualization,SIFT Comparison,PTZ Tracking (ONVIF),Event Writer,Slack Notification,SAM2 Video Tracker,Halo Visualization,VLM As Classifier,Image Stack,Google Gemma,Qwen 3.6 API,Bounding Rectangle,Object Detection Model,Dot Visualization,Label Visualization,Background Color Visualization,Llama 3.2 Vision,Email Notification,SAM 3 Interactive,Velocity,Pixelate Visualization,OpenAI-Compatible LLM,Google Gemini,JSON Parser,Track Class Lock,Anthropic Claude,OpenAI,Trace Visualization,Llama 3.2 Vision,Detection Event Log,ByteTrack Tracker,Clip Comparison,Camera Focus,OpenAI,GLM-OCR,MQTT Writer,SIFT Comparison,Webhook Sink,CSV Formatter,Image Contours,Local File Sink,Motion Detection,Google Gemini,MoonshotAI Kimi,Polygon Visualization,SIFT,Classification Label Visualization,Multi-Label Classification Model,Instance Segmentation Model,Keypoint Detection Model,Keypoint Visualization,Template Matching,Instance Segmentation Model,Icon Visualization,Seg Preview,Dynamic Crop,Stability AI Inpainting,Bounding Box Visualization,Polygon Zone Visualization,Stability AI Outpainting,Detections Transformation,Crop Visualization,BoT-SORT Tracker,Image Convert Grayscale,Byte Tracker,Mask Visualization,Halo Visualization,Detections Stitch,Detection Offset,Distance Measurement,SORT Tracker,Text Display,Morphological Transformation,Anthropic Claude,VLM As Classifier,Line Counter,Roboflow Dataset Upload,VLM As Detector,Detections Consensus,Object Detection Model,Detections Filter,Ellipse Visualization,Detections Merge,Keypoint Detection Model,SAM3 Video Tracker,Time in Zone,SAM 3,Circle Visualization,Twilio SMS Notification,Path Deviation,S3 Sink,Email Notification,Camera Focus,Identify Changes,Byte Tracker,SAM 3,Image Slicer,LMM For Classification,OCR Model,Mask Area Measurement,Heatmap Visualization,OpenAI,Google Gemma API,Stitch Images,Identify Outliers,Time in Zone,Morphological Transformation,EasyOCR,YOLO-World Model,Current Time,Blur Visualization,Stitch OCR Detections,Moondream2,Detections List Roll-Up,Florence-2 Model,Google Gemini,Corner Visualization,OpenRouter,Detections Stabilizer,Pixel Color Count,Model Comparison Visualization,SAM 3,Model Monitoring Inference Aggregator,Google Vision OCR,Image Threshold,Byte Tracker,Instance Segmentation Model,LMM,Single-Label Classification Model,Polygon Visualization,Segment Anything 2 Model,Time in Zone,Stability AI Image Generation,Line Counter Visualization,Mask Edge Snap,Line Counter,CogVLM,Relative Static Crop,Qwen3.5-VL,Per-Class Confidence Filter,Grid Visualization,Image Preprocessing,Gaze Detection,Stitch OCR Detections,Anthropic Claude,OPC UA Writer Sink,Color Visualization,Dynamic Zone,Detections Combine,Triangle Visualization,QR Code Generator,Contrast Enhancement,Roboflow Dataset Upload,Absolute Static Crop,Qwen 3.5 API,Background Subtraction,OC-SORT Tracker,OpenAI,Image Slicer,Qwen-VL,Florence-2 Model,Perspective Correction,Twilio SMS/MMS Notification,Roboflow Vision Events,Microsoft SQL Server Sink,Cosine Similarity,Instance Segmentation Model,Depth Estimation,Roboflow Custom Metadata,Contrast Equalization,Camera Calibration,Detections Classes Replacement,VLM As Detector,Keypoint Detection Model,Object Detection Model - outputs:
MoonshotAI Kimi,Image Blur,SmolVLM2,Reference Path Visualization,Event Writer,SAM2 Video Tracker,VLM As Classifier,Halo Visualization,CLIP Embedding Model,Image Stack,Clip Comparison,Google Gemma,Qwen 3.6 API,Object Detection Model,Dot Visualization,Label Visualization,Background Color Visualization,Llama 3.2 Vision,SAM 3 Interactive,Pixelate Visualization,Qwen3-VL,Google Gemini,Track Class Lock,Anthropic Claude,OpenAI,Trace Visualization,Llama 3.2 Vision,ByteTrack Tracker,Clip Comparison,Camera Focus,GLM-OCR,OpenAI,Qwen3.5,Buffer,QR Code Detection,SIFT Comparison,Image Contours,Motion Detection,Google Gemini,MoonshotAI Kimi,Polygon Visualization,SIFT,Classification Label Visualization,Multi-Label Classification Model,Instance Segmentation Model,Keypoint Detection Model,Template Matching,Keypoint Visualization,Instance Segmentation Model,Icon Visualization,Seg Preview,Dynamic Crop,Stability AI Inpainting,Bounding Box Visualization,BoT-SORT Tracker,Multi-Label Classification Model,Polygon Zone Visualization,Crop Visualization,Stability AI Outpainting,Image Convert Grayscale,Mask Visualization,Halo Visualization,Detections Stitch,SORT Tracker,Barcode Detection,Text Display,Anthropic Claude,Morphological Transformation,VLM As Classifier,Roboflow Dataset Upload,VLM As Detector,Object Detection Model,Ellipse Visualization,Keypoint Detection Model,SAM3 Video Tracker,SAM 3,Circle Visualization,Semantic Segmentation Model,Email Notification,Camera Focus,Single-Label Classification Model,SAM 3,Image Slicer,LMM For Classification,Dominant Color,OCR Model,Heatmap Visualization,Google Gemma API,OpenAI,Stitch Images,Morphological Transformation,EasyOCR,Single-Label Classification Model,YOLO-World Model,Blur Visualization,Moondream2,Florence-2 Model,Google Gemini,Corner Visualization,OpenRouter,Detections Stabilizer,Pixel Color Count,Model Comparison Visualization,SAM 3,Google Vision OCR,Byte Tracker,Image Threshold,Instance Segmentation Model,LMM,Single-Label Classification Model,Polygon Visualization,Segment Anything 2 Model,Time in Zone,Mask Edge Snap,Line Counter Visualization,Stability AI Image Generation,CogVLM,Relative Static Crop,Qwen3.5-VL,Image Preprocessing,Gaze Detection,Anthropic Claude,Color Visualization,Triangle Visualization,Roboflow Dataset Upload,Contrast Enhancement,Absolute Static Crop,Qwen 3.5 API,Background Subtraction,Multi-Label Classification Model,OC-SORT Tracker,OpenAI,Image Slicer,Semantic Segmentation Model,Qwen-VL,Florence-2 Model,Perspective Correction,Roboflow Vision Events,Twilio SMS/MMS Notification,Perception Encoder Embedding Model,Instance Segmentation Model,Depth Estimation,Contrast Equalization,Camera Calibration,VLM As Detector,Qwen2.5-VL,Keypoint Detection Model,Object Detection Model
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[object_detection_prediction,keypoint_detection_prediction,rle_instance_segmentation_prediction,instance_segmentation_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
}