Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
| Date | Stars |
|---|---|
| 2026-07-31 | 2682 |
| 2026-08-01 | 2683 |
| 2026-08-02 | 2685 |
| 2026-08-03 | 2686 |
| 2026-08-06 | 2685 |
Today
-1 stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<a href="https://github.com/imanoop7/Ollama-OCR"><img src="https://img.shields.io/github/stars/imanoop7/Ollama-OCR.svg?style=social&label=Star" alt="Stargazers"></a>
<a href="https://github.com/imanoop7/Ollama-OCR/graphs/commit-activity"><img src="https://img.shields.io/github/commit-activity/m/imanoop7/Ollama-OCR.svg" alt="Commit Activity"></a>
<a href="https://github.com/imanoop7/Ollama-OCR"><img src="https://img.shields.io/github/last-commit/imanoop7/Ollama-OCR.svg" alt="Last Commit"></a>

<h1 align="center">Ollama OCR</h1>
A powerful OCR (Optical Character Recognition) package that uses state-of-the-art vision language models through Ollama to extract text from images and PDF. Available both as a Python package and a Streamlit web application.
## 🌟 Features
### Supports PDF and Images (New! 🆕)
- **Multiple Vision Models Support**
- [LLaVA](https://ollama.com/library/llava): Efficient vision-language model for real-time processing (LLaVa model can generate wrong output sometimes)
- Llama 3.2 Vision: Advanced model with high accuracy for complex documents
- [Granite3.2-vision](https://ollama.com/library/granite3.2-vision): A compact and efficient vision-language model, specifically designed for visual document understanding, enabling automated content extraction from tables, charts, infographics, plots, diagrams, and more.
- [Moondream](https://ollama.com/library/moondream): Small vision language model designed to run efficiently on edge devices.
- [Minicpm-v](https://ollama.com/library/minicpm-v): MiniCPM-V 2.6 can process images with any aspect ratio and up to 1.8 million pixels (e.g., 1344x1344).
- **Multiple Output Formats**
- Markdown: Preserves text formatting with headers and lists
- Plain Text: Clean, simple text extraction
- JSON: Structured data format
- Structured: Tables and organized data
- Key-Value Pairs: Extracts labeled information
- Table: Extract all tabular data.
- **Batch Processing**
- Process multiple images in parallel
- Progress tracking for each image
- Image preprocessing (resize, normalize, etc.)
- **Custom Prompts**
- Override default prompts with custom instructions for text extraction.
## 📦 Package Installation
```bash
pip install ollama-ocr
```
## 🚀 Quick Start
### Prerequisites
1. Install Ollama
2. Pull the required model:
```bash
ollama pull llama3.2-vision:11b
ollama pull granite3.2-vision
ollama pull moondream
ollama pull minicpm-v
```
## Using the Package
### Single File Processing
```python
from ollama_ocr import OCRProcessor
# Initialize OCR processor
ocr = OCRProcessor(model_name='llama3.2-vision:11b', base_url="http://host.docker.internal:11434/api/generate") # You can use any vision model available on Ollama
# you can pass your custom ollama api
# Process an image
result = ocr.process_image(
image_path="path/to/your/image.png", # path to your pdf files "path/to/your/file.pdf"
format_type="markdown", # Options: markdown, text, json, structured, key_value
custom_prompt="Extract all text, focusing on dates and names.", # Optional custom prompt
language="English" # Specify the language of the text (New! 🆕)
)
print(result)
```
### Batch File
```python
from ollama_ocr import OCRProcessor
# Initialize OCR processor
ocr = OCRProcessor(model_name='llama3.2-vision:11b', max_workers=4) # max workers for parallel processing
# Process multiple images
# Process multiple images with progress tracking
batch_results = ocr.process_batch(
input_path="path/to/images/folder", # Directory or list of image paths
format_type="markdown",
recursive=True, # Search subdirectories
preprocess=True, # Enable image preprocessing
custom_prompt="Extract all text, focusing on dates and names.", # Optional custom prompt
language="English" # Specify the language of the text (New! 🆕)
)
# Access results
for file_path, text in batch_results['results'].items():
print(f"\nFile: {file_Excerpt of 6,766 characters
Read on GitHub84
Felipe Vieira · United States
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:4acc459a55039e1c, name:ocr