Ollama-OCR
Local OCR over images and PDFs using Ollama vision models.
Working when we checked on .
What is Ollama-OCR?
Ollama-OCR is an open-source OCR (Optical Character Recognition) package that uses vision language models running through Ollama to extract text from images and PDFs. It is aimed at developers who want local, model-based document text extraction via Python or a Streamlit web app. It supports multiple vision models including LLaVA, Llama 3.2 Vision, Granite3.2-vision, Moondream, and MiniCPM-V, and outputs results in formats such as Markdown, plain text, JSON, structured, key-value, and table. It also offers batch processing with parallel workers, progress tracking, image preprocessing, custom prompts, and language specification.
Ollama-OCR pricing
Pricing model: Free
Free and open-source
Ollama-OCR pros
- Supports multiple vision models via Ollama: LLaVA, Llama 3.2 Vision, Granite3.2-vision, Moondream, MiniCPM-V
- Extracts text from both images and PDF files
- Multiple output formats: markdown, text, JSON, structured, key-value pairs, tables
- Batch processing with parallel workers, progress tracking, and image preprocessing
- Custom prompts and language specification supported
- Installable as a Python package (pip install ollama-ocr) or run as a Streamlit web app
Ollama-OCR cons
- Requires Ollama installed and vision models pulled locally as a prerequisite
- README notes the LLaVA model can generate wrong output sometimes
- No dedicated pricing or commercial support for the package itself; runs entirely on user infrastructure
- Documentation on limits such as supported file types is incomplete in the visible sources
Frequently asked questions about Ollama-OCR
What does Ollama-OCR do?
It is an OCR package that uses vision language models through Ollama to extract text from images and PDFs, available as a Python package and a Streamlit web application.
Which vision models does Ollama-OCR support?
It supports LLaVA, Llama 3.2 Vision, Granite3.2-vision, Moondream, and MiniCPM-V, or any vision model available on Ollama.
What output formats can it produce?
Markdown, plain text, JSON, structured format, key-value pairs, and table extraction for tabular data.
How do I install Ollama-OCR?
Install the Python package with 'pip install ollama-ocr'. You must also install Ollama and pull a vision model such as 'ollama pull llama3.2-vision:11b'.
Can it process multiple files at once?
Yes. Batch processing supports parallel workers via max_workers, progress tracking, recursive subdirectory search, and optional image preprocessing.
Can I customize how text is extracted?
Yes. You can pass a custom_prompt to override default extraction instructions and specify the language of the text, e.g. English.
Does it handle PDFs?
Yes. PDF support is listed as a newer feature; you can pass a path to a PDF file to process_image.
Who is Ollama-OCR for?
Developers and users who want to run vision-model-based OCR locally through Ollama using Python code or a Streamlit web interface.
How much does Ollama-OCR cost?
The package itself is free and open source; users must install Ollama and model weights on their own hardware.
Does it run locally or in the cloud?
It runs against an Ollama API endpoint you configure via base_url, such as http://host.docker.internal:11434/api/generate, so processing happens on your own Ollama instance.