VLM as Classifier¶
v2¶
Class: VLMAsClassifierBlockV2
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.formatters.vlm_as_classifier.v2.VLMAsClassifierBlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
The block expects string input that would be produced by blocks exposing Large Language Models (LLMs) and Visual Language Models (VLMs). Input is parsed to classification prediction and returned as block output.
Accepted formats:
-
valid JSON strings
-
JSON documents wrapped with Markdown tags (very common for GPT responses)
Example:
{"my": "json"}
Details regarding block behavior:
-
error_status
is setTrue
whenever parsing cannot be completed -
in case of multiple markdown blocks with raw JSON content - only first will be parsed
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/vlm_as_classifier@v2
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
classes |
List[str] |
List of all classes used by the model, required to generate mapping between class name and class id.. | ✅ |
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 VLM as Classifier
in version v2
.
- inputs:
Florence-2 Model
,Stitch Images
,Pixelate Visualization
,SIFT Comparison
,Corner Visualization
,Blur Visualization
,Mask Visualization
,Perspective Correction
,SIFT
,Polygon Zone Visualization
,Polygon Visualization
,Halo Visualization
,Grid Visualization
,Dimension Collapse
,Image Slicer
,Model Comparison Visualization
,Trace Visualization
,Camera Focus
,OpenAI
,Image Threshold
,Size Measurement
,Keypoint Visualization
,Crop Visualization
,Image Preprocessing
,Buffer
,Clip Comparison
,Anthropic Claude
,Dynamic Zone
,Image Blur
,Relative Static Crop
,Circle Visualization
,Image Convert Grayscale
,Dot Visualization
,Google Gemini
,Background Color Visualization
,Clip Comparison
,Bounding Box Visualization
,Ellipse Visualization
,Image Contours
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,Florence-2 Model
,Stability AI Inpainting
,Reference Path Visualization
,Dynamic Crop
,Color Visualization
,Triangle Visualization
,Llama 3.2 Vision
,Absolute Static Crop
- outputs:
Time in Zone
,Multi-Label Classification Model
,Pixelate Visualization
,Keypoint Detection Model
,SIFT Comparison
,Gaze Detection
,Instance Segmentation Model
,Keypoint Detection Model
,Corner Visualization
,Single-Label Classification Model
,Blur Visualization
,Mask Visualization
,Object Detection Model
,Perspective Correction
,Model Monitoring Inference Aggregator
,Polygon Zone Visualization
,Polygon Visualization
,Halo Visualization
,Twilio SMS Notification
,Email Notification
,Webhook Sink
,Detections Consensus
,Model Comparison Visualization
,Roboflow Custom Metadata
,Trace Visualization
,Keypoint Visualization
,Detections Classes Replacement
,Instance Segmentation Model
,Template Matching
,Crop Visualization
,Slack Notification
,Roboflow Dataset Upload
,Roboflow Dataset Upload
,Dot Visualization
,Circle Visualization
,Background Color Visualization
,Segment Anything 2 Model
,Bounding Box Visualization
,Label Visualization
,Classification Label Visualization
,Single-Label Classification Model
,Ellipse Visualization
,Line Counter Visualization
,Time in Zone
,Reference Path Visualization
,Triangle Visualization
,Color Visualization
,Multi-Label Classification Model
,Object Detection Model
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
VLM as Classifier
in version v2
has.
Bindings
-
input
image
(image
): The image which was the base to generate VLM prediction.vlm_output
(language_model_output
): The string with raw classification prediction to parse..classes
(list_of_values
): List of all classes used by the model, required to generate mapping between class name and class id..
-
output
error_status
(boolean
): Boolean flag.predictions
(classification_prediction
): Predictions from classifier.inference_id
(inference_id
): Inference identifier.
Example JSON definition of step VLM as Classifier
in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/vlm_as_classifier@v2",
"image": "$inputs.image",
"vlm_output": [
"$steps.lmm.output"
],
"classes": [
"$steps.lmm.classes",
"$inputs.classes",
[
"class_a",
"class_b"
]
]
}
v1¶
Class: VLMAsClassifierBlockV1
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.formatters.vlm_as_classifier.v1.VLMAsClassifierBlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
The block expects string input that would be produced by blocks exposing Large Language Models (LLMs) and Visual Language Models (VLMs). Input is parsed to classification prediction and returned as block output.
Accepted formats:
-
valid JSON strings
-
JSON documents wrapped with Markdown tags (very common for GPT responses)
Example:
{"my": "json"}
Details regarding block behavior:
-
error_status
is setTrue
whenever parsing cannot be completed -
in case of multiple markdown blocks with raw JSON content - only first will be parsed
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/vlm_as_classifier@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
classes |
List[str] |
List of all classes used by the model, required to generate mapping between class name and class id.. | ✅ |
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 VLM as Classifier
in version v1
.
- inputs:
Florence-2 Model
,Stitch Images
,Pixelate Visualization
,SIFT Comparison
,Corner Visualization
,Blur Visualization
,Mask Visualization
,Perspective Correction
,SIFT
,Polygon Zone Visualization
,Polygon Visualization
,Halo Visualization
,Grid Visualization
,Dimension Collapse
,Image Slicer
,Model Comparison Visualization
,Trace Visualization
,Camera Focus
,OpenAI
,Image Threshold
,Size Measurement
,Keypoint Visualization
,Crop Visualization
,Image Preprocessing
,Buffer
,Clip Comparison
,Anthropic Claude
,Dynamic Zone
,Image Blur
,Relative Static Crop
,Circle Visualization
,Image Convert Grayscale
,Dot Visualization
,Google Gemini
,Background Color Visualization
,Clip Comparison
,Bounding Box Visualization
,Ellipse Visualization
,Image Contours
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,Florence-2 Model
,Stability AI Inpainting
,Reference Path Visualization
,Dynamic Crop
,Color Visualization
,Triangle Visualization
,Llama 3.2 Vision
,Absolute Static Crop
- outputs:
Multi-Label Classification Model
,Pixelate Visualization
,Path Deviation
,LMM For Classification
,Keypoint Detection Model
,Gaze Detection
,Line Counter
,Instance Segmentation Model
,CLIP Embedding Model
,Single-Label Classification Model
,Blur Visualization
,Mask Visualization
,Object Detection Model
,Line Counter
,YOLO-World Model
,Model Monitoring Inference Aggregator
,Cache Get
,Polygon Visualization
,Halo Visualization
,Google Vision OCR
,Email Notification
,Model Comparison Visualization
,CogVLM
,Image Threshold
,Keypoint Visualization
,Detections Classes Replacement
,Template Matching
,Image Preprocessing
,Slack Notification
,Roboflow Dataset Upload
,Background Color Visualization
,Bounding Box Visualization
,Label Visualization
,Classification Label Visualization
,Ellipse Visualization
,Line Counter Visualization
,LMM
,Reference Path Visualization
,Stability AI Inpainting
,Dynamic Crop
,Triangle Visualization
,Object Detection Model
,Distance Measurement
,Time in Zone
,Detections Stitch
,Florence-2 Model
,SIFT Comparison
,Keypoint Detection Model
,Corner Visualization
,Perspective Correction
,Local File Sink
,Polygon Zone Visualization
,Twilio SMS Notification
,Trace Visualization
,Webhook Sink
,Detections Consensus
,Size Measurement
,Roboflow Custom Metadata
,OpenAI
,Cache Set
,Instance Segmentation Model
,Crop Visualization
,Roboflow Dataset Upload
,Clip Comparison
,Anthropic Claude
,Image Blur
,Dot Visualization
,Circle Visualization
,Google Gemini
,Segment Anything 2 Model
,Single-Label Classification Model
,Time in Zone
,Florence-2 Model
,Path Deviation
,OpenAI
,Color Visualization
,Multi-Label Classification Model
,Pixel Color Count
,Llama 3.2 Vision
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
VLM as Classifier
in version v1
has.
Bindings
-
input
image
(image
): The image which was the base to generate VLM prediction.vlm_output
(language_model_output
): The string with raw classification prediction to parse..classes
(list_of_values
): List of all classes used by the model, required to generate mapping between class name and class id..
-
output
error_status
(boolean
): Boolean flag.predictions
(classification_prediction
): Predictions from classifier.inference_id
(string
): String value.
Example JSON definition of step VLM as Classifier
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/vlm_as_classifier@v1",
"image": "$inputs.image",
"vlm_output": [
"$steps.lmm.output"
],
"classes": [
"$steps.lmm.classes",
"$inputs.classes",
[
"class_a",
"class_b"
]
]
}