Florence-2 is Microsoft’s open-source, prompt-based vision foundation model. You pass it an image and a task token such as <OD>, <OCR> or <CAPTION>, and it returns the result as text: detection boxes, extracted text, captions, grounded phrases or segmentation. The trade is simple to state. One lightweight MIT-licensed checkpoint covers several tasks that would otherwise need separate models, but on pure object detection it scores lower than a dedicated detector. Florence-2 wins when the workload needs several of those tasks on the same image and can live with the accuracy gap. It loses when the job is high-precision detection on one fixed label set, or on imagery its pre-training never saw.
Florence 2 in Brief: One Set of Weights, Task Chosen by Prompt
Florence-2 frames every vision task as translation: given an image and a task-specific prompt, generate the matching output. The same weights switch between tasks just by changing the prompt.
The supported task prompts are:
- Captioning:
<CAPTION>,<DETAILED_CAPTION>,<MORE_DETAILED_CAPTION>,<DENSE_REGION_CAPTION> - Detection:
<OD>,<OPEN_VOCABULARY_DETECTION>,<REGION_PROPOSAL> - Text reading:
<OCR>,<OCR_WITH_REGION>,<REGION_TO_OCR> - Grounding and regions:
<CAPTION_TO_PHRASE_GROUNDING>,<REGION_TO_CATEGORY>,<REGION_TO_DESCRIPTION> - Segmentation:
<REFERRING_EXPRESSION_SEGMENTATION>,<REGION_TO_SEGMENTATION>
Microsoft built FLD-5B, a dataset of 5.4 billion annotations across 126 million images, through an iterative loop of automated annotation and model refinement. Roboflow’s overview puts it plainly: the model’s strength lies in that dataset, not in a complex architecture. For a broader grounding in how models move from pixels to semantic output, our piece on computer vision and image understanding covers the wider field.
When Does One Florence-2 Checkpoint Beat a Dedicated Detector?
Florence-2’s advantage over a dedicated detector is replacing several models on the same image with one. It does not beat one on detection accuracy alone.
Roboflow’s fine-tuning tutorial puts a number on the gap. A fine-tuned Florence-2-base model reached an mAP50:95 of 0.52 on their dataset, while YOLOv8-S trained on the same dataset reached 0.9. Two caveats belong next to that figure. The Florence-2 run lasted only 10 epochs, and its loss was still falling when training stopped, so a longer run might give a better mAP. It is also a single dataset from one tutorial. Even so, the direction is clear, and the authors say outright that Florence-2 performs worse as a detector than models built only for detection, such as recent YOLO versions. (If the detection metric is unfamiliar, our explainer on IoU and object detection metrics shows how the IoU thresholds feed into it.)
The case for Florence-2 is consolidation. Roboflow’s example is an app that detects cars and licence plates. After fine-tuning on plates, Florence-2 still detects the COCO base classes, cars included, so one model replaces two. If the app also has to read the plate number, that is still one model, because Florence-2 does OCR as well.
So the question to ask is not “which model is more accurate?” It is whether the drop in detection accuracy costs less than running several specialised models. Ask it per workload, and answer it on your own images.
Where the Generalist Loses: Unfamiliar Imagery and Hard Real-World Datasets
Vision-language models trained on internet-scale data detect common objects well zero-shot. They still struggle with classes, tasks and imaging modalities rare in their pre-training. The Roboflow100-VL authors (2025) describe it this way: when the target class name is meaningful and matches pre-training, performance is strong, and otherwise the model fails catastrophically. On the challenging medical datasets in that benchmark, both the open-vocabulary detector GroundingDINO and the multimodal model Qwen2.5-VL scored under 2% zero-shot accuracy. The same paper found that open-vocabulary detectors such as Detic, GroundingDINO and OWLv2 consistently beat multimodal LLMs like Qwen2.5-VL and Gemini 2.5 Pro at detection. The authors suggest one reason: those generalist models do not report per-box confidence scores or suppress overlapping predictions.
The models in these results do not include Florence-2; we read them as a warning by analogy for any prompt-based generalist used as a detector. Roboflow’s own Florence-2 material points the same way: the pre-trained weights lack domain knowledge for medical or satellite imagery, and in those cases fine-tuning is necessary.
There is a second warning about leaning on COCO numbers. On RF100-VL, models that scored higher on COCO did not necessarily do better on real-world data. YOLOv11 beats YOLOv8 on COCO but performs similarly on RF100-VL across all three tested sizes. GroundingDINO shows how large the drop can be: 49.2 mAP on ODinW-13, but only 16 mAP on RF100-VL. RF100-VL’s hard cases include X-rays, thermal data and aerial imagery, where state-of-the-art models struggle.
Unified Model or Specialist: A Decision Table
| Workload condition | Likely better fit | Why |
|---|---|---|
| Several tasks on the same image (detect, then read text or caption) | Florence-2 | One checkpoint covers detection, OCR and captioning, removing extra models |
| Detection only, fixed label set, accuracy is the main requirement | Dedicated detector (for example YOLO) | Florence-2 scores lower mAP than purpose-built detectors |
| Common, everyday object classes, no labelled data yet | Florence-2 zero-shot as a first test | Generalist models perform well on objects common in pre-training |
| Medical, satellite or other unusual imagery | Fine-tune, then compare against a fine-tuned specialist | Roboflow names medical and satellite imagery as cases where fine-tuning is necessary |
| Pipeline depends on per-box confidence thresholds | Check Florence-2’s parsed output before choosing it | Roboflow100-VL authors posit missing per-box scores explain weaker MLLM detection |
| Text-heavy documents or drawings, with structured extraction | Florence-2 fine-tuned | Fine-tuned Florence-2-base beat zero-shot GPT-4o and Claude-3.5-Sonnet on GD&T extraction |
Before our computer vision R&D team runs any of these comparisons, we check that the outcome is plausible and likely to give measurable ROI. Is the task repeatable and well defined enough that a model at current capability can do it reliably? A repeatable, well-defined task is far more likely to have measurable ROI. “Understand the scene better than our operators do” usually is not.
Is Florence-2 Open Source, and Can You Ship a Closed Fine-Tune?
Yes. Microsoft released Florence-2 under the MIT licence, and the weights are public. The licence file in the model repository grants permission to use, copy, modify, merge, publish, distribute, sublicense and sell copies. The one condition is that the copyright notice and permission notice are included. Roboflow’s summary of the terms says there are no usage caps, revenue thresholds or field-of-use limits, and that you may fine-tune the model and keep the result closed-source.
Two limits are worth noting. The software is provided “as is”, with no warranty of fitness for purpose and no liability on the authors. And the MIT text covers copyright permissions but contains no express patent licence. Your counsel should still read the licence before you ship.
Florence-2-Base or Florence-2-Large?
Florence-2-base has 0.23 billion parameters and Florence-2-large has 0.77 billion. Roboflow’s inference documentation sums up the trade: base gives faster inference, large gives better accuracy. Microsoft also publishes fine-tuned generalist versions of each, Florence-2-base-ft and Florence-2-large-ft, trained on a set of downstream tasks.
| COCO benchmark | Florence-2-base | Florence-2-large |
|---|---|---|
| Parameters | 0.23B | 0.77B |
| Zero-shot caption CIDEr | 133.0 | 135.6 |
| Zero-shot detection mAP | 34.7 | 37.5 |
| Fine-tuned (-ft) caption CIDEr | 140.0 | 143.3 |
| Fine-tuned (-ft) detection mAP | 41.4 | 43.4 |
On these COCO benchmarks, more than three times the parameters (0.77 / 0.23 ≈ 3.3) buys 2 to 3 points of detection mAP and a few CIDEr points. Because the gap is that small, we would start with base. Move to large only if base fails on your own validation images, and only by a margin that large plausibly closes. Roboflow100-VL points the same way for detector families, though it did not test Florence-2: bigger models within a family gained less on real-world data than on COCO, and the spread between smallest and largest was at most 2.6 mAP. Large also needs more VRAM to fine-tune, or a smaller batch size.
When Fine-Tuning Florence-2 Pays Off
We would fine-tune Florence-2 when three things are true: your domain is outside what pre-training covered, you still want one model for several tasks, and your output is closer to structured text than to dense boxes. If the job is pure detection with an accuracy target, compare the fine-tuned model against a fine-tuned specialist before committing.
The published results show what a small model gains from fine-tuning. In Hugging Face’s fine-tuning post, Florence-2’s similarity score on its validation set went from 0 before fine-tuning to 57.0 after seven epochs. In a study on extracting GD&T annotations from 2D engineering drawings, full-parameter fine-tuning of Florence-2-base, evaluated on 400 drawings, produced a 29.95% gain in precision, a 37.75% gain in recall, a 52.40% gain in F1 and a 43.15% drop in hallucination. Those gains are measured against the best of GPT-4o and Claude-3.5-Sonnet, both run zero-shot. Note what that comparison is: a fine-tuned small model against general-purpose closed models, not against a dedicated detector. The same study also found that recall and F1 fell, and hallucination rose, as drawings carried more GD&T entries.
The counterweight comes from the detection side. On RF100-VL, all gradient-based fine-tuning baselines beat in-context and multimodal prompting. GroundingDINO gave the best few-shot results, beating all YOLO variants by more than 10%. Fine-tuning is the right move for unfamiliar classes. Whether Florence-2 is the right model to fine-tune depends on whether you need its other tasks.
Some practical settings are documented. Hugging Face found a learning rate of 1e-6 worked in every case they tried, and larger rates overfit the training set quickly. The Florence-2 authors report better results with the image encoder unfrozen than frozen.
Running Florence-2 Locally: What the Hardware Has to Carry
Florence-2’s open weights run on your own hardware. You load the model and processor, pass an image with a task prompt, and parse the raw output string. Florence2Processor.post_process_generation() turns that string into structured results, such as boxes and labels for detection. If memory is tight, the Transformers docs show quantising the model to 4-bit with bitsandbytes.
The hardware needs differ a lot between inference and training:
- Inference, GPU: about 1 second per image on an NVIDIA T4, according to Roboflow.
- Inference, CPU: possible, but expect several seconds per image. Roboflow’s docs warn that CPU inference may be very slow, or may not work properly, for larger models.
- Weight memory: about 0.46 GB for Florence-2-base in BF16. This is a third-party estimate (232M parameters × 2 bytes), not a measurement, and it covers weights only.
- Fine-tuning, constrained: with the vision encoder frozen, Hugging Face used batch size 6 on one A100 or batch size 1 on a T4.
- Fine-tuning, full model: batch size 64 took 70 minutes on a cluster of 8 H100 GPUs.
- Fine-tuning, local workstation: Roboflow’s detection tutorial calls for an NVIDIA GPU with about 20 GB of VRAM, with batch size adjusted to fit available memory.
These are vendor and tutorial figures, not benchmarks of your pipeline. The figure that should decide your deployment is sustained throughput on your own images at your own resolution. At about one image per second, we would keep a T4 to batch document processing or periodic inspection. It does not suit a high-frame-rate line, where a lightweight object detection model is the natural comparison. If the model ends up line-side, keeping it running depends on the artefacts that keep a line-side inspection model running (validation sets, drift checks, rollback) more than on the checkpoint. A modular computer vision pipeline also lets you swap Florence-2 for a specialist later without rebuilding everything around it.
FAQ
When Was Florence-2 Released?
Microsoft released Florence-2 in June 2024. The paper was presented at CVPR 2024.