Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Florence-2-base

by Microsoft

Captions, text and objects from images.

Vision and documentsCommercial useRuns on 16 GB

Hugging FaceDemos

1. Commercial use

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software”

MIT allows use and sale; keep the notice with copies.

huggingface.co/microsoft/Florence-2-base/raw/main/LICENSE

Checked against its official pages on Nov 23, 2026. Tap a verdict to see its source.How we checkedReport an error

What Florence-2-base does

Florence-2-base is an open vision model by Microsoft that describes images, reads the text in them and finds objects, each picked with a short task word. It is small, with 0.23 billion parameters. The model is on Hugging Face, free to use in paid products under the MIT license.

What people use it for

Describe photos and write alt text

Get a short, detailed or very detailed description of an image, for alt text, product photos or a searchable library.

Read text in images

Pull printed text out of screenshots, signs or scanned pages, with or without the position of each line.

Find objects and their boxes

Get a list of the things in a photo with a box around each, to count items or crop them.

Find the thing a sentence describes

Give a sentence such as "a green car" and get boxes around the matching parts of the image.

Label every region of an image

Get short descriptions for many regions at once, to tag images or build a training set.

Sort receipts and screenshots Idea

Read the text from receipts or screenshots and file them by what they say.

Florence-2-base popularity

445
likes on Hugging Face
23.8M
downloads, last 30 days
2
Hugging Face trending score

As reported by Hugging Face, checked Nov 26, 2026. Downloads include automated ones; some repositories report none.

Where to run Florence-2-base

On your machine

Parameters

0.2B

Memory at 4-bit

about 0.1 GB

Our estimate: 0.6 GB per billion parameters, with room for the context.

Florence-2-base license

MIT license: free to use, change and share, also in paid products. Keep the copyright and license notice with copies you share.

In a paid product
Yes

MIT allows use and sale; keep the notice with copies.

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software” source

Ship the weights to users
With conditions

You may share the model files; include the MIT copyright and permission notice.

“The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.” source

Work for clients
Yes

MIT lets you use it in work you sell to clients.

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software” source

Alternatives

Florence-2-base This page

445 likesMIT

Unlimited-OCR

baidu · image-text-to-text

5,055 likesMIT

GLM-OCR

zai-org · image-to-text

2,246 likesMIT

Qwen2.5-VL-7B-Instruct

Qwen · image-text-to-text

1,781 likesApache 2.0

RMBG-2.0

briaai · image-segmentation

1,678 likesCustom license

All vision and documents models

Get started

Tell your AI assistant

“In a Python virtual environment with torch, transformers and pillow, write a script that loads microsoft/Florence-2-base with AutoModelForCausalLM and AutoProcessor (trust_remote_code=True, float16 on CUDA, float32 on CPU, and import torch), runs the <OCR> task on image.png and prints the result of processor.post_process_generation.”

  1. Load the model and processor; both need trust_remote_code=True, and the model downloads on first use.

    model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-base", torch_dtype=torch_dtype, trust_remote_code=True).to(device)
    processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
    

    From huggingface.co/microsoft/Florence-2-base/raw/main/README.md

  2. Pick a task word, run it on an image and turn the output into labels and boxes.

    inputs = processor(text=prompt, images=image, return_tensors="pt").to(device, torch_dtype)
    generated_ids = model.generate(
        input_ids=inputs["input_ids"],
        pixel_values=inputs["pixel_values"],
        max_new_tokens=1024,
        do_sample=False,
        num_beams=3,
    )
    generated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]
    parsed_answer = processor.post_process_generation(generated_text, task="<OD>", image_size=(image.width, image.height))
    

    From huggingface.co/microsoft/Florence-2-base/raw/main/README.md

Mistakes to avoid

Running the model card's snippet exactly as written
Add import torch at the top

The snippet uses torch.cuda and torch.float16 but its imports do not include torch.

Loading it with AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-base") and no other options
Pass trust_remote_code=True to both the model and the processor

The model's code ships inside the Hugging Face repository, not in the transformers library.

Reading boxes out of the raw generated text
Call processor.post_process_generation with the same task word and the image size

That call turns the output into a dict with pixel boxes and labels.

Sending <CAPTION_TO_PHRASE_GROUNDING> without a sentence
Pass the sentence as text_input, for example "A green car parked in front of a yellow building."

This task needs the caption as extra input.

Typing a free question like "What brand is this car?" as the prompt
Use one of the listed task words, or a fine-tuned or chat model for questions

The model switches tasks by task prompts; the base model is pretrained, not tuned for question answering.

Questions

Can I use Florence-2-base in a paid product?

Yes. It is MIT-licensed; keep the license notice with copies.

Which tasks can it do?

Captions at three detail levels, object detection, finding a described thing, region captions and proposals, and reading text with or without its position.

What is the difference between base and base-ft?

Both have 0.23 billion parameters; base is only pretrained, while base-ft is further tuned on a set of common tasks.

How big is it?

0.23 billion parameters; the larger Florence-2-large has 0.77 billion.