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