VLM As Detector¶
v2¶
Class: VLMAsDetectorBlockV2 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.formatters.vlm_as_detector.v2.VLMAsDetectorBlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Parse JSON strings from Visual Language Models (VLMs) and Large Language Models (LLMs) into standardized object detection prediction format by extracting bounding boxes, class names, and confidences, converting normalized coordinates to pixel coordinates, mapping class names to class IDs, and handling multiple model types and task formats to enable VLM-based object detection, LLM detection parsing, and text-to-detection conversion workflows.
How This Block Works¶
This block converts VLM/LLM text outputs containing object detection predictions into standardized object detection format compatible with workflow detection blocks. The block:
- Receives image and VLM output string containing detection results in JSON format
- Parses JSON content from VLM output:
Handles Markdown-wrapped JSON:
- Searches for JSON wrapped in Markdown code blocks (json ...)
- This format is common in LLM/VLM responses
- If multiple markdown JSON blocks are found, only the first block is parsed
- Extracts JSON content from within markdown tags
Handles raw JSON strings: - If no markdown blocks are found, attempts to parse the entire string as JSON - Supports standard JSON format strings 3. Selects appropriate parser based on model type and task type: - Uses registered parsers that handle different model outputs (google-gemini, anthropic-claude, florence-2, openai) - Supports multiple task types: object-detection, open-vocabulary-object-detection, object-detection-and-caption, phrase-grounded-object-detection, region-proposal, ocr-with-text-detection - Each model/task combination uses a specialized parser for that format 4. Parses detection data based on model type:
For OpenAI/Gemini/Claude models: - Extracts detections array from parsed JSON - Converts normalized coordinates (0-1 range) to pixel coordinates using image dimensions - Extracts class names, confidence scores, and bounding box coordinates - Maps class names to class IDs using provided classes list - Creates detection objects with bounding boxes, classes, and confidences
For Florence-2 model:
- Uses supervision's built-in LMM parser for Florence-2 format
- Handles different task types with specialized parsing (object detection, open vocabulary, region proposal, OCR, etc.)
- For region proposal tasks: assigns "roi" as class name
- For open vocabulary detection: uses provided classes list for class ID mapping
- For other tasks: uses MD5-based class ID generation or provided classes
- Sets confidence to 1.0 for Florence-2 detections (model doesn't provide confidence)
5. Converts coordinates and normalizes data:
- Converts normalized coordinates (0-1) to absolute pixel coordinates (x_min, y_min, x_max, y_max)
- Scales coordinates using image width and height
- Normalizes confidence scores to valid range [0.0, 1.0]
- Clamps confidence values outside the range
6. Creates class name to class ID mapping:
- For OpenAI/Gemini/Claude: uses provided classes list to create index mapping (class_name → class_id)
- Classes are mapped in order (first class = ID 0, second = ID 1, etc.)
- Classes not in the provided list get class_id = -1
- For Florence-2: uses different mapping strategies based on task type
7. Constructs object detection predictions:
- Creates supervision Detections objects with bounding boxes (xyxy format)
- Includes class IDs, class names, and confidence scores
- Adds metadata: detection IDs, inference IDs, image dimensions, prediction type
- Attaches parent coordinates for crop-aware detections
- Formats predictions in standard object detection format
8. Handles errors:
- Sets error_status to True if JSON parsing fails
- Sets error_status to True if detection parsing fails
- Returns None for predictions when errors occur
- Always includes inference_id for tracking
9. Returns object detection predictions:
- Outputs predictions in standard object detection format (compatible with detection blocks)
- Outputs error_status indicating parsing success/failure
- Outputs inference_id for tracking and lineage
The block enables using VLMs/LLMs for object detection by converting their text-based JSON outputs into standardized detection predictions that can be used in workflows like any other object detection model output.
Common Use Cases¶
- VLM-Based Object Detection: Use Visual Language Models for object detection by parsing VLM outputs into detection predictions (e.g., detect objects with GPT-4V, use Claude Vision for detection, parse Gemini detection outputs), enabling VLM detection workflows
- Open-Vocabulary Detection: Use VLMs for open-vocabulary object detection with custom classes (e.g., detect custom objects with VLMs, use open-vocabulary detection, detect objects not in training set), enabling open-vocabulary detection workflows
- Multi-Task Detection: Use VLMs for various detection tasks (e.g., object detection with captions, phrase-grounded detection, region proposal, OCR with detection), enabling multi-task detection workflows
- LLM Detection Parsing: Parse LLM text outputs containing detection results into standardized format (e.g., parse GPT detection outputs, convert LLM predictions to detection format, use LLMs for detection), enabling LLM detection workflows
- Text-to-Detection Conversion: Convert text-based detection outputs from models into workflow-compatible detection predictions (e.g., convert text predictions to detection format, parse text-based detections, convert model outputs to detections), enabling text-to-detection workflows
- VLM Integration: Integrate VLM outputs into detection workflows (e.g., use VLMs in detection pipelines, integrate VLM predictions with detection blocks, combine VLM and traditional detection), enabling VLM integration workflows
Connecting to Other Blocks¶
This block receives images and VLM outputs and produces object detection predictions:
- After VLM/LLM blocks to parse detection outputs into standard format (e.g., VLM output to detections, LLM output to detections, parse model outputs), enabling VLM-to-detection workflows
- Before detection-based blocks to use parsed detections (e.g., use parsed detections in workflows, provide detections to downstream blocks, use VLM detections with detection blocks), enabling detection-to-workflow workflows
- Before filtering blocks to filter VLM detections (e.g., filter by class, filter by confidence, apply filters to VLM predictions), enabling detection-to-filter workflows
- Before analytics blocks to analyze VLM detection results (e.g., analyze VLM detections, perform analytics on parsed detections, track VLM detection metrics), enabling detection analytics workflows
- Before visualization blocks to display VLM detection results (e.g., visualize VLM detections, display parsed detection predictions, show VLM detection outputs), enabling detection visualization workflows
- In workflow outputs to provide VLM detections as final output (e.g., VLM detection outputs, parsed detection results, VLM-based detection outputs), enabling detection output workflows
Version Differences¶
This version (v2) includes the following enhancements over v1:
- Improved Type System: The
inference_idoutput now usesINFERENCE_ID_KINDinstead ofSTRING_KIND, providing better type safety and semantic meaning for inference tracking identifiers in the workflow system - OpenAI Model Support: Added support for OpenAI models in addition to Google Gemini, Anthropic Claude, and Florence-2 models, expanding the range of VLM/LLM models that can be used for object detection
- Enhanced Type Safety: Improved type system ensures better integration with workflow execution engine and provides clearer semantic meaning for inference tracking
Requirements¶
This block requires an image input (for metadata and dimensions) and a VLM output string containing JSON detection data. The JSON can be raw JSON or wrapped in Markdown code blocks (json ...). The block supports four model types: "openai", "google-gemini", "anthropic-claude", and "florence-2". It supports multiple task types: "object-detection", "open-vocabulary-object-detection", "object-detection-and-caption", "phrase-grounded-object-detection", "region-proposal", and "ocr-with-text-detection". The classes parameter is required for OpenAI, Gemini, and Claude models (to map class names to IDs) but optional for Florence-2 (some tasks don't require it). Classes are mapped to IDs by index (first class = 0, second = 1, etc.). Classes not in the list get class_id = -1. The block outputs object detection predictions in standard format (compatible with detection blocks), error_status (boolean), and inference_id (INFERENCE_ID_KIND) for tracking.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/vlm_as_detector@v2to 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 class names used by the classification model, in order. Required to generate mapping between class names (from VLM output) and class IDs (for detection format). Classes are mapped to IDs by index: first class = ID 0, second = ID 1, etc. Classes from VLM output that are not in this list get class_id = -1. Required for OpenAI, Gemini, and Claude models. Optional for Florence-2 (some tasks don't require it). Should match the classes the VLM was asked to detect.. | ✅ |
model_type |
str |
Type of the VLM/LLM model that generated the prediction. Determines which parser is used to extract detection data from the JSON output. Supported models: 'openai' (GPT-4V), 'google-gemini' (Gemini Vision), 'anthropic-claude' (Claude Vision), 'florence-2' (Microsoft Florence-2). Each model type has different JSON output formats, so the correct model type must be specified for proper parsing.. | ❌ |
task_type |
str |
Task type performed by the VLM/LLM model. Determines which parser and format handler is used. Supported task types: 'object-detection' (standard object detection), 'open-vocabulary-object-detection' (detect objects with custom classes), 'object-detection-and-caption' (detection with captions), 'phrase-grounded-object-detection' (ground phrases to detections), 'region-proposal' (propose regions of interest), 'ocr-with-text-detection' (OCR with text region detection). The task type must match what the VLM/LLM was asked to perform.. | ❌ |
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 Detector in version v2.
- inputs:
Google Gemini,OpenAI,Trace Visualization,Image Preprocessing,Anthropic Claude,Image Slicer,PLC EthernetIP,Dynamic Crop,Bounding Box Visualization,Halo Visualization,Buffer,Mask Visualization,Absolute Static Crop,Pixelate Visualization,MoonshotAI Kimi,SIFT Comparison,Dot Visualization,Image Stack,Stitch Images,OpenAI,Google Gemini,Stability AI Inpainting,Keypoint Visualization,Llama 3.2 Vision,Florence-2 Model,Dimension Collapse,Dynamic Zone,Auto Rotate on Edges,Image Slicer,Circle Visualization,Model Comparison Visualization,Stability AI Outpainting,Line Counter Visualization,Camera Calibration,Contrast Enhancement,Relative Static Crop,Clip Comparison,Morphological Transformation,Halo Visualization,Clip Comparison,Cosmos 3,Polygon Visualization,Camera Focus,Corner Visualization,Ellipse Visualization,Qwen-VL,Crop Visualization,Google Gemma,Qwen 3.5 API,Morphological Transformation,Detections List Roll-Up,Anthropic Claude,Size Measurement,Roboflow Visual Search,Icon Visualization,Heatmap Visualization,Color Visualization,Motion Detection,Google Gemma API,OpenAI,Image Blur,Triangle Visualization,Background Color Visualization,Grid Visualization,Image Contours,Image Threshold,Blur Visualization,GLM-OCR,Roboflow Visual Search Classifier,QR Code Generator,Anthropic Claude,OpenAI-Compatible LLM,Florence-2 Model,Reference Path Visualization,Polygon Zone Visualization,GeoTag Detection,Classification Label Visualization,Perspective Correction,Background Subtraction,Camera Focus,Image Convert Grayscale,Label Visualization,Contrast Equalization,Polygon Visualization,SIFT,Stability AI Image Generation,Text Display,Llama 3.2 Vision,Qwen 3.6 API,MoonshotAI Kimi,OpenRouter,PLC ModbusTCP,Google Gemini,Depth Estimation - outputs:
SAM 3,Trace Visualization,Twilio SMS Notification,Single-Label Classification Model,SAM 3 Interactive,Time in Zone,Dynamic Crop,Mask Area Measurement,Detections Filter,BoT-SORT Tracker,Object Detection Model,Bounding Box Visualization,Byte Tracker,Object Detection Model,Velocity,Webhook Sink,Halo Visualization,Mask Visualization,Path Deviation,Template Matching,Twilio SMS/MMS Notification,Pixelate Visualization,SIFT Comparison,Dot Visualization,Image Stack,Multi-Label Classification Model,Stitch OCR Detections,Instance Segmentation Model,Email Notification,Stability AI Inpainting,OPC UA Writer Sink,Frame Delay,Distance Measurement,OC-SORT Tracker,Keypoint Visualization,Track Class Lock,Florence-2 Model,Gaze Detection,Roboflow Custom Metadata,Dynamic Zone,Detections Combine,Keypoint Detection Model,PTZ Tracking (ONVIF),Time in Zone,Detections Transformation,Byte Tracker,Circle Visualization,Model Comparison Visualization,Slack Notification,Detections Classes Replacement,Line Counter Visualization,Camera Calibration,Byte Tracker,SAM2 Video Tracker,Single-Label Classification Model,ByteTrack Tracker,Per-Class Confidence Filter,Email Notification,Halo Visualization,Polygon Visualization,SORT Tracker,Ellipse Visualization,Corner Visualization,PLC Writer,Camera Focus,Crop Visualization,Model Monitoring Inference Aggregator,Detections List Roll-Up,Keypoint Detection Model,Size Measurement,Icon Visualization,Heatmap Visualization,Single-Label Classification Model,Instance Segmentation Model,Color Visualization,Motion Detection,Multi-Label Classification Model,Detections Consensus,Instance Segmentation Model,Overlap Analysis,Time in Zone,Triangle Visualization,Segment Anything 2 Model,Background Color Visualization,Detection Event Log,Object Detection Model,Detections Stitch,Detections Stabilizer,SAM 3,Blur Visualization,Detections Merge,Florence-2 Model,Reference Path Visualization,Polygon Zone Visualization,Stitch OCR Detections,Roboflow Asset Library Attributes,Path Deviation,GeoTag Detection,Microsoft SQL Server Sink,Classification Label Visualization,Perspective Correction,Polygon Visualization,Label Visualization,Detection Offset,Text Display,Instance Segmentation Model,Line Counter,MQTT Writer,Roboflow Dataset Upload,Roboflow Vision Events,Keypoint Detection Model,Multi-Label Classification Model,Overlap Filter,Event Writer,Google Gemini,Line Counter,Roboflow Dataset Upload
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
VLM As Detector in version v2 has.
Bindings
-
input
image(image): Input image that was used to generate the VLM prediction. Used to extract image dimensions (width, height) for converting normalized coordinates to pixel coordinates and metadata (parent_id) for the detection predictions. The same image that was provided to the VLM/LLM block should be used here to maintain consistency..vlm_output(language_model_output): String output from a VLM or LLM block containing object detection prediction in JSON format. Can be raw JSON string or JSON wrapped in Markdown code blocks (e.g.,json {...}). Format depends on model_type and task_type - different models and tasks produce different JSON structures. If multiple markdown blocks exist, only the first is parsed..classes(list_of_values): List of all class names used by the classification model, in order. Required to generate mapping between class names (from VLM output) and class IDs (for detection format). Classes are mapped to IDs by index: first class = ID 0, second = ID 1, etc. Classes from VLM output that are not in this list get class_id = -1. Required for OpenAI, Gemini, and Claude models. Optional for Florence-2 (some tasks don't require it). Should match the classes the VLM was asked to detect..
-
output
error_status(boolean): Boolean flag.predictions(object_detection_prediction): Prediction with detected bounding boxes in form of sv.Detections(...) object.inference_id(inference_id): Inference identifier.
Example JSON definition of step VLM As Detector in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/vlm_as_detector@v2",
"image": "$inputs.image",
"vlm_output": [
"$steps.lmm.output"
],
"classes": [
"$steps.lmm.classes",
"$inputs.classes",
[
"dog",
"cat",
"bird"
],
[
"class_a",
"class_b"
]
],
"model_type": [
"openai"
],
"task_type": "<block_does_not_provide_example>"
}
v1¶
Class: VLMAsDetectorBlockV1 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.formatters.vlm_as_detector.v1.VLMAsDetectorBlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Parse JSON strings from Visual Language Models (VLMs) and Large Language Models (LLMs) into standardized object detection prediction format by extracting bounding boxes, class names, and confidences, converting normalized coordinates to pixel coordinates, mapping class names to class IDs, and handling multiple model types and task formats to enable VLM-based object detection, LLM detection parsing, and text-to-detection conversion workflows.
How This Block Works¶
This block converts VLM/LLM text outputs containing object detection predictions into standardized object detection format compatible with workflow detection blocks. The block:
- Receives image and VLM output string containing detection results in JSON format
- Parses JSON content from VLM output:
Handles Markdown-wrapped JSON:
- Searches for JSON wrapped in Markdown code blocks (json ...)
- This format is common in LLM/VLM responses
- If multiple markdown JSON blocks are found, only the first block is parsed
- Extracts JSON content from within markdown tags
Handles raw JSON strings: - If no markdown blocks are found, attempts to parse the entire string as JSON - Supports standard JSON format strings 3. Selects appropriate parser based on model type and task type: - Uses registered parsers that handle different model outputs (google-gemini, anthropic-claude, florence-2) - Supports multiple task types: object-detection, open-vocabulary-object-detection, object-detection-and-caption, phrase-grounded-object-detection, region-proposal, ocr-with-text-detection - Each model/task combination uses a specialized parser for that format 4. Parses detection data based on model type:
For Gemini/Claude models: - Extracts detections array from parsed JSON - Converts normalized coordinates (0-1 range) to pixel coordinates using image dimensions - Extracts class names, confidence scores, and bounding box coordinates - Maps class names to class IDs using provided classes list - Creates detection objects with bounding boxes, classes, and confidences
For Florence-2 model:
- Uses supervision's built-in LMM parser for Florence-2 format
- Handles different task types with specialized parsing (object detection, open vocabulary, region proposal, OCR, etc.)
- For region proposal tasks: assigns "roi" as class name
- For open vocabulary detection: uses provided classes list for class ID mapping
- For other tasks: uses MD5-based class ID generation or provided classes
- Sets confidence to 1.0 for Florence-2 detections (model doesn't provide confidence)
5. Converts coordinates and normalizes data:
- Converts normalized coordinates (0-1) to absolute pixel coordinates (x_min, y_min, x_max, y_max)
- Scales coordinates using image width and height
- Normalizes confidence scores to valid range [0.0, 1.0]
- Clamps confidence values outside the range
6. Creates class name to class ID mapping:
- For Gemini/Claude: uses provided classes list to create index mapping (class_name → class_id)
- Classes are mapped in order (first class = ID 0, second = ID 1, etc.)
- Classes not in the provided list get class_id = -1
- For Florence-2: uses different mapping strategies based on task type
7. Constructs object detection predictions:
- Creates supervision Detections objects with bounding boxes (xyxy format)
- Includes class IDs, class names, and confidence scores
- Adds metadata: detection IDs, inference IDs, image dimensions, prediction type
- Attaches parent coordinates for crop-aware detections
- Formats predictions in standard object detection format
8. Handles errors:
- Sets error_status to True if JSON parsing fails
- Sets error_status to True if detection parsing fails
- Returns None for predictions when errors occur
- Always includes inference_id for tracking
9. Returns object detection predictions:
- Outputs predictions in standard object detection format (compatible with detection blocks)
- Outputs error_status indicating parsing success/failure
- Outputs inference_id for tracking and lineage
The block enables using VLMs/LLMs for object detection by converting their text-based JSON outputs into standardized detection predictions that can be used in workflows like any other object detection model output.
Common Use Cases¶
- VLM-Based Object Detection: Use Visual Language Models for object detection by parsing VLM outputs into detection predictions (e.g., detect objects with GPT-4V, use Claude Vision for detection, parse Gemini detection outputs), enabling VLM detection workflows
- Open-Vocabulary Detection: Use VLMs for open-vocabulary object detection with custom classes (e.g., detect custom objects with VLMs, use open-vocabulary detection, detect objects not in training set), enabling open-vocabulary detection workflows
- Multi-Task Detection: Use VLMs for various detection tasks (e.g., object detection with captions, phrase-grounded detection, region proposal, OCR with detection), enabling multi-task detection workflows
- LLM Detection Parsing: Parse LLM text outputs containing detection results into standardized format (e.g., parse GPT detection outputs, convert LLM predictions to detection format, use LLMs for detection), enabling LLM detection workflows
- Text-to-Detection Conversion: Convert text-based detection outputs from models into workflow-compatible detection predictions (e.g., convert text predictions to detection format, parse text-based detections, convert model outputs to detections), enabling text-to-detection workflows
- VLM Integration: Integrate VLM outputs into detection workflows (e.g., use VLMs in detection pipelines, integrate VLM predictions with detection blocks, combine VLM and traditional detection), enabling VLM integration workflows
Connecting to Other Blocks¶
This block receives images and VLM outputs and produces object detection predictions:
- After VLM/LLM blocks to parse detection outputs into standard format (e.g., VLM output to detections, LLM output to detections, parse model outputs), enabling VLM-to-detection workflows
- Before detection-based blocks to use parsed detections (e.g., use parsed detections in workflows, provide detections to downstream blocks, use VLM detections with detection blocks), enabling detection-to-workflow workflows
- Before filtering blocks to filter VLM detections (e.g., filter by class, filter by confidence, apply filters to VLM predictions), enabling detection-to-filter workflows
- Before analytics blocks to analyze VLM detection results (e.g., analyze VLM detections, perform analytics on parsed detections, track VLM detection metrics), enabling detection analytics workflows
- Before visualization blocks to display VLM detection results (e.g., visualize VLM detections, display parsed detection predictions, show VLM detection outputs), enabling detection visualization workflows
- In workflow outputs to provide VLM detections as final output (e.g., VLM detection outputs, parsed detection results, VLM-based detection outputs), enabling detection output workflows
Requirements¶
This block requires an image input (for metadata and dimensions) and a VLM output string containing JSON detection data. The JSON can be raw JSON or wrapped in Markdown code blocks (json ...). The block supports three model types: "google-gemini", "anthropic-claude", and "florence-2". It supports multiple task types: "object-detection", "open-vocabulary-object-detection", "object-detection-and-caption", "phrase-grounded-object-detection", "region-proposal", and "ocr-with-text-detection". The classes parameter is required for Gemini and Claude models (to map class names to IDs) but optional for Florence-2 (some tasks don't require it). Classes are mapped to IDs by index (first class = 0, second = 1, etc.). Classes not in the list get class_id = -1. The block outputs object detection predictions in standard format (compatible with detection blocks), error_status (boolean), and inference_id (string) for tracking.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/vlm_as_detector@v1to 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 class names used by the detection model, in order. Required for google-gemini and anthropic-claude models to generate mapping between class names (from VLM output) and class IDs (for detection format). Optional for florence-2 model (required only for open-vocabulary-object-detection task). Classes are mapped to IDs by index: first class = ID 0, second = ID 1, etc. Classes from VLM output that are not in this list get class_id = -1. Should match the classes the VLM was asked to detect.. | ✅ |
model_type |
str |
Type of VLM/LLM model that generated the detection prediction. Determines which parser to use for parsing the JSON output. 'google-gemini': Google Gemini model outputs. 'anthropic-claude': Anthropic Claude model outputs. 'florence-2': Microsoft Florence-2 model outputs. Each model type has different JSON output formats and requires appropriate parsing.. | ❌ |
task_type |
str |
Task type that was performed by the VLM model. Determines how the JSON output is parsed and what detection format is expected. Supported tasks: 'object-detection' (unprompted detection), 'open-vocabulary-object-detection' (detection with provided classes), 'object-detection-and-caption' (detection with captions), 'phrase-grounded-object-detection' (prompted detection), 'region-proposal' (regions of interest), 'ocr-with-text-detection' (text detection with OCR). Each task type has specific output format requirements.. | ❌ |
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 Detector in version v1.
- inputs:
Google Gemini,OpenAI,Trace Visualization,Image Preprocessing,Anthropic Claude,Image Slicer,PLC EthernetIP,Dynamic Crop,Bounding Box Visualization,Halo Visualization,Buffer,Mask Visualization,Absolute Static Crop,Pixelate Visualization,MoonshotAI Kimi,SIFT Comparison,Dot Visualization,Image Stack,Stitch Images,OpenAI,Google Gemini,Stability AI Inpainting,Keypoint Visualization,Llama 3.2 Vision,Florence-2 Model,Dimension Collapse,Dynamic Zone,Auto Rotate on Edges,Image Slicer,Circle Visualization,Model Comparison Visualization,Stability AI Outpainting,Line Counter Visualization,Camera Calibration,Contrast Enhancement,Relative Static Crop,Clip Comparison,Morphological Transformation,Halo Visualization,Clip Comparison,Cosmos 3,Polygon Visualization,Camera Focus,Corner Visualization,Ellipse Visualization,Qwen-VL,Crop Visualization,Google Gemma,Qwen 3.5 API,Morphological Transformation,Detections List Roll-Up,Anthropic Claude,Size Measurement,Roboflow Visual Search,Icon Visualization,Heatmap Visualization,Color Visualization,Motion Detection,Google Gemma API,OpenAI,Image Blur,Triangle Visualization,Background Color Visualization,Grid Visualization,Image Contours,Image Threshold,Blur Visualization,GLM-OCR,Roboflow Visual Search Classifier,QR Code Generator,Anthropic Claude,OpenAI-Compatible LLM,Florence-2 Model,Reference Path Visualization,Polygon Zone Visualization,GeoTag Detection,Classification Label Visualization,Perspective Correction,Background Subtraction,Camera Focus,Image Convert Grayscale,Label Visualization,Contrast Equalization,Polygon Visualization,SIFT,Stability AI Image Generation,Text Display,Llama 3.2 Vision,Qwen 3.6 API,MoonshotAI Kimi,OpenRouter,PLC ModbusTCP,Google Gemini,Depth Estimation - outputs:
SAM 3,Image Preprocessing,Single-Label Classification Model,Time in Zone,Anthropic Claude,CLIP Embedding Model,Dynamic Crop,Mask Area Measurement,BoT-SORT Tracker,Bounding Box Visualization,Cache Get,Object Detection Model,Path Deviation,SIFT Comparison,Stitch OCR Detections,OpenAI,Instance Segmentation Model,Email Notification,Stability AI Inpainting,Frame Delay,Distance Measurement,Llama 3.2 Vision,Track Class Lock,Florence-2 Model,Gaze Detection,Roboflow Custom Metadata,Dynamic Zone,YOLO-World Model,Auto Rotate on Edges,Keypoint Detection Model,Detections Transformation,Byte Tracker,Stability AI Outpainting,Model Comparison Visualization,Slack Notification,Detections Classes Replacement,Line Counter Visualization,Camera Calibration,Byte Tracker,Single-Label Classification Model,Clip Comparison,CogVLM,SORT Tracker,Ellipse Visualization,Corner Visualization,Camera Focus,Detections List Roll-Up,Morphological Transformation,Anthropic Claude,Roboflow Visual Search,Instance Segmentation Model,Color Visualization,OpenAI,Time in Zone,Triangle Visualization,Detection Event Log,Detections Stabilizer,Object Detection Model,SAM 3,Image Threshold,SAM 3,Detections Merge,Current Time,Roboflow Visual Search Classifier,QR Code Generator,OpenAI-Compatible LLM,Florence-2 Model,Semantic Segmentation Model,Polygon Zone Visualization,Stitch OCR Detections,Roboflow Asset Library Attributes,Path Deviation,GeoTag Detection,Microsoft SQL Server Sink,Moondream2,Label Visualization,Detection Offset,Llama 3.2 Vision,Stability AI Image Generation,Instance Segmentation Model,Perception Encoder Embedding Model,Line Counter,MQTT Writer,Roboflow Dataset Upload,Local File Sink,Cache Set,Event Writer,Google Gemini,Depth Estimation,Seg Preview,Byte Tracker,Google Gemini,OpenAI,Trace Visualization,Twilio SMS Notification,Pixel Color Count,SAM 3 Interactive,Detections Filter,LMM For Classification,Object Detection Model,Velocity,Webhook Sink,Halo Visualization,Mask Visualization,Template Matching,Twilio SMS/MMS Notification,Pixelate Visualization,MoonshotAI Kimi,Dot Visualization,Image Stack,Multi-Label Classification Model,OPC UA Writer Sink,Google Gemini,OC-SORT Tracker,Keypoint Visualization,LMM,Detections Combine,PTZ Tracking (ONVIF),Time in Zone,Circle Visualization,SAM2 Video Tracker,ByteTrack Tracker,Morphological Transformation,Per-Class Confidence Filter,Email Notification,Halo Visualization,Cosmos 3,Polygon Visualization,Qwen-VL,PLC Writer,Google Gemma,Crop Visualization,Qwen 3.5 API,Model Monitoring Inference Aggregator,Keypoint Detection Model,Size Measurement,Icon Visualization,Heatmap Visualization,Single-Label Classification Model,Motion Detection,Multi-Label Classification Model,Google Gemma API,Detections Consensus,Instance Segmentation Model,Overlap Analysis,Segment Anything 2 Model,Image Blur,Background Color Visualization,Detections Stitch,SAM3 Video Tracker,Blur Visualization,GLM-OCR,Anthropic Claude,Reference Path Visualization,Classification Label Visualization,Google Vision OCR,Perspective Correction,Polygon Visualization,Contrast Equalization,Qwen 3.6 API,Text Display,MoonshotAI Kimi,OpenRouter,Qwen3.5-VL,Roboflow Vision Events,Keypoint Detection Model,OpenAI,Multi-Label Classification Model,Overlap Filter,S3 Sink,Line Counter,Roboflow Dataset Upload
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
VLM As Detector in version v1 has.
Bindings
-
input
image(image): Input image that was used to generate the VLM prediction. Used to extract image dimensions (width, height) for converting normalized coordinates to pixel coordinates and metadata (parent_id) for the detection predictions. The same image that was provided to the VLM/LLM block should be used here to maintain consistency..vlm_output(language_model_output): String output from a VLM or LLM block containing object detection prediction in JSON format. Can be raw JSON string or JSON wrapped in Markdown code blocks (e.g.,json {...}). Format depends on model_type and task_type - different models and tasks produce different JSON structures. If multiple markdown blocks exist, only the first is parsed..classes(list_of_values): List of all class names used by the detection model, in order. Required for google-gemini and anthropic-claude models to generate mapping between class names (from VLM output) and class IDs (for detection format). Optional for florence-2 model (required only for open-vocabulary-object-detection task). Classes are mapped to IDs by index: first class = ID 0, second = ID 1, etc. Classes from VLM output that are not in this list get class_id = -1. Should match the classes the VLM was asked to detect..
-
output
error_status(boolean): Boolean flag.predictions(object_detection_prediction): Prediction with detected bounding boxes in form of sv.Detections(...) object.inference_id(string): String value.
Example JSON definition of step VLM As Detector in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/vlm_as_detector@v1",
"image": "$inputs.image",
"vlm_output": [
"$steps.lmm.output"
],
"classes": [
"$steps.lmm.classes",
"$inputs.classes",
[
"dog",
"cat",
"bird"
],
[
"class_a",
"class_b"
]
],
"model_type": "google-gemini",
"task_type": "<block_does_not_provide_example>"
}