Rich Label Visualization
Draw high-quality, anti-aliased text labels on an image using approved TrueType fonts.
Draw text labels on detected objects using high-quality TrueType font rendering. This block is the rich-text counterpart of the Label Visualization block: instead of OpenCV's built-in bitmap font, it renders labels with Pillow through Supervision's RichLabelAnnotator, producing anti-aliased, professional-looking text suitable for production UIs, reports and customer-facing imagery.
How This Block Works
This block takes an image and detection predictions and draws text labels on each detected object. The block:
Takes an image and predictions as input
Extracts label text for each detection based on the selected text option (class name, confidence, tracker ID, dimensions, area, time in zone, or index)
Resolves the selected
font_familyidentifier to an approved font shipped withinferenceDetermines label position based on the selected anchor point
Applies background color styling based on the selected color palette, with colors assigned by class, index, or track ID
Renders anti-aliased text labels with the selected font, size, color, padding and border radius using Supervision's
RichLabelAnnotatorReturns an annotated image with text labels overlaid on the original image
Approved Fonts
Fonts are selected with the font_family parameter. Only fonts approved and distributed with inference can be used - arbitrary font files, filesystem paths and remote font URLs are not supported. This keeps rendering deterministic and avoids parsing untrusted font files. Official Docker images and wheels ship with all approved fonts included; on bare source checkouts a missing font is fetched on first use from its pinned, checksum-verified source (disable with ALLOW_WORKFLOWS_FONTS_DOWNLOAD=False). All approved fonts are licensed under the SIL Open Font License 1.1 and ship with their license texts.
Fonts are selected by display name. 20 fonts are available:
Monospaced: Geist Mono (default, by Vercel), Anonymous Pro, Courier Prime, Fira Code, IBM Plex Mono, Inconsolata, JetBrains Mono, PT Mono, Roboto Mono, Source Code Pro, Space Mono.
Sans serif: Geist, Inter, Lato, Montserrat, Noto Sans, Nunito Sans, Open Sans, Roboto, Work Sans.
Legacy snake_case identifiers (e.g. geist_mono) are still accepted and normalized to the display name.
Noto Sans offers the broadest character coverage (Latin, Greek, Cyrillic). Characters not covered by the selected font render as the font's missing-glyph symbol (typically an empty box) - pick Noto Sans when annotating non-Latin text.
Comparison with Label Visualization
Label Visualization (
roboflow_core/label_visualization@v1) uses OpenCV's Hershey fonts - fast, but aliased and pixelated, with no font choice.Rich Label Visualization (this block) uses TrueType fonts rendered by Pillow - higher-quality anti-aliased output, selectable fonts, Unicode support and optional text wrapping (
max_line_length), at a small additional rendering cost per frame.
Common Use Cases
Customer-facing visualizations: Render detection overlays that match your product's typography (e.g. Geist Mono) for websites, dashboards and reports
High-quality reporting: Produce publication-ready annotated images with readable, anti-aliased labels
Non-Latin text: Render labels containing Greek or Cyrillic characters with Noto Sans
Type identifier
Use the following identifier in step "type" field: roboflow_core/rich_label_visualization@v1 to add the block as a 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..
✅
color_palette
str
Select a color palette for the visualised elements..
✅
palette_size
int
Specify the number of colors in the palette. This applies when using custom or Matplotlib palettes..
✅
custom_colors
List[str]
Define a list of custom colors for bounding boxes in HEX format..
✅
color_axis
str
Choose how bounding box colors are assigned. Detections with a negative class or tracker id (for example unmatched VLM labels with class_id = -1) are painted in a neutral gray..
✅
text
str
Content to display in text labels. Options: 'Class' (class name), 'Confidence' (confidence score), 'Class and Confidence' (both), 'Tracker Id' (tracking ID for tracked objects), 'Time In Zone' (time spent in zone), 'Dimensions' (center coordinates and width x height), 'Area' (bounding box area in pixels), 'Area (mask)' (mask area in pixels from Mask Area Measurement block), 'Area (converted)' (mask area in converted units from Mask Area Measurement block), or 'Index' (detection index)..
✅
text_position
str
Anchor position for placing labels relative to each detection's bounding box. Options include: CENTER (center of box), corners (TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT), edge midpoints (TOP_CENTER, CENTER_LEFT, CENTER_RIGHT, BOTTOM_CENTER), or CENTER_OF_MASS (center of mass of the object)..
✅
text_color
str
Color of the label text. Can be a color name (e.g., 'WHITE', 'BLACK') or color code in HEX format (e.g., '#FFFFFF') or RGB format (e.g., 'rgb(255, 255, 255)')..
✅
font_family
str
Font used to render label text. Pick from approved fonts shipped with inference. Arbitrary font files or URLs are not supported. Pick 'Noto Sans' for the broadest character coverage..
✅
text_size_mode
str
How label text size is chosen. 'Manual' uses Size directly. 'Automatic' picks a readable size from image resolution and treats Size as a multiplier around the 1080p baseline (14 pt)..
✅
font_size
int
Font size of the label text, in points. In Manual mode this is the rendered size. In Automatic mode this multiplies the resolution-derived baseline (14 pt at 1080p min dimension)..
✅
text_padding
int
Padding around the text in pixels. Controls the spacing between the text and the label background border..
✅
border_radius
int
Border radius of the label background in pixels. Set to 0 for square corners. Higher values create more rounded corners for a softer appearance..
✅
max_line_length
int
Maximum number of characters per line before the label text wraps. Leave empty to disable wrapping..
✅
The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds Rich Label Visualization in version v1 has.
Last updated
Was this helpful?