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