Roboflow

Florence-2 Overview

Florence-2, introduced by Microsoft Research at CVPR 2024, is an open-source vision-language foundation model designed to unify diverse computer vision tasks within a single sequence-to-sequence framework. Unlike traditional models that specialize in specific tasks, Florence-2 accepts both images and text prompts and outputs text for tasks such as captioning, object detection, segmentation, OCR, and region-based grounding. It comes in two sizes—Florence-2-base (~230M parameters) and Florence-2-large (~770M parameters)—and is trained on FLD-5B, a large dataset of ~126M images with ~5.4B annotations.

The model demonstrates strong zero-shot and fine-tuned performance, often rivaling larger vision-language systems while remaining lightweight and efficient. Released under the MIT license, all weights are publicly available, making it accessible for fine-tuning and deployment in applications like VQA, content tagging, accessibility, and research. Florence-2’s compact design, versatility, and openness position it as a practical alternative to larger proprietary multimodal models.

Florence-2 Interactive Demo

Results appear here. Add an image or pick an example to run Florence-2.

Florence-2 Details & Performance

Details

Vision Tasks

CaptioningInstance SegmentationOCRObject DetectionOpen Vocabulary Object DetectionPhrase GroundingRegion Proposal

Features

Foundation VisionMultimodal VisionZero-shot Detection

Usage

Past 30 Days

Performance

Avg. Latency

Alternatives to Florence-2

Other models worth comparing for similar use cases.

IDEA Research
Grounding DINO
Grounding DINO is an open-vocabulary object detection model developed by IDEA Research, released in March 2023 under the Apache 2.0 license. It extends the DINO transformer-based detector with grounded pre-training, enabling it to detect arbitrary objects described by free-form text queries rather than a fixed set of predefined categories. The model integrates a text encoder with a visual backbone through a feature fusion module that aligns language and visual representations at multiple scales.Grounding DINO achieves strong zero-shot detection performance on COCO, LVIS, and ODinW benchmarks, and supports referring expression comprehension tasks. It is widely used as a foundation for open-vocabulary detection pipelines and as the detection backbone in systems such as Grounded-SAM. The model is particularly suited for applications requiring flexible, text-driven object localization across diverse domains.
IDEA Research
Grounded SAM
Grounded SAM is an open-vocabulary image segmentation model developed by IDEA Research, released in January 2024 under the Apache 2.0 license. It combines Grounding DINO, a zero-shot open-vocabulary object detector, with the Segment Anything Model to produce precise segmentation masks for objects identified through free-form text prompts. The two models are used sequentially: Grounding DINO localizes objects from a text query, and SAM generates the corresponding segmentation masks.Grounded SAM enables zero-shot instance segmentation without task-specific training data, making it applicable to domains where labeled segmentation data is scarce. It supports arbitrary text queries and can segment objects not represented in standard training sets. The model is commonly used in automated labeling pipelines, robotic perception, and domain-specific vision applications requiring open-vocabulary segmentation.
Google
OWL-ViT
OWL-ViT (Open-World Localization with Vision Transformers) is an open-vocabulary object detection model released in May 2022 by Google Research. It adapts a pretrained CLIP-style image-text model by removing the final pooling layer and attaching lightweight classification and box prediction heads to each Transformer output token, producing a detector capable of localizing arbitrary objects described by free-form text at inference time. Rather than being restricted to a fixed taxonomy such as the 80 categories in Microsoft COCO, OWL-ViT can detect object classes specified by a user's text query, including categories the model was never explicitly trained on.OWL-ViT accepts an image and a list of text queries as input, and produces bounding boxes with class assignments drawn from the supplied queries. It also supports one-shot image-conditioned detection, where a cropped image region is used as the query instead of text, allowing the model to find visually similar instances within a target scene. The model is released in multiple Vision Transformer sizes (ViT-B/32, ViT-B/16, ViT-L/14) and CLIP-pretrained variants, distributed through the Google Research scenic repository and Hugging Face under the Apache 2.0 license. A successor model, OWLv2, was released in June 2023, introducing the OWL-ST self-training recipe that scales training to over one billion pseudo-annotated examples and substantially improves detection performance on rare and long-tail categories while preserving the open-vocabulary interface.
Meta
SAM 3
Released on November 19th, 2025, Segment Anything 3 (SAM 3) is a zero-shot image segmentation model that “detects, segments, and tracks objects in images and videos based on concept prompts.” This model was developed by Meta as the third model in the Segment Anything series.

Unlike its previous SAM models (Segment Anything and Segment Anything 2), you can provide SAM 3 with the prompt “shipping container” and it will generate precise segmentation masks for all shipping containers in an image. SAM 3 generates segmentation masks that correspond to the location of the objects found with a text prompt.
HuggingFace
SmolVLM2
SmolVLM2 is a compact multimodal vision-language model developed by the Hugging Face TB Research team, released in February 2025 under the Apache 2.0 license. It is designed for efficient image and video understanding on resource-constrained hardware, with model variants ranging from 256M to 2.2B parameters. SmolVLM2 processes images, multi-image inputs, and video alongside text queries to generate text outputs for tasks including visual question answering, image captioning, and OCR.SmolVLM2 is designed for on-device and edge deployment, requiring substantially less GPU memory than comparable multimodal models. It supports standard fine-tuning pipelines via the Hugging Face transformers library and quantization through bitsandbytes. SmolVLM2 is suited for applications where a capable vision-language model is needed without full server-scale infrastructure.

