code-vygr/local-llm-ocr-ollama
🖼️ Extract text from images locally using Ollama's LLMs—100% free, offline, and private. No API keys or cloud costs necessary.
What's novel
🖼️ Extract text from images locally using Ollama's LLMs—100% free, offline, and private. No API keys or cloud costs necessary.
Code Analysis
3 files read · 2 roundsA single 80-line Python script that base64-encodes a local image or downloads one from a URL and sends it to a hardcoded Ollama vision model (qwen2.5vl:3b) to extract text.
Strengths
The three functions are small, focused, and the base64 encoding + Ollama chat call pattern is straightforward and correct. The prompt engineering for text extraction is slightly thoughtful (asking to preserve order, not miss faint text).
Weaknesses
Zero error handling (no file checks, no HTTP validation, no Ollama connection errors), no tests, no CLI, hardcoded model and file paths, and the README describes a full GUI application with installers that does not exist in the code. The docstring for image_to_text_from_url incorrectly references 'deepseek-r1' while the code uses 'qwen2.5vl:3b'.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
6
Contributors
2
Files
8
Active weeks
3
Repository
Language
Python
Stars
2
Forks
0
License
—