Mindket

Florence-2-large

Newversion 1 · updated

Overview

Captions images, finds objects and reads text in pictures when you pair an image with a short task prompt. Made for developers and researchers who run vision tasks in Python with transformers.

Florence-2-large is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python with the transformers, torch and Pillow packages
  • Roughly 1.6 GB of disk space for the weights in F16
  • A GPU is optional, since the card's code falls back to the CPU
Runs in
  • Python scripts that use the transformers library
  • Windows, macOS and Linux
  • A GPU, which the card's code picks when one is present, or a CPU
Start with
pip install -U huggingface_hub
hf download microsoft/Florence-2-large

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

Florence-2-large is a vision model from Microsoft. You give it an image and a short text prompt, and it answers with text for tasks such as captioning, object detection and segmentation. This copy is a continued pretrained version with a 4k context length and 777M parameters. Its OCR output now separates lines with a newline.

Who it suits

It suits developers and researchers who want one model for several image tasks, chosen by changing the prompt instead of swapping models.

IndustryWho uses itHow they use itExample
RetailCatalog engineersCaption product pictures and detect the objects in themDrafting a short description for a product photo
ResearchComputer vision researchersStudy a prompt-based vision model and compare its sizesComparing large with the base model on the same images
Document workApp developersRun the OCR task on page images or screenshotsReading the text from a screenshot, line by line
AccessibilityApp teamsDescribe images in words for people who cannot see themDrafting a text description for a photo

Skip it if your work is text only, since this model always works on an image paired with a task prompt.

Where to use it

  • Python scripts that use the transformers library
  • Windows, macOS and Linux
  • A GPU, which the card's code picks when one is present, or a CPU
Use caseWhoWhat they get back
Caption an imageDevelopersA written description of the picture
Detect objectsComputer vision teamsDetected objects as a parsed answer
Read text in a pictureApp developersRecognized text, with line breaks between lines

How to set it up

  • Python with the transformers, torch and Pillow packages
  • Roughly 1.6 GB of disk space for the weights in F16
  • A GPU is optional, since the card's code falls back to the CPU
  1. Install the Python packages the card's code imports.
  2. Download the model files, or let the code fetch them on first run.
  3. Load the model and processor, with trust_remote_code set to True.
pip install -U huggingface_hub
hf download microsoft/Florence-2-large

How to use it

You choose a task prompt, pass it with an image to the processor, and call generate. Then post_process_generation turns the raw text into a parsed answer for that task. The card's own example uses the object detection prompt.

device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32

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

prompt = "<OD>"

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=4096,
    num_beams=3,
    do_sample=False
)
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))

print(parsed_answer)
ToolWhat it does
AutoProcessorPrepares the text prompt and the image for the model
AutoModelForCausalLMLoads the model, with trust_remote_code set to True
generateProduces the answer tokens for the prompt and image
post_process_generationTurns the generated text into a parsed answer for the task

Example

You hand the model a picture and the prompt <OD>. The script decodes the generated text and prints the parsed answer, which holds the objects the model found in the picture. The image variable is a PIL image you load yourself.

For newcomers and experts

Think of it as one model that you steer with a short instruction. A good first try is to run the card's object detection code on a single picture and read what it prints.

If you know the field, note that it uses a sequence-to-sequence design and was trained on the FLD-5B dataset, which the card puts at 5.4 billion annotations over 126 million images. The card reports a COCO object detection AP of 39.8 for this version. This version had only 0.1B samples of continued pretraining.

  1. Pick a task prompt
  2. Processor packs prompt and image
  3. Model generates answer tokens
  4. Post-processing parses the answer

Good to know

  • Training note: Microsoft says this continued pretraining used few samples, so the model might not be trained well.
  • Size: 777M parameters, with weights of about 1.6 GB in F16.
  • Siblings: the card lists base and large sizes, plus fine-tuned versions of each.
  • License: MIT.
  • Cost to run: none named.
  • Data it reaches: it downloads model files from Hugging Face, and the card's sample also fetches a picture from the web.
  • Not for: the card lists no forbidden uses, but warns that this version may be under-trained.

README and files

README

Florence-2-large

Captions images, finds objects and reads text in pictures when you pair an image with a short task prompt. Made for developers and researchers who run vision tasks in Python with transformers.

Made by microsoft on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: Florence-2-large is a vision model from Microsoft. You give it an image and a short text prompt, and it answers with text for tasks such as captioning, object detection and segmentation. This copy is a continued pretrained version with a 4k context length and 777M parameters. Its OCR output now separates lines with a newline.

Who it suits: It suits developers and researchers who want one model for several image tasks, chosen by changing the prompt instead of swapping models.

Industry | Who uses it | How they use it | Example
Retail | Catalog engineers | Caption product pictures and detect the objects in them | Drafting a short description for a product photo
Research | Computer vision researchers | Study a prompt-based vision model and compare its sizes | Comparing large with the base model on the same images
Document work | App developers | Run the OCR task on page images or screenshots | Reading the text from a screenshot, line by line
Accessibility | App teams | Describe images in words for people who cannot see them | Drafting a text description for a photo

Skip it if your work is text only, since this model always works on an image paired with a task prompt.

Where to use it:

  • Python scripts that use the transformers library
  • Windows, macOS and Linux
  • A GPU, which the card's code picks when one is present, or a CPU
Use case | Who | What they get back
Caption an image | Developers | A written description of the picture
Detect objects | Computer vision teams | Detected objects as a parsed answer
Read text in a picture | App developers | Recognized text, with line breaks between lines

How to set it up:

  • Python with the transformers, torch and Pillow packages
  • Roughly 1.6 GB of disk space for the weights in F16
  • A GPU is optional, since the card's code falls back to the CPU
  1. Install the Python packages the card's code imports.
  2. Download the model files, or let the code fetch them on first run.
  3. Load the model and processor, with trust_remote_code set to True.
pip install -U huggingface_hub
hf download microsoft/Florence-2-large

How to use it: You choose a task prompt, pass it with an image to the processor, and call generate. Then post_process_generation turns the raw text into a parsed answer for that task. The card's own example uses the object detection prompt.

device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32

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

prompt = "<OD>"

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=4096,
    num_beams=3,
    do_sample=False
)
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))

print(parsed_answer)
Tool | What it does
AutoProcessor | Prepares the text prompt and the image for the model
AutoModelForCausalLM | Loads the model, with trust_remote_code set to True
generate | Produces the answer tokens for the prompt and image
post_process_generation | Turns the generated text into a parsed answer for the task

Example: You hand the model a picture and the prompt <OD>. The script decodes the generated text and prints the parsed answer, which holds the objects the model found in the picture. The image variable is a PIL image you load yourself.

For newcomers and experts: Think of it as one model that you steer with a short instruction. A good first try is to run the card's object detection code on a single picture and read what it prints.

If you know the field, note that it uses a sequence-to-sequence design and was trained on the FLD-5B dataset, which the card puts at 5.4 billion annotations over 126 million images. The card reports a COCO object detection AP of 39.8 for this version. This version had only 0.1B samples of continued pretraining.

Pick a task prompt
Processor packs prompt and image
Model generates answer tokens
Post-processing parses the answer

Good to know:

  • Training note: Microsoft says this continued pretraining used few samples, so the model might not be trained well.
  • Size: 777M parameters, with weights of about 1.6 GB in F16.
  • Siblings: the card lists base and large sizes, plus fine-tuned versions of each.
  • License: MIT.
  • Cost to run: none named.
  • Data it reaches: it downloads model files from Hugging Face, and the card's sample also fetches a picture from the web.
  • Not for: the card lists no forbidden uses, but warns that this version may be under-trained.

On Hugging Face, 13 November 2026

  • Task: image text to text
  • Library: transformers
  • Parameters: 777M
  • Weights: about 1.6 GB in F16; about 388 MB at 4-bit (estimate)
  • Formats: Safetensors
  • Downloads in the last 30 days: 403,113
  • Likes: 1,889
  • License: mit
  • Quantized versions: 3
  • Fine-tunes: 43
  • Tags: transformers, pytorch, safetensors, florence2, image-text-to-text, vision

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download microsoft/Florence-2-large

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  6 KB

1 file, 6 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Florence-2-large This page403,1131,889777Mmit
Florence-2-baseShares florence2 · vision · pytorch14,139,837439232Mmit
elephant-1Shares vision · image-text-to-text · transformers7,4261159.4Bmit
Agents-A1Shares vision · image-text-to-text · transformers7,23266935.1Bapache-2.0
mammoth-1Shares vision · image-text-to-text · transformers5,9039727.4Bmit
Qwen3.8-27B-piShares vision · image-text-to-text · transformers1,8578727.8Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

Searched

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Developer

See all in Developer

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

buzz

block · Kit

Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…

New37.3k

plannotator

backnotprop · Kit

Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.

New10.5k