Florence-2 Model¶
v2¶
Class: Florence2BlockV2 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.florence2.v2.Florence2BlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Dedicated inference server required (GPU recommended) - you may want to use dedicated deployment
This Workflow block introduces Florence 2, a Visual Language Model (VLM) capable of performing a wide range of tasks, including:
-
Object Detection
-
Instance Segmentation
-
Image Captioning
-
Optical Character Recognition (OCR)
-
and more...
Below is a comprehensive list of tasks supported by the model, along with descriptions on how to utilize their outputs within the Workflows ecosystem:
Task Descriptions:
-
Custom Prompt (
custom) - Use free-form prompt to generate a response. Useful with finetuned models. -
Text Recognition (OCR) (
ocr) - Model recognizes text in the image -
Text Detection & Recognition (OCR) (
ocr-with-text-detection) - Model detects text regions in the image, and then performs OCR on each detected region -
Captioning (short) (
caption) - Model provides a short description of the image -
Captioning (
detailed-caption) - Model provides a long description of the image -
Captioning (long) (
more-detailed-caption) - Model provides a very long description of the image -
Unprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the image -
Object Detection (
open-vocabulary-object-detection) - Model detects and returns the bounding boxes for the provided classes -
Detection & Captioning (
object-detection-and-caption) - Model detects prominent objects and captions them -
Prompted Object Detection (
phrase-grounded-object-detection) - Based on the textual prompt, model detects objects matching the descriptions -
Prompted Instance Segmentation (
phrase-grounded-instance-segmentation) - Based on the textual prompt, model segments objects matching the descriptions -
Segment Bounding Box (
detection-grounded-instance-segmentation) - Model segments the object in the provided bounding box into a polygon -
Classification of Bounding Box (
detection-grounded-classification) - Model classifies the object inside the provided bounding box -
Captioning of Bounding Box (
detection-grounded-caption) - Model captions the object in the provided bounding box -
Text Recognition (OCR) for Bounding Box (
detection-grounded-ocr) - Model performs OCR on the text inside the provided bounding box -
Regions of Interest proposal (
region-proposal) - Model proposes Regions of Interest (Bounding Boxes) in the image
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/florence_2@v2to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
task_type |
str |
Task type to be performed by model. Value determines required parameters and output response.. | ❌ |
prompt |
str |
Text prompt to the Florence-2 model. | ✅ |
classes |
List[str] |
List of classes to be used. | ✅ |
grounding_detection |
Optional[List[float], List[int]] |
Detection to ground Florence-2 model. May be statically provided bounding box [left_top_x, left_top_y, right_bottom_x, right_bottom_y] or result of object-detection model. If the latter is true, one box will be selected based on grounding_selection_mode.. |
✅ |
grounding_selection_mode |
str |
. | ❌ |
model_id |
str |
Model to be used. | ✅ |
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 Florence-2 Model in version v2.
- inputs:
Stability AI Outpainting,SAM 3,Motion Detection,Contrast Enhancement,Camera Focus,Image Preprocessing,Corner Visualization,Ellipse Visualization,Object Detection Model,Roboflow Vision Events,Seg Preview,Heatmap Visualization,Trace Visualization,OC-SORT Tracker,Time in Zone,OpenAI,Email Notification,Byte Tracker,Keypoint Visualization,Detections Consensus,Model Comparison Visualization,YOLO-World Model,Polygon Zone Visualization,Byte Tracker,Dynamic Crop,Polygon Visualization,QR Code Generator,GLM-OCR,Stitch Images,OpenRouter,Image Blur,Model Monitoring Inference Aggregator,Clip Comparison,Dynamic Zone,Detections Stitch,Time in Zone,Detections List Roll-Up,Segment Anything 2 Model,Buffer,Google Gemini,Instance Segmentation Model,Pixelate Visualization,EasyOCR,SIFT,Contrast Equalization,Image Threshold,Instance Segmentation Model,Polygon Visualization,Anthropic Claude,Halo Visualization,Roboflow Custom Metadata,Keypoint Detection Model,Florence-2 Model,Local File Sink,Icon Visualization,Single-Label Classification Model,Image Contours,OpenAI,Detection Offset,SAM2 Video Tracker,Detections Filter,SAM 3,Grid Visualization,ByteTrack Tracker,VLM As Detector,Size Measurement,Object Detection Model,LMM,Detections Transformation,Image Convert Grayscale,Reference Path Visualization,Stitch OCR Detections,Keypoint Detection Model,SIFT Comparison,Roboflow Dataset Upload,CSV Formatter,S3 Sink,BoT-SORT Tracker,OpenAI-Compatible LLM,Morphological Transformation,Object Detection Model,Crop Visualization,Blur Visualization,Mask Visualization,Stability AI Image Generation,Qwen-VL,Stitch OCR Detections,Google Gemma API,Velocity,Image Slicer,Qwen 3.5 API,Path Deviation,Background Color Visualization,Slack Notification,Anthropic Claude,Dimension Collapse,Qwen 3.6 API,Webhook Sink,Color Visualization,Bounding Box Visualization,Google Gemma,Relative Static Crop,Bounding Rectangle,CogVLM,Llama 3.2 Vision,Detection Event Log,Path Deviation,Instance Segmentation Model,Qwen3.5-VL,Camera Focus,Google Vision OCR,Instance Segmentation Model,Google Gemini,Llama 3.2 Vision,SAM 3,SORT Tracker,Twilio SMS Notification,Detections Stabilizer,Moondream2,Anthropic Claude,Image Slicer,Depth Estimation,OpenAI,Multi-Label Classification Model,Gaze Detection,Template Matching,Classification Label Visualization,PTZ Tracking (ONVIF),Florence-2 Model,MoonshotAI Kimi,Time in Zone,MoonshotAI Kimi,Line Counter,Dot Visualization,Background Subtraction,Keypoint Detection Model,Roboflow Dataset Upload,Stability AI Inpainting,Per-Class Confidence Filter,Detections Classes Replacement,Label Visualization,Overlap Filter,Detections Merge,Absolute Static Crop,Google Gemini,VLM As Classifier,Camera Calibration,Halo Visualization,Email Notification,OpenAI,Clip Comparison,LMM For Classification,Text Display,Mask Area Measurement,Circle Visualization,Line Counter Visualization,Byte Tracker,OCR Model,Detections Combine,VLM As Detector,Image Stack,Morphological Transformation,Twilio SMS/MMS Notification,Mask Edge Snap,Triangle Visualization,Perspective Correction - outputs:
Stability AI Outpainting,CLIP Embedding Model,SAM 3,Motion Detection,Seg Preview,Corner Visualization,Ellipse Visualization,Image Preprocessing,Roboflow Vision Events,Object Detection Model,Heatmap Visualization,Trace Visualization,VLM As Classifier,Time in Zone,OpenAI,Email Notification,Keypoint Visualization,Detections Consensus,Model Comparison Visualization,YOLO-World Model,JSON Parser,Polygon Zone Visualization,Dynamic Crop,Polygon Visualization,QR Code Generator,GLM-OCR,OpenRouter,Model Monitoring Inference Aggregator,Clip Comparison,Image Blur,Cache Get,Detections Stitch,Time in Zone,Detections List Roll-Up,Segment Anything 2 Model,Instance Segmentation Model,Google Gemini,Buffer,Contrast Equalization,Image Threshold,Instance Segmentation Model,Polygon Visualization,Anthropic Claude,Halo Visualization,Roboflow Custom Metadata,Keypoint Detection Model,Florence-2 Model,Local File Sink,Icon Visualization,OpenAI,SAM 3,Grid Visualization,VLM As Detector,Size Measurement,Multi-Label Classification Model,Object Detection Model,LMM,Reference Path Visualization,Stitch OCR Detections,Keypoint Detection Model,SIFT Comparison,Roboflow Dataset Upload,S3 Sink,Cache Set,OpenAI-Compatible LLM,Morphological Transformation,Object Detection Model,Mask Visualization,Stability AI Image Generation,Qwen-VL,Crop Visualization,Stitch OCR Detections,Google Gemma API,Qwen 3.5 API,Path Deviation,Perception Encoder Embedding Model,Background Color Visualization,Slack Notification,Anthropic Claude,Qwen 3.6 API,Webhook Sink,Color Visualization,Bounding Box Visualization,Google Gemma,CogVLM,Path Deviation,Llama 3.2 Vision,Instance Segmentation Model,Instance Segmentation Model,Google Vision OCR,Google Gemini,SAM 3,Distance Measurement,Single-Label Classification Model,Llama 3.2 Vision,Twilio SMS Notification,Moondream2,Anthropic Claude,OpenAI,Depth Estimation,Classification Label Visualization,PTZ Tracking (ONVIF),MoonshotAI Kimi,Florence-2 Model,Time in Zone,MoonshotAI Kimi,Line Counter,Dot Visualization,Keypoint Detection Model,Roboflow Dataset Upload,Stability AI Inpainting,Per-Class Confidence Filter,Semantic Segmentation Model,Line Counter,Detections Classes Replacement,Label Visualization,Google Gemini,VLM As Classifier,Email Notification,Halo Visualization,OpenAI,Pixel Color Count,Clip Comparison,LMM For Classification,Text Display,Circle Visualization,Line Counter Visualization,VLM As Detector,Twilio SMS/MMS Notification,Morphological Transformation,Triangle Visualization,Perspective Correction
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Florence-2 Model in version v2 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Text prompt to the Florence-2 model.classes(list_of_values): List of classes to be used.grounding_detection(Union[keypoint_detection_prediction,instance_segmentation_prediction,object_detection_prediction,list_of_values]): Detection to ground Florence-2 model. May be statically provided bounding box[left_top_x, left_top_y, right_bottom_x, right_bottom_y]or result of object-detection model. If the latter is true, one box will be selected based ongrounding_selection_mode..model_id(roboflow_model_id): Model to be used.
-
output
raw_output(Union[string,language_model_output]): String value ifstringor LLM / VLM output iflanguage_model_output.parsed_output(dictionary): Dictionary.classes(list_of_values): List of values of any type.
Example JSON definition of step Florence-2 Model in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/florence_2@v2",
"images": "$inputs.image",
"task_type": "<block_does_not_provide_example>",
"prompt": "my prompt",
"classes": [
"class-a",
"class-b"
],
"grounding_detection": "$steps.detection.predictions",
"grounding_selection_mode": "first",
"model_id": "florence-2-base"
}
v1¶
Class: Florence2BlockV1 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.florence2.v1.Florence2BlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Dedicated inference server required (GPU recommended) - you may want to use dedicated deployment
This Workflow block introduces Florence 2, a Visual Language Model (VLM) capable of performing a wide range of tasks, including:
-
Object Detection
-
Instance Segmentation
-
Image Captioning
-
Optical Character Recognition (OCR)
-
and more...
Below is a comprehensive list of tasks supported by the model, along with descriptions on how to utilize their outputs within the Workflows ecosystem:
Task Descriptions:
-
Custom Prompt (
custom) - Use free-form prompt to generate a response. Useful with finetuned models. -
Text Recognition (OCR) (
ocr) - Model recognizes text in the image -
Text Detection & Recognition (OCR) (
ocr-with-text-detection) - Model detects text regions in the image, and then performs OCR on each detected region -
Captioning (short) (
caption) - Model provides a short description of the image -
Captioning (
detailed-caption) - Model provides a long description of the image -
Captioning (long) (
more-detailed-caption) - Model provides a very long description of the image -
Unprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the image -
Object Detection (
open-vocabulary-object-detection) - Model detects and returns the bounding boxes for the provided classes -
Detection & Captioning (
object-detection-and-caption) - Model detects prominent objects and captions them -
Prompted Object Detection (
phrase-grounded-object-detection) - Based on the textual prompt, model detects objects matching the descriptions -
Prompted Instance Segmentation (
phrase-grounded-instance-segmentation) - Based on the textual prompt, model segments objects matching the descriptions -
Segment Bounding Box (
detection-grounded-instance-segmentation) - Model segments the object in the provided bounding box into a polygon -
Classification of Bounding Box (
detection-grounded-classification) - Model classifies the object inside the provided bounding box -
Captioning of Bounding Box (
detection-grounded-caption) - Model captions the object in the provided bounding box -
Text Recognition (OCR) for Bounding Box (
detection-grounded-ocr) - Model performs OCR on the text inside the provided bounding box -
Regions of Interest proposal (
region-proposal) - Model proposes Regions of Interest (Bounding Boxes) in the image
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/florence_2@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
task_type |
str |
Task type to be performed by model. Value determines required parameters and output response.. | ❌ |
prompt |
str |
Text prompt to the Florence-2 model. | ✅ |
classes |
List[str] |
List of classes to be used. | ✅ |
grounding_detection |
Optional[List[float], List[int]] |
Detection to ground Florence-2 model. May be statically provided bounding box [left_top_x, left_top_y, right_bottom_x, right_bottom_y] or result of object-detection model. If the latter is true, one box will be selected based on grounding_selection_mode.. |
✅ |
grounding_selection_mode |
str |
. | ❌ |
model_version |
str |
Model to be used. | ✅ |
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 Florence-2 Model in version v1.
- inputs:
Stability AI Outpainting,SAM 3,Motion Detection,Contrast Enhancement,Camera Focus,Image Preprocessing,Corner Visualization,Ellipse Visualization,Object Detection Model,Roboflow Vision Events,Seg Preview,Heatmap Visualization,Trace Visualization,OC-SORT Tracker,Time in Zone,OpenAI,Email Notification,Byte Tracker,Keypoint Visualization,Detections Consensus,Model Comparison Visualization,YOLO-World Model,Polygon Zone Visualization,Byte Tracker,Dynamic Crop,Polygon Visualization,QR Code Generator,GLM-OCR,Stitch Images,OpenRouter,Image Blur,Model Monitoring Inference Aggregator,Clip Comparison,Dynamic Zone,Detections Stitch,Time in Zone,Detections List Roll-Up,Segment Anything 2 Model,Buffer,Google Gemini,Instance Segmentation Model,Pixelate Visualization,EasyOCR,SIFT,Contrast Equalization,Image Threshold,Instance Segmentation Model,Polygon Visualization,Anthropic Claude,Halo Visualization,Roboflow Custom Metadata,Keypoint Detection Model,Florence-2 Model,Local File Sink,Icon Visualization,Single-Label Classification Model,Image Contours,OpenAI,Detection Offset,SAM2 Video Tracker,Detections Filter,SAM 3,Grid Visualization,ByteTrack Tracker,VLM As Detector,Size Measurement,Object Detection Model,LMM,Detections Transformation,Image Convert Grayscale,Reference Path Visualization,Stitch OCR Detections,Keypoint Detection Model,SIFT Comparison,Roboflow Dataset Upload,CSV Formatter,S3 Sink,BoT-SORT Tracker,OpenAI-Compatible LLM,Morphological Transformation,Object Detection Model,Crop Visualization,Blur Visualization,Mask Visualization,Stability AI Image Generation,Qwen-VL,Stitch OCR Detections,Google Gemma API,Velocity,Image Slicer,Qwen 3.5 API,Path Deviation,Background Color Visualization,Slack Notification,Anthropic Claude,Dimension Collapse,Qwen 3.6 API,Webhook Sink,Color Visualization,Bounding Box Visualization,Google Gemma,Relative Static Crop,Bounding Rectangle,CogVLM,Llama 3.2 Vision,Detection Event Log,Path Deviation,Instance Segmentation Model,Qwen3.5-VL,Camera Focus,Google Vision OCR,Instance Segmentation Model,Google Gemini,Llama 3.2 Vision,SAM 3,SORT Tracker,Twilio SMS Notification,Detections Stabilizer,Moondream2,Anthropic Claude,Image Slicer,Depth Estimation,OpenAI,Multi-Label Classification Model,Gaze Detection,Template Matching,Classification Label Visualization,PTZ Tracking (ONVIF),Florence-2 Model,MoonshotAI Kimi,Time in Zone,MoonshotAI Kimi,Line Counter,Dot Visualization,Background Subtraction,Keypoint Detection Model,Roboflow Dataset Upload,Stability AI Inpainting,Per-Class Confidence Filter,Detections Classes Replacement,Label Visualization,Overlap Filter,Detections Merge,Absolute Static Crop,Google Gemini,VLM As Classifier,Camera Calibration,Halo Visualization,Email Notification,OpenAI,Clip Comparison,LMM For Classification,Text Display,Mask Area Measurement,Circle Visualization,Line Counter Visualization,Byte Tracker,OCR Model,Detections Combine,VLM As Detector,Image Stack,Morphological Transformation,Twilio SMS/MMS Notification,Mask Edge Snap,Triangle Visualization,Perspective Correction - outputs:
Stability AI Outpainting,CLIP Embedding Model,SAM 3,Motion Detection,Seg Preview,Corner Visualization,Ellipse Visualization,Image Preprocessing,Roboflow Vision Events,Object Detection Model,Heatmap Visualization,Trace Visualization,VLM As Classifier,Time in Zone,OpenAI,Email Notification,Keypoint Visualization,Detections Consensus,Model Comparison Visualization,YOLO-World Model,JSON Parser,Polygon Zone Visualization,Dynamic Crop,Polygon Visualization,QR Code Generator,GLM-OCR,OpenRouter,Model Monitoring Inference Aggregator,Clip Comparison,Image Blur,Cache Get,Detections Stitch,Time in Zone,Detections List Roll-Up,Segment Anything 2 Model,Instance Segmentation Model,Google Gemini,Buffer,Contrast Equalization,Image Threshold,Instance Segmentation Model,Polygon Visualization,Anthropic Claude,Halo Visualization,Roboflow Custom Metadata,Keypoint Detection Model,Florence-2 Model,Local File Sink,Icon Visualization,OpenAI,SAM 3,Grid Visualization,VLM As Detector,Size Measurement,Multi-Label Classification Model,Object Detection Model,LMM,Reference Path Visualization,Stitch OCR Detections,Keypoint Detection Model,SIFT Comparison,Roboflow Dataset Upload,S3 Sink,Cache Set,OpenAI-Compatible LLM,Morphological Transformation,Object Detection Model,Mask Visualization,Stability AI Image Generation,Qwen-VL,Crop Visualization,Stitch OCR Detections,Google Gemma API,Qwen 3.5 API,Path Deviation,Perception Encoder Embedding Model,Background Color Visualization,Slack Notification,Anthropic Claude,Qwen 3.6 API,Webhook Sink,Color Visualization,Bounding Box Visualization,Google Gemma,CogVLM,Path Deviation,Llama 3.2 Vision,Instance Segmentation Model,Instance Segmentation Model,Google Vision OCR,Google Gemini,SAM 3,Distance Measurement,Single-Label Classification Model,Llama 3.2 Vision,Twilio SMS Notification,Moondream2,Anthropic Claude,OpenAI,Depth Estimation,Classification Label Visualization,PTZ Tracking (ONVIF),MoonshotAI Kimi,Florence-2 Model,Time in Zone,MoonshotAI Kimi,Line Counter,Dot Visualization,Keypoint Detection Model,Roboflow Dataset Upload,Stability AI Inpainting,Per-Class Confidence Filter,Semantic Segmentation Model,Line Counter,Detections Classes Replacement,Label Visualization,Google Gemini,VLM As Classifier,Email Notification,Halo Visualization,OpenAI,Pixel Color Count,Clip Comparison,LMM For Classification,Text Display,Circle Visualization,Line Counter Visualization,VLM As Detector,Twilio SMS/MMS Notification,Morphological Transformation,Triangle Visualization,Perspective Correction
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Florence-2 Model in version v1 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Text prompt to the Florence-2 model.classes(list_of_values): List of classes to be used.grounding_detection(Union[keypoint_detection_prediction,instance_segmentation_prediction,object_detection_prediction,list_of_values]): Detection to ground Florence-2 model. May be statically provided bounding box[left_top_x, left_top_y, right_bottom_x, right_bottom_y]or result of object-detection model. If the latter is true, one box will be selected based ongrounding_selection_mode..model_version(string): Model to be used.
-
output
raw_output(Union[string,language_model_output]): String value ifstringor LLM / VLM output iflanguage_model_output.parsed_output(dictionary): Dictionary.classes(list_of_values): List of values of any type.
Example JSON definition of step Florence-2 Model in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/florence_2@v1",
"images": "$inputs.image",
"task_type": "<block_does_not_provide_example>",
"prompt": "my prompt",
"classes": [
"class-a",
"class-b"
],
"grounding_detection": "$steps.detection.predictions",
"grounding_selection_mode": "first",
"model_version": "florence-2-base"
}