Florence-2-base
by Microsoft
Captions, text and objects from images.
Vision and documentsCommercial useRuns on 16 GB
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/LICENSE2. On your machine
Our estimate: about 0.6 GB per billion parameters at 4-bit, with room for the context.
huggingface.co/microsoft/Florence-2-base3. Through an API
No Hugging Face Inference Provider serves it today.
huggingface.co/microsoft/Florence-2-base4. Momentum
Likes and the trending score are Hugging Face's own figures; attention, not quality.
huggingface.co/microsoft/Florence-2-baseChecked 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
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
0.2B
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.
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
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
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
baidu · image-text-to-text
zai-org · image-to-text
Qwen · image-text-to-text
briaai · image-segmentation
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.”
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
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
The snippet uses torch.cuda and torch.float16 but its imports do not include torch.
The model's code ships inside the Hugging Face repository, not in the transformers library.
That call turns the output into a dict with pixel boxes and labels.
This task needs the caption as extra input.
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.