Text Display¶
Class: TextDisplayVisualizationBlockV1
Source: inference.core.workflows.core_steps.visualizations.text_display.v1.TextDisplayVisualizationBlockV1
The Text Display block renders text on an image with full control over styling and positioning.
Dynamic Text Content¶
Text content can be parameterized with workflow execution outcomes using the same templating syntax as Email and SMS notification blocks:
text = "Detected {{ '{{' }} $parameters.count {{ '}}' }} objects of class {{ '{{' }} $parameters.class_name {{ '}}' }}"
Parameters are provided via the text_parameters field:
text_parameters = {
"count": "$steps.model.predictions",
"class_name": "$inputs.target_class"
}
You can apply transformations to parameters using text_parameters_operations:
text_parameters_operations = {
"count": [{"type": "SequenceLength"}]
}
Styling Options¶
- text_color: Color of the text. Supports:
- Supervision color names (uppercase): "WHITE", "BLACK", "RED", "GREEN", "BLUE", "YELLOW", "ROBOFLOW", etc.
- Hex format: "#RRGGBB" (e.g., "#FF0000" for red)
- RGB format: "rgb(R, G, B)" (e.g., "rgb(255, 0, 0)" for red)
- BGR format: "bgr(B, G, R)" (e.g., "bgr(0, 0, 255)" for red)
- background_color: Background color behind the text. Supports the same color formats as
text_color. Use "transparent" for no background. - background_opacity: Transparency of the background (0.0 = fully transparent, 1.0 = fully opaque)
- font_scale: Scale factor for the font size
- font_thickness: Thickness of the text strokes
- padding: Padding around the text in pixels
- text_align: Horizontal text alignment ("left", "center", "right")
- border_radius: Radius for rounded corners on the background
Positioning Options¶
The block supports both absolute and relative positioning:
Absolute Positioning (position_mode = "absolute"):
- position_x: X coordinate in pixels from the left edge
- position_y: Y coordinate in pixels from the top edge
Relative Positioning (position_mode = "relative"):
- anchor: Where to anchor the text ("center", "top_left", "top_center", "top_right",
"bottom_left", "bottom_center", "bottom_right", "center_left", "center_right")
- offset_x: Horizontal offset from the anchor point (positive = right)
- offset_y: Vertical offset from the anchor point (positive = down)
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/text_display@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
text |
str |
The text content to display. Supports parameter interpolation using {{ '{{' }} $parameters.name {{ '}}' }} syntax.. | ❌ |
text_parameters |
Dict[str, Union[bool, float, int, str]] |
Parameters to interpolate into the text.. | ✅ |
text_parameters_operations |
Dict[str, List[Union[ClassificationPropertyExtract, ConvertDictionaryToJSON, ConvertImageToBase64, ConvertImageToJPEG, DetectionsFilter, DetectionsOffset, DetectionsPropertyExtract, DetectionsRename, DetectionsSelection, DetectionsShift, DetectionsToDictionary, Divide, ExtractDetectionProperty, ExtractFrameMetadata, ExtractImageProperty, LookupTable, Multiply, NumberRound, NumericSequenceAggregate, PickDetectionsByParentClass, RandomNumber, SequenceAggregate, SequenceApply, SequenceElementsCount, SequenceLength, SequenceMap, SortDetections, StringMatches, StringSubSequence, StringToLowerCase, StringToUpperCase, TimestampToISOFormat, ToBoolean, ToNumber, ToString]]] |
Operations to apply to text parameters before interpolation.. | ❌ |
text_color |
str |
Color of the text. Supports supervision color names (WHITE, BLACK, RED, GREEN, BLUE, YELLOW, ROBOFLOW, etc.), hex format (#RRGGBB), rgb(R,G,B) format, or bgr(B,G,R) format.. | ✅ |
background_color |
str |
Background color behind the text. Supports the same color formats as text_color. Use 'transparent' for no background.. | ✅ |
background_opacity |
float |
Opacity of the background (0.0 = fully transparent, 1.0 = fully opaque).. | ✅ |
font_scale |
float |
Scale factor for the font size.. | ✅ |
font_thickness |
int |
Thickness of the text strokes.. | ✅ |
padding |
int |
Padding around the text in pixels.. | ✅ |
text_align |
str |
Horizontal alignment of the text within its bounding box.. | ✅ |
border_radius |
int |
Radius for rounded corners on the background rectangle.. | ✅ |
position_mode |
str |
Positioning mode: 'absolute' uses exact pixel coordinates, 'relative' uses anchor points with offsets.. | ✅ |
position_x |
int |
X coordinate (pixels from left edge) when using absolute positioning.. | ✅ |
position_y |
int |
Y coordinate (pixels from top edge) when using absolute positioning.. | ✅ |
anchor |
str |
Anchor point for relative positioning.. | ✅ |
offset_x |
int |
Horizontal offset from anchor point (positive = right).. | ✅ |
offset_y |
int |
Vertical offset from anchor point (positive = down).. | ✅ |
copy_image |
bool |
Whether to copy the input image before drawing (preserves original).. | ✅ |
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 Text Display in version v1.
- inputs:
Image Preprocessing,Detections Transformation,Object Detection Model,Time in Zone,Text Display,Template Matching,Image Threshold,Keypoint Detection Model,Time in Zone,OpenAI,Crop Visualization,Cosine Similarity,Florence-2 Model,Roboflow Dataset Upload,Qwen3.5-VL,Roboflow Vision Events,Polygon Zone Visualization,Qwen2.5-VL,Polygon Visualization,Absolute Static Crop,S3 Sink,QR Code Generator,SIFT Comparison,Cache Get,Stitch OCR Detections,OCR Model,Color Visualization,Gaze Detection,OpenAI-Compatible LLM,Line Counter Visualization,Image Blur,Stability AI Inpainting,Blur Visualization,SAM 3,Detection Offset,Anthropic Claude,MQTT Writer,Image Slicer,SAM 3,Detections Consensus,Ellipse Visualization,Detections Stitch,Google Gemma API,PLC ModbusTCP,Overlap Analysis,Rate Limiter,Image Stack,Delta Filter,Google Gemini,Cache Set,Keypoint Detection Model,Stitch OCR Detections,Camera Focus,CSV Formatter,Keypoint Detection Model,Perception Encoder Embedding Model,Image Convert Grayscale,Roboflow Asset Library Attributes,Seg Preview,Overlap Filter,Buffer,Multi-Label Classification Model,Icon Visualization,Triangle Visualization,VLM As Classifier,Qwen 3.5 API,Dominant Color,Instance Segmentation Model,Distance Measurement,Qwen3-VL,Background Color Visualization,Byte Tracker,Clip Comparison,Corner Visualization,Image Slicer,Single-Label Classification Model,Dynamic Crop,Stability AI Outpainting,Detection Event Log,VLM As Detector,Anthropic Claude,Clip Comparison,SORT Tracker,OpenAI,ByteTrack Tracker,Detections Combine,Camera Calibration,Trace Visualization,PTZ Tracking (ONVIF),Email Notification,Camera Focus,Background Subtraction,SAM2 Video Tracker,GLM-OCR,Qwen3.5,VLM As Detector,Llama 3.2 Vision,Property Definition,Stitch Images,Mask Visualization,Microsoft SQL Server Sink,Data Aggregator,Detections Classes Replacement,Morphological Transformation,Email Notification,VLM As Classifier,Halo Visualization,Morphological Transformation,Pixel Color Count,BoT-SORT Tracker,Model Monitoring Inference Aggregator,Pixelate Visualization,Qwen-VL,CogVLM,SAM 3,Dot Visualization,Detections Merge,Google Vision OCR,Detections List Roll-Up,PLC EthernetIP,Dimension Collapse,Mask Edge Snap,SIFT Comparison,Twilio SMS/MMS Notification,Contrast Enhancement,Per-Class Confidence Filter,Single-Label Classification Model,Dynamic Zone,Detections Filter,Byte Tracker,Roboflow Dataset Upload,Bounding Rectangle,Roboflow Custom Metadata,Environment Secrets Store,LMM For Classification,Detections Stabilizer,Object Detection Model,Path Deviation,Current Time,Perspective Correction,Keypoint Visualization,Byte Tracker,MoonshotAI Kimi,Google Gemini,Identify Changes,Depth Estimation,Object Detection Model,Slack Notification,Identify Outliers,Inner Workflow,Time in Zone,Bounding Box Visualization,Label Visualization,Size Measurement,Multi-Label Classification Model,OpenAI,SIFT,Anthropic Claude,OC-SORT Tracker,Moondream2,CLIP Embedding Model,Florence-2 Model,EasyOCR,YOLO-World Model,Segment Anything 2 Model,Twilio SMS Notification,Local File Sink,Single-Label Classification Model,Mask Area Measurement,Path Deviation,JSON Parser,OpenRouter,Instance Segmentation Model,OpenAI,MoonshotAI Kimi,Continue If,Google Gemini,Grid Visualization,Semantic Segmentation Model,Reference Path Visualization,SmolVLM2,Line Counter,Halo Visualization,First Non Empty Or Default,Webhook Sink,Instance Segmentation Model,Relative Static Crop,Expression,Multi-Label Classification Model,Llama 3.2 Vision,Barcode Detection,Velocity,Motion Detection,Model Comparison Visualization,Google Gemma,Line Counter,OPC UA Writer Sink,QR Code Detection,Circle Visualization,LMM,Event Writer,Instance Segmentation Model,Contrast Equalization,Heatmap Visualization,Image Contours,Qwen 3.6 API,Classification Label Visualization,Stability AI Image Generation,Semantic Segmentation Model,Polygon Visualization - outputs:
Morphological Transformation,Image Preprocessing,Email Notification,VLM As Classifier,Morphological Transformation,Halo Visualization,Object Detection Model,Pixel Color Count,BoT-SORT Tracker,Template Matching,Image Threshold,Text Display,Pixelate Visualization,Keypoint Detection Model,Qwen-VL,OpenAI,CogVLM,Crop Visualization,SAM 3,Dot Visualization,Google Vision OCR,Florence-2 Model,Roboflow Dataset Upload,Mask Edge Snap,Qwen3.5-VL,Roboflow Vision Events,Polygon Zone Visualization,Qwen2.5-VL,Polygon Visualization,Absolute Static Crop,Twilio SMS/MMS Notification,SIFT Comparison,Contrast Enhancement,Single-Label Classification Model,OCR Model,Byte Tracker,Color Visualization,Roboflow Dataset Upload,Gaze Detection,LMM For Classification,Detections Stabilizer,Line Counter Visualization,Image Blur,Stability AI Inpainting,Object Detection Model,Blur Visualization,SAM 3,Perspective Correction,Keypoint Visualization,Anthropic Claude,MoonshotAI Kimi,Google Gemini,Image Slicer,SAM 3,Depth Estimation,Detections Stitch,Ellipse Visualization,Google Gemma API,Object Detection Model,Time in Zone,Image Stack,Google Gemini,Bounding Box Visualization,Label Visualization,Keypoint Detection Model,Camera Focus,Keypoint Detection Model,Multi-Label Classification Model,OpenAI,SIFT,Perception Encoder Embedding Model,Anthropic Claude,Image Convert Grayscale,Moondream2,OC-SORT Tracker,CLIP Embedding Model,Florence-2 Model,Seg Preview,EasyOCR,YOLO-World Model,Buffer,Multi-Label Classification Model,Segment Anything 2 Model,Single-Label Classification Model,Triangle Visualization,Icon Visualization,Qwen 3.5 API,VLM As Classifier,OpenRouter,Dominant Color,Instance Segmentation Model,Qwen3-VL,Instance Segmentation Model,OpenAI,Background Color Visualization,MoonshotAI Kimi,Google Gemini,Clip Comparison,Semantic Segmentation Model,Corner Visualization,Image Slicer,SmolVLM2,Reference Path Visualization,Single-Label Classification Model,Halo Visualization,Dynamic Crop,Instance Segmentation Model,Stability AI Outpainting,VLM As Detector,Anthropic Claude,Relative Static Crop,Multi-Label Classification Model,Clip Comparison,SORT Tracker,OpenAI,Llama 3.2 Vision,Barcode Detection,ByteTrack Tracker,Motion Detection,Camera Calibration,Google Gemma,Model Comparison Visualization,Trace Visualization,QR Code Detection,Circle Visualization,LMM,Event Writer,Instance Segmentation Model,Contrast Equalization,Camera Focus,Heatmap Visualization,Background Subtraction,Qwen 3.6 API,SAM2 Video Tracker,GLM-OCR,Image Contours,Qwen3.5,VLM As Detector,Classification Label Visualization,Llama 3.2 Vision,Stitch Images,Mask Visualization,Stability AI Image Generation,Semantic Segmentation Model,Polygon Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Text Display in version v1 has.
Bindings
-
input
image(image): The image to display text on..text_parameters(*): Parameters to interpolate into the text..text_color(string): Color of the text. Supports supervision color names (WHITE, BLACK, RED, GREEN, BLUE, YELLOW, ROBOFLOW, etc.), hex format (#RRGGBB), rgb(R,G,B) format, or bgr(B,G,R) format..background_color(string): Background color behind the text. Supports the same color formats as text_color. Use 'transparent' for no background..background_opacity(float_zero_to_one): Opacity of the background (0.0 = fully transparent, 1.0 = fully opaque)..font_scale(float): Scale factor for the font size..font_thickness(integer): Thickness of the text strokes..padding(integer): Padding around the text in pixels..text_align(string): Horizontal alignment of the text within its bounding box..border_radius(integer): Radius for rounded corners on the background rectangle..position_mode(string): Positioning mode: 'absolute' uses exact pixel coordinates, 'relative' uses anchor points with offsets..position_x(integer): X coordinate (pixels from left edge) when using absolute positioning..position_y(integer): Y coordinate (pixels from top edge) when using absolute positioning..anchor(string): Anchor point for relative positioning..offset_x(integer): Horizontal offset from anchor point (positive = right)..offset_y(integer): Vertical offset from anchor point (positive = down)..copy_image(boolean): Whether to copy the input image before drawing (preserves original)..
-
output
image(image): Image in workflows.
Example JSON definition of step Text Display in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/text_display@v1",
"image": "$inputs.image",
"text": "Detection count: {{ '{{' }} $parameters.count {{ '}}' }}",
"text_parameters": {
"class_name": "$inputs.target_class",
"count": "$steps.model.predictions"
},
"text_parameters_operations": {
"count": [
{
"type": "SequenceLength"
}
]
},
"text_color": "WHITE",
"background_color": "BLACK",
"background_opacity": 1.0,
"font_scale": 1.0,
"font_thickness": 1,
"padding": 5,
"text_align": "left",
"border_radius": 0,
"position_mode": "absolute",
"position_x": 10,
"position_y": 10,
"anchor": "center",
"offset_x": 0,
"offset_y": 0,
"copy_image": true
}