Classification Label Visualization¶
Class: ClassificationLabelVisualizationBlockV1
Visualize classification predictions as text labels positioned on images, automatically handling both single-label and multi-label classification formats with customizable styling and positioning.
How This Block Works¶
This block takes an image and classification predictions (for entire image classification, not object detection) and displays text labels showing the predicted class names and confidence scores. The block:
- Takes an image and classification predictions as input
- Automatically detects whether predictions are single-label (one class per image) or multi-label (multiple classes per image)
- For single-label predictions: selects the highest confidence prediction to display
- For multi-label predictions: formats and sorts all predicted classes by confidence score (highest first)
- Extracts label text based on the selected text option (class name, confidence score, or both)
- Positions labels on the image at the specified location (top, center, or bottom edges, with left/center/right alignment)
- Applies background color styling based on the selected color palette, with colors assigned by class
- Renders text labels with customizable text color, scale, thickness, padding, and border radius
- Returns an annotated image with classification labels overlaid on the original image
Unlike the regular Label Visualization block (which labels detected objects with bounding boxes), this block is designed for image-level classification where the entire image is classified into one or more categories. Labels are positioned at the edges or center of the image itself, not relative to object locations. For multi-label predictions, multiple labels are stacked vertically at the chosen position, making it easy to see all predicted classes and their confidence scores.
Common Use Cases¶
- Image Classification Results Display: Visualize the predicted class and confidence score for classified images in applications like content moderation, product categorization, or medical image analysis
- Multi-Class Probability Visualization: Display multiple predicted classes with their confidence scores for multi-label classification tasks, such as tagging images with multiple attributes, detecting multiple defects, or identifying multiple objects in scene classification
- Model Performance Validation: Show classification predictions directly on images to validate model performance, verify correct classifications, and identify misclassifications during model development or testing
- User Interface Integration: Create clean, professional displays of classification results for applications, dashboards, or mobile apps where users need to see what an image was classified as
- Documentation and Reporting: Generate annotated images showing classification results for reports, documentation, or training data review to demonstrate model predictions
- Quality Control Workflows: Display classification results on production images for quality control, content filtering, or automated categorization workflows where visual confirmation of predictions is needed
Connecting to Other Blocks¶
The annotated image from this block can be connected to:
- Data storage blocks (e.g., Local File Sink, CSV Formatter, Roboflow Dataset Upload) to save annotated images with classification labels for documentation, reporting, or analysis
- Webhook blocks to send visualized results with classification labels to external systems, APIs, or web applications for display in dashboards or classification monitoring tools
- Notification blocks (e.g., Email Notification, Slack Notification) to send annotated images with classification labels as visual evidence in alerts or reports when specific classes are detected
- Video output blocks to create annotated video streams or recordings with classification labels for live monitoring, real-time classification display, or post-processing analysis
- Conditional logic blocks (e.g., Continue If) to route workflow execution based on classification results or confidence scores displayed in the labels
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/classification_label_visualization@v1to add the block as
as 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.. | ✅ |
text |
str |
Content to display in text labels. Options: 'Class' (class name only), 'Confidence' (confidence score only, formatted as decimal), or 'Class and Confidence' (both class name and confidence score).. | ✅ |
text_position |
str |
Position for placing labels on the image. Options include: TOP (TOP_LEFT, TOP_CENTER, TOP_RIGHT), CENTER (CENTER_LEFT, CENTER, CENTER_RIGHT), or BOTTOM (BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT). For multi-label predictions, labels are stacked vertically at the chosen position.. | ✅ |
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)').. | ✅ |
text_scale |
float |
Scale factor for text size. Higher values create larger text. Default is 1.0.. | ✅ |
text_thickness |
int |
Thickness of text characters in pixels. Higher values create bolder, thicker text for better visibility.. | ✅ |
text_padding |
int |
Padding around the text in pixels. Controls the spacing between the text and the label background border, and the spacing between multiple labels in multi-label predictions.. | ✅ |
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.. | ✅ |
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 Classification Label Visualization in version v1.
- inputs:
Template Matching,Morphological Transformation,Classification Label Visualization,Crop Visualization,Stability AI Outpainting,Blur Visualization,Reference Path Visualization,OpenAI,Anthropic Claude,Camera Focus,Size Measurement,Model Comparison Visualization,Florence-2 Model,Trace Visualization,JSON Parser,Label Visualization,Image Convert Grayscale,Florence-2 Model,Text Display,Qwen-VL,Llama 3.2 Vision,Image Blur,Keypoint Detection Model,Absolute Static Crop,CSV Formatter,LMM,Qwen 3.5 API,Qwen 3.6 API,Camera Focus,Line Counter,VLM As Detector,Multi-Label Classification Model,Clip Comparison,Google Gemma API,Contrast Enhancement,Halo Visualization,Color Visualization,Morphological Transformation,MoonshotAI Kimi,Stitch OCR Detections,Event Writer,Buffer,Stability AI Inpainting,Roboflow Asset Library Attributes,Microsoft SQL Server Sink,OpenAI,Roboflow Vision Events,Identify Outliers,CogVLM,Detections Consensus,Object Detection Model,OPC UA Writer Sink,Dynamic Crop,Bounding Box Visualization,Qwen3.5-VL,Clip Comparison,OpenAI,SIFT Comparison,Single-Label Classification Model,OCR Model,Slack Notification,OpenRouter,Detection Event Log,SIFT Comparison,Pixelate Visualization,Google Vision OCR,Dynamic Zone,Google Gemma,Halo Visualization,Stitch OCR Detections,GLM-OCR,Image Threshold,Stitch Images,Twilio SMS/MMS Notification,Icon Visualization,VLM As Classifier,MoonshotAI Kimi,Single-Label Classification Model,Google Gemini,Single-Label Classification Model,Webhook Sink,QR Code Generator,MQTT Writer,Ellipse Visualization,Anthropic Claude,Dot Visualization,Perspective Correction,Roboflow Dataset Upload,PLC ModbusTCP,SIFT,Google Gemini,EasyOCR,Dimension Collapse,Local File Sink,Triangle Visualization,Contrast Equalization,Polygon Visualization,OpenAI,Heatmap Visualization,Detections List Roll-Up,Google Gemini,PLC EthernetIP,LMM For Classification,VLM As Detector,Identify Changes,Multi-Label Classification Model,Polygon Visualization,Email Notification,Llama 3.2 Vision,Mask Visualization,Anthropic Claude,Image Stack,Distance Measurement,PTZ Tracking (ONVIF),Keypoint Visualization,Background Subtraction,Multi-Label Classification Model,Twilio SMS Notification,Email Notification,Image Slicer,Image Contours,Line Counter Visualization,Image Preprocessing,VLM As Classifier,Depth Estimation,Pixel Color Count,Motion Detection,Current Time,Corner Visualization,Polygon Zone Visualization,Camera Calibration,Roboflow Dataset Upload,Grid Visualization,Stability AI Image Generation,S3 Sink,Circle Visualization,Image Slicer,Roboflow Custom Metadata,Relative Static Crop,Instance Segmentation Model,Model Monitoring Inference Aggregator,OpenAI-Compatible LLM,Background Color Visualization,Line Counter - outputs:
Template Matching,Morphological Transformation,Classification Label Visualization,Crop Visualization,Stability AI Outpainting,Blur Visualization,Reference Path Visualization,OpenAI,YOLO-World Model,Anthropic Claude,Camera Focus,Track Class Lock,Instance Segmentation Model,Mask Edge Snap,Model Comparison Visualization,Florence-2 Model,Trace Visualization,SmolVLM2,Label Visualization,Image Convert Grayscale,Florence-2 Model,Text Display,Llama 3.2 Vision,Qwen-VL,Image Blur,Keypoint Detection Model,Absolute Static Crop,Gaze Detection,Keypoint Detection Model,LMM,OC-SORT Tracker,QR Code Detection,Qwen 3.5 API,Qwen 3.6 API,Qwen2.5-VL,Camera Focus,SORT Tracker,VLM As Detector,Qwen3-VL,Multi-Label Classification Model,Detections Stitch,Clip Comparison,Google Gemma API,Contrast Enhancement,Halo Visualization,MoonshotAI Kimi,Color Visualization,Morphological Transformation,Event Writer,Buffer,Stability AI Inpainting,Time in Zone,OpenAI,Roboflow Vision Events,Dominant Color,CogVLM,Object Detection Model,Semantic Segmentation Model,Dynamic Crop,Byte Tracker,Bounding Box Visualization,Qwen3.5-VL,Clip Comparison,SAM 3,OpenAI,Single-Label Classification Model,OCR Model,OpenRouter,SIFT Comparison,Pixelate Visualization,Google Vision OCR,SAM3 Video Tracker,Google Gemma,CLIP Embedding Model,Halo Visualization,GLM-OCR,Image Threshold,SAM 3 Interactive,Stitch Images,Twilio SMS/MMS Notification,VLM As Classifier,Icon Visualization,MoonshotAI Kimi,ByteTrack Tracker,Google Gemini,Single-Label Classification Model,Single-Label Classification Model,Instance Segmentation Model,Ellipse Visualization,Anthropic Claude,Object Detection Model,Keypoint Detection Model,BoT-SORT Tracker,Dot Visualization,Perspective Correction,Instance Segmentation Model,Seg Preview,Roboflow Dataset Upload,Detections Stabilizer,SIFT,Google Gemini,EasyOCR,SAM 3,Triangle Visualization,Contrast Equalization,Polygon Visualization,OpenAI,SAM2 Video Tracker,Heatmap Visualization,Perception Encoder Embedding Model,Google Gemini,LMM For Classification,VLM As Detector,Llama 3.2 Vision,Multi-Label Classification Model,Image Stack,Polygon Visualization,Mask Visualization,Anthropic Claude,Barcode Detection,Keypoint Visualization,Background Subtraction,Multi-Label Classification Model,Email Notification,Semantic Segmentation Model,Image Slicer,Image Contours,Line Counter Visualization,Image Preprocessing,SAM 3,VLM As Classifier,Depth Estimation,Pixel Color Count,Motion Detection,Qwen3.5,Roboflow Dataset Upload,Corner Visualization,Camera Calibration,Segment Anything 2 Model,Polygon Zone Visualization,Stability AI Image Generation,Moondream2,Circle Visualization,Image Slicer,Relative Static Crop,Instance Segmentation Model,Object Detection Model,Background Color Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Classification Label Visualization in version v1 has.
Bindings
-
input
image(image): The image to visualize on..copy_image(boolean): Enable this option to create a copy of the input image for visualization, preserving the original. Use this when stacking multiple visualizations..predictions(classification_prediction): Classification predictions from a single-label or multi-label classification model. The block automatically detects the prediction format and handles both types accordingly..color_palette(string): Select a color palette for the visualised elements..palette_size(integer): Specify the number of colors in the palette. This applies when using custom or Matplotlib palettes..custom_colors(list_of_values): Define a list of custom colors for bounding boxes in HEX format..color_axis(string): Choose how bounding box colors are assigned..text(string): Content to display in text labels. Options: 'Class' (class name only), 'Confidence' (confidence score only, formatted as decimal), or 'Class and Confidence' (both class name and confidence score)..text_position(string): Position for placing labels on the image. Options include: TOP (TOP_LEFT, TOP_CENTER, TOP_RIGHT), CENTER (CENTER_LEFT, CENTER, CENTER_RIGHT), or BOTTOM (BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT). For multi-label predictions, labels are stacked vertically at the chosen position..text_color(string): 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)')..text_scale(float): Scale factor for text size. Higher values create larger text. Default is 1.0..text_thickness(integer): Thickness of text characters in pixels. Higher values create bolder, thicker text for better visibility..text_padding(integer): Padding around the text in pixels. Controls the spacing between the text and the label background border, and the spacing between multiple labels in multi-label predictions..border_radius(integer): Border radius of the label background in pixels. Set to 0 for square corners. Higher values create more rounded corners for a softer appearance..
-
output
image(image): Image in workflows.
Example JSON definition of step Classification Label Visualization in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/classification_label_visualization@v1",
"image": "$inputs.image",
"copy_image": true,
"predictions": "$steps.classification_model.predictions",
"color_palette": "DEFAULT",
"palette_size": 10,
"custom_colors": [
"#FF0000",
"#00FF00",
"#0000FF"
],
"color_axis": "CLASS",
"text": "LABEL",
"text_position": "CENTER",
"text_color": "WHITE",
"text_scale": 1.0,
"text_thickness": 1,
"text_padding": 10,
"border_radius": 0
}