Deploy Florence-2 with an API

Florence-2 runs as a hosted REST endpoint through Roboflow Workflows. Pick a task, then hand the prompt to your coding agent or copy the code. Deploying the workflow into a free Roboflow workspace replaces the your-workspace and YOUR_API_KEY placeholders with your own.

Connect your agent to Roboflow (once)

Add the Roboflow MCP server

claude mcp add --transport http roboflow https://mcp.roboflow.com/mcp

Run /mcp and authorize Roboflow in your browser when the OAuth flow opens.

Start a new Claude Code session so the MCP loads, then paste the prompt below (it works the same in any agent).

Deploy this workflow to your Roboflow workspace to use it.

Integrate the Roboflow "Florence-2" workflow into my app.

- Endpoint: POST https://serverless.roboflow.com/<your-workspace>/workflows/florence-2-captioning
- Auth: send my Roboflow API key as `api_key` in the request body, read from the ROBOFLOW_API_KEY env var (never hardcode).
- Body: { "api_key": ..., "inputs": { `image`: { type: "url" | "base64", value } } }.

With the Roboflow MCP connected, call `workflows_get` on "florence-2-captioning" to read the exact input schema (the source of truth), then `workflows_run` on a sample image to confirm the output shape before writing code (the MCP is authenticated, so this needs no key). Without the MCP, use the contract above.

Before running the app, set up these keys so it does not error at runtime:
- `ROBOFLOW_API_KEY` (sent as `api_key`) from https://app.roboflow.com/settings/api
Create a .gitignore'd .env with these variables, using placeholder values for any I haven't given you. Then pause and tell me directly, in your reply: the full path to the .env file, exactly which keys I need to paste in, and the link to get each one. Wait for me to confirm I've added them before you run anything. Do not run the app until I confirm.

Then add the integration to my codebase: match my project's language, framework, and conventions; read every key from environment variables (never hardcode); add basic error handling; and include a small runnable example. If you can't tell what language my project uses, ask me.
Installpip install inference-sdk

Deploy this workflow to your Roboflow workspace to use it.

# 1. Import the library
from inference_sdk import InferenceHTTPClient

# 2. Connect to your workflow
client = InferenceHTTPClient(
  api_url="https://serverless.roboflow.com",
  api_key="YOUR_API_KEY"
)

# 3. Run your workflow on an image
result = client.run_workflow(
  workspace_name="your-workspace",
  workflow_id="florence-2-captioning",
  images={
    "image": "YOUR_IMAGE.jpg"  # Path to your image file
  },
  use_cache=True  # cache workflow definition for 15 minutes
)

# 4. Get your results
print(result)

Deploy this workflow to your Roboflow workspace to use it.

const response = await fetch('https://serverless.roboflow.com/your-workspace/workflows/florence-2-captioning', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    inputs: {
      "image": {"type": "url", "value": "IMAGE_URL"}
    }
  })
});

const result = await response.json();
console.log(result);

Deploy this workflow to your Roboflow workspace to use it.

curl --location 'https://serverless.roboflow.com/your-workspace/workflows/florence-2-captioning' \
--header 'Content-Type: application/json' \
--data '{
  "api_key": "YOUR_API_KEY",
  "inputs": {
    "image": {"type": "url", "value": "IMAGE_URL"}
  }
}'

Florence-2 License

MIT · Permissive license

Florence-2 is released under MIT, a permissive license. The Florence-2 license lets you use, modify, and sell work built on the model, with the copyright notice as the only real obligation and no requirement to open-source related code changes.

Commercial use
Permitted with no separate commercial license. No usage caps, revenue thresholds, or field-of-use limits apply to Florence-2.
Modification
Permitted. You can fine-tune or rewrite Florence-2 and keep the result closed-source.
Redistribution
Permitted. Include the original copyright and permission notice in copies or substantial portions of the work.

MIT grants no explicit patent license and disclaims all warranties. If patent exposure is a concern for your deployment, review it with counsel before launch.

Read the full MIT license ↗

Do I need a commercial license for Florence-2?

No commercial license is needed for Florence-2: permissive terms let you keep related code private while deploying commercially.

Do not hesitate to reach out with questions for your commercial project — our team will help you start solving business problems on the first call. See Roboflow commercial licensing for the models included in each plan.

Talk to sales

This model is released under the MIT License, a short and permissive open-source license that allows commercial use, modification, and redistribution.

Yes. Under the terms of the MIT license, you can freely use this model for commercial purposes. You must retain the copyright notice and license text when redistributing.

License information is provided as a guide and is not legal advice.