Batch OCR processing with DeepSeek-OCR via Ollama
Converts images of text into markdown using local DeepSeek-OCR via Ollama. Use when you need to batch process textbook scans or screenshots into searchable notes without cloud services.
/plugin marketplace add dnvriend/ollama-deepseek-ocr-tool/plugin install ollama-deepseek-ocr-tool@ollama-deepseek-ocr-toolThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill provides access to ollama-deepseek-ocr-tool, a CLI tool for fast, private batch OCR processing using DeepSeek-OCR via Ollama. Converts sequences of images (textbook pages, slides, scans) into a single coherent markdown document.
Key capabilities:
Use this skill when:
Do NOT use this skill for:
The ollama-deepseek-ocr-tool processes multiple images in sequence and creates a single markdown document with extracted text. Images are sorted naturally and text is appended sequentially for coherent reading.
# Clone and install
git clone https://github.com/dnvriend/ollama-deepseek-ocr-tool.git
cd ollama-deepseek-ocr-tool
uv tool install .
Ollama - Local LLM runtime
brew install ollama
ollama serve
DeepSeek-OCR model (~6GB download)
ollama pull deepseek-ocr
Python 3.14+ and uv package manager
# Example 1: Process textbook chapter from iPhone photos
ollama-deepseek-ocr-tool "IMG_*.png" chapter-3-notes.md
# Example 2: Convert lecture slides to markdown
ollama-deepseek-ocr-tool "lecture-week5/*.jpg" week5-summary.md
# Example 3: With verbose logging to debug issues
ollama-deepseek-ocr-tool "*.png" output.md -vv
Process images matching a glob pattern and create a markdown document.
Usage:
ollama-deepseek-ocr-tool GLOB_PATTERN OUTPUT_FILE [OPTIONS]
Arguments:
GLOB_PATTERN: Pattern to match images (e.g., ".png", "dir/.jpg")OUTPUT_FILE: Path to output markdown file (will be overwritten)-v/-vv/-vvv: Verbosity (INFO/DEBUG/TRACE)--help: Show comprehensive help with examples--version: Show versionExamples:
# Basic: Process all PNGs in current directory
ollama-deepseek-ocr-tool "*.png" output.md
# Process specific directory
ollama-deepseek-ocr-tool "textbook-ch3/*.jpg" chapter-3.md
# With verbose logging
ollama-deepseek-ocr-tool "*.png" output.md -vv
# Preview help (shows all examples)
ollama-deepseek-ocr-tool --help
Output Format:
<!-- Source: IMG_4170.png -->
[extracted text from image 1]
---
<!-- Source: IMG_4171.png -->
[extracted text from image 2]
</details>
<details>
<summary><strong>⚙️ Advanced Features (Click to expand)</strong></summary>
<!-- TODO: Add advanced features documentation -->
Control logging detail with progressive verbosity levels. All logs output to stderr.
Logging Levels:
| Flag | Level | Output | Use Case |
|---|---|---|---|
| (none) | WARNING | Errors and warnings only | Production, quiet mode |
-v | INFO | + High-level operations | Normal debugging |
-vv | DEBUG | + Detailed info, full tracebacks | Development, troubleshooting |
-vvv | TRACE | + Library internals | Deep debugging |
Examples:
# INFO level - see operations
ollama-deepseek-ocr-tool command -v
# DEBUG level - see detailed info
ollama-deepseek-ocr-tool command -vv
# TRACE level - see all internals
ollama-deepseek-ocr-tool command -vvv
Text & Formatting:
Tables:
Diagrams & Figures:
Issue: "No files match pattern"
# Check your glob pattern and current directory
ls *.png # Verify files exist
# Use absolute or relative paths correctly
ollama-deepseek-ocr-tool "./images/*.png" output.md
Issue: "Connection refused" / "OCR extraction failed"
# Ensure Ollama is running
ollama serve
# Verify model is installed
ollama list | grep deepseek-ocr
# Pull model if missing
ollama pull deepseek-ocr
Issue: Poor quality extraction
-vv flag to see word counts and verify extractionIssue: Slow processing
# Show comprehensive help with examples
ollama-deepseek-ocr-tool --help
# Use verbose logging to debug
ollama-deepseek-ocr-tool "*.png" output.md -vv
</details>
0: Success - all images processed1: Validation error - no files match pattern or invalid arguments2: Runtime error - Ollama connection failed or model not foundchapter-3-entrepreneurship.md not output.md-vv to see extraction progress and word counts