返回顶部
o

ollama-ocr

Use Ollama's vision/OCR models to recognize text from images. Supports glm-ocr, llava, moondream, and llama3.2-vision models. Ideal when you need local offline OCR without relying on cloud APIs.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
229
下载量
0
收藏
概述
安装方式
版本历史

ollama-ocr

# Ollama OCR Skill Use this skill when you need to recognize text from images using Ollama's local vision/OCR models. No internet required - fully offline OCR. ## When to Use - User sends an image and wants text extraction - User asks to recognize text from a screenshot or picture - Need local offline OCR without cloud API dependency - Processing sensitive images that shouldn't be sent to third parties ## Models Available | Model | Best For | Size | |-------|----------|------| | `glm-ocr:latest` | Chinese text OCR | ~2.2GB | | `llava:7b` | General image understanding | ~4.7GB | | `moondream` | Lightweight vision model | ~1.5GB | | `llama3.2-vision:latest` | Large vision model | ~7GB+ | ## Ollama Endpoint Default: `http://172.17.0.2:11434` (Docker container to host gateway) **Note:** Endpoint is pre-configured for OpenClaw running in Docker accessing host Ollama. Adjust `OLLAMA_HOST` in `ollama_ocr.py` if your setup differs. ## Usage ### Command Line ```bash python3 ollama_ocr.py /path/to/image.jpg [model_name] ``` Examples: ```bash python3 ollama_ocr.py receipt.png glm-ocr:latest python3 ollama_ocr.py screenshot.jpg llava:7b ``` ### Python API ```python from ollama_ocr import ollama_ocr # Basic OCR with default model (glm-ocr) result = ollama_ocr('/path/to/image.jpg') # Specify model result = ollama_ocr('/path/to/image.jpg', 'glm-ocr:latest') print(result) ``` ## Example Prompts to Activate This Skill - "识别这张图片里的文字" - "帮我 OCR 一下这个截图" - "Extract text from this image" - "What text is in this screenshot?" ## Notes - Image path must be absolute or relative to script location - For large images, consider resizing first to avoid timeout - `glm-ocr` works best for Chinese text - Some models may have output quirks (e.g., glm-ocr occasionally repeats) - First call may be slow if model isn't cached in memory ## Requirements - Ollama installed and running - At least one vision/OCR model downloaded (e.g., `ollama pull glm-ocr:latest`)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ollama-ocr-1776107282 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ollama-ocr-1776107282 技能

通过命令行安装

skillhub install ollama-ocr-1776107282

下载 Zip 包

⬇ 下载 ollama-ocr v1.0.0

文件大小: 2.75 KB | 发布时间: 2026-4-17 15:35

v1.0.0 最新 2026-4-17 15:35
Initial release - local OCR with Ollama vision models

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部