Florence-2 finds boxes and masks from a caption
Florence-2 is a vision-language model from Microsoft. In Supervisely you serve it to detect the objects a text prompt names, then pair it with SAM 2.1 in one app to label a whole project with boxes and masks, with no training on your classes.

- Publisher
- Microsoft
- Labels
- Bounding boxes
- Bitmap masks with SAM 2.1
- Apps
- Serve, Apply
Apps in the Supervisely Ecosystem
Every model in Supervisely comes as a Supervisely App: a module from the Ecosystem that plugs into the platform and runs on your own GPU, with no code to install. A Serve App puts the model behind the labeling tools, and where the model can be trained, a Train App fits it to your labeled project. All Apps work on the same projects, so you add a model, update it or swap it for another without changing anything else.
What is Florence-2?
Florence-2 (paper, weights) handles many vision tasks with one sequence-to-sequence model. A vision encoder turns the image into tokens, a task prompt in plain text is added to them, and a multimodal encoder-decoder writes the answer: a caption, a list of boxes, a region description. Changing the task means changing the prompt, not the model.
The Serve Florence-2 app uses one of those tasks, Caption to Phrase Grounding: it reads a text and finds the image region behind each phrase. You can choose among four pretrained models; started with default settings, the app deploys Florence-2-large on a GPU.
Label a project with Florence-2 and SAM 2.1
The Apply Florence-2 + SAM 2 to Images Project app takes the boxes Florence-2 finds and asks SAM 2.1 for the mask inside each one. It deploys Florence-2-large and SAM 2.1 Hiera small by itself, or connects to models you served earlier.
- Start the app from the Ecosystem or from the context menu of an images project.
- Choose the project or dataset to label.
- Select the served models, if the app did not pick them up on its own.
- Write a text prompt, for example "The image shows a room with tables and chairs." With the prompt left empty, Florence-2 writes a detailed caption for each image and labels every object it mentions.
- Preview the predictions on a few images.
- Apply to the project: save the labels to a new project or add them to the existing one. When you only need masks, leave the boxes out.
Text prompts in the labeling toolbox
On a single image, the image labeling toolbox runs Florence-2 as a text-prompt assistant: type a class name and every match gets a box. Grounding DINO offers the same kind of prompt; Florence-2 reads a caption-style sentence, as in the example of its app, while Grounding DINO takes the names of objects. Trying both on the same ten images is the quickest way to choose.
Limits, and what to train next
- Serve Florence-2 uses one task, Caption to Phrase Grounding; the project app adds Detailed Caption only for an empty prompt. The model's other tasks, such as OCR or region captions, are not exposed.
- Like the other text-prompt models, Florence-2 needs a GPU to serve.
- There is no Florence-2 training app. Correct its labels and train a detector, YOLO or DEIMv2, or an instance segmentation model, Detectron2, on the result.
- For masks straight from a phrase without a detection step, SAM 3 segments every object a noun phrase names.
Existing labels can join the project from COCO or YOLO files, and the finished dataset leaves the same way, for example through Supervisely JSON to COCO.
Frequently asked questions.
Can Florence-2 produce masks?
Not on its own in Supervisely. The Apply Florence-2 + SAM 2 to Images Project app passes each Florence-2 box to SAM 2.1, which returns the mask inside it.
Can I fine-tune Florence-2 in Supervisely?
No, there is no Florence-2 training app; it is served as released. To adapt to your classes, correct the labels it drafts and train a detector such as YOLO or DEIMv2, or an instance segmentation model such as Detectron2, on the result.
What is Florence-2?
Florence-2 is a vision-language model from Microsoft that handles many vision tasks, from captions to object detection and phrase grounding, through text prompts in one sequence-to-sequence model. In Supervisely it detects the objects a caption names, and with SAM 2.1 it adds their masks.
Train and serve models on your own data.
Label a project in a free account, train a model on it from the browser and deploy it on your own GPU. Or book a demo to run Supervisely on your servers.



