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