Hugging Face’s image-to-text catalog helps you explore models for captioning and visual questions. Compare model requirements and licenses before building a workflow.

Search for "Hugging Face image to text" and you land on a task page, not a product. Image-to-text is a category on the Hugging Face Hub: models that take a picture and return text. When we checked in October 2026 the model filter listed about 2,300 of them. Hugging Face names two main uses for the task: image captioning and optical character recognition (OCR).
This page is for people who want to pick one of those models and get it running. We cover which models to start with, the code Hugging Face itself documents, what running them costs, and when you should skip this task and use a vision-language model instead.
Most of the 2,300 listings are fine-tunes and experiments. A handful of well-known checkpoints cover the common jobs:
| Job | Model to try first | What you get back |
|---|---|---|
| Describe a photo | Salesforce/blip-image-captioning-base (or the -large version) | One short caption, e.g. a sentence about the main subject |
| Read printed text, one line at a time | microsoft/trocr-base-printed | The text in a cropped line image |
| Read handwriting | microsoft/trocr-base-handwritten | The handwritten line as text |
| Japanese manga text | kha-white/manga-ocr-base | Japanese text from speech bubbles |
| Full-page OCR or detailed captions | A vision-language model, such as allenai/olmOCR-7B-0725 | Longer, structured output (see the section on VLMs below) |
One detail catches people out: TrOCR works on single lines of text. Hand it a whole scanned page and the output falls apart. You need to detect and crop lines first, or use a page-level OCR model.
Most popular model pages have an inference widget on the right-hand side. Drop an image in and you'll see the output in a few seconds. Many models also have community-built demos on Hugging Face Spaces. Test with your own images, not the sample ones. A captioner that does well on stock photos can still give vague answers on product shots, screenshots or medical scans.
The quickest route is the Transformers pipeline. This is the example from Hugging Face's own task page:
from transformers import pipeline
captioner = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
captioner("https://huggingface.co/datasets/Narsil/image_dummy/resolve/main/parrots.png")
The first run downloads the model weights. After that it runs on your own machine, with no API key and no per-image charge. A CPU is enough to try BLIP-base. For batches of thousands of images you'll want a GPU.
TrOCR follows a slightly longer pattern: load TrOCRProcessor and VisionEncoderDecoderModel, call generate, then batch_decode. The model card has the full snippet. If you work in JavaScript, Transformers.js runs supported models in the browser or Node, and the @huggingface/inference client can call hosted models with imageToText.
The models are free to download, subject to each model's license, so check the license on the model card before you ship anything commercial. You pay only if you use Hugging Face's hardware. According to the pricing page when we checked:
Hosted endpoints bill for uptime, not per image, so an endpoint left running overnight costs money even when nobody uses it. For steady, high volume, a model on your own GPU is usually the cheapest option.
Hugging Face keeps a separate task, image-text-to-text, for vision-language models. Both models featured on the image-to-text task page actually carry that newer tag. The difference is practical. A classic image-to-text model has one fixed job, such as writing a caption. A VLM takes the image plus a written prompt, so you can ask "list every price on this receipt" or "write alt text under 120 characters".
Our rule of thumb: use BLIP or TrOCR when you need something small and fast that does one job across millions of images. Choose a VLM when the output needs to follow instructions, cover a whole document, or answer questions. VLMs are much larger (the featured ones are around 8 billion parameters), so they need a decent GPU or a paid hosted endpoint.
Developers adding captions, alt text or OCR to an app. Data teams labeling image collections. Researchers comparing models. If you just want the text out of one photo and don't plan to write code, Google Lens or a chat assistant like ChatGPT will get you there faster. For business documents such as invoices and forms, a managed OCR service like Nanonets saves you building the pipeline yourself. More options are in our OCR tools and image-to-text tools lists.
Downloading and running the open models on your own computer is free. Hosted options, such as Inference Endpoints, GPU Spaces and Inference Providers usage beyond the included credits, are paid.
For a small, quick captioner, start with BLIP (Salesforce/blip-image-captioning-base or -large). For detailed or instruction-following captions, try a vision-language model from the image-text-to-text task.
Yes. TrOCR handles printed and handwritten text one line at a time. Newer OCR models, many of them VLMs, can read whole pages.