{"repo":"Konsn666/unlimited-ocr-mac","free":true,"listed":false,"github":"https://github.com/Konsn666/unlimited-ocr-mac","clone":"git clone https://github.com/Konsn666/unlimited-ocr-mac.git","description":"🍎 Mac (Apple Silicon) adaptation of baidu/Unlimited-OCR 6.7B VLM. .cuda()→.to('mps') patches + autocast workaround + MCP server. 20s/document on M4 Pro.","language":"Python","stars":27,"topics":[],"license":null,"category":"media-processing","readme_excerpt":"Unlimited OCR · Mac (Apple Silicon) 适配版 English 中文 --- 中文 在 Mac Apple Silicon (M1 / M2 / M3 / M4) 上本地跑通 baidu/Unlimited-OCR (6.7B VLM) — 带 grounding 的 OCR,直接输出 [bbox] 格式。 官方只支持 NVIDIA CUDA 12.9+ 。这个仓库是社区维护的 Mac 适配:打 3 个 patch,其它都和上游一致。 ✨ 功能亮点 功能 说明 --- --- 🔍 本地 OCR 6.7B VLM 模型完全本地运行，无需联网，隐私安全 🖥️ Web UI 浏览器直操作：上传 → 扫描 → 编辑 → 翻译 → 导出 Word 🌐 双语翻译 支持中/英/日/韩/法/德等 10+ 语言互译，原文+译文紧贴对照 📄 导出 Word 支持仅原文 / 仅译文 / 双语对照三种导出模式 ✏️ 在线编辑 识别结果可直接点击修改，实时保存 🤖 MCP 服务 一键接入 Claude Code / Codex / 其他 AI 工具 ⚡ 实时流式 SSE 逐行推送扫描结果，边扫边看 实测性能 (M4 Pro 48GB) 任务 耗时 --- --- 模型加载(从 SSD 读 6.7GB) 3s 简单图 (768×1024) 9s 复杂文档 (1024×1024, 13 行) 19s 多图批处理 20s/图 🚀 一键安装 模型默认装到 ./model dir ,缓存走 /.cache/huggingface/hub/ 。装外置 SSD: 一键运行 Web UI (推荐) : 命令行 : 🖥️ Web UI 使用指南 基本流程 界面布局 区域 功能 --- --- 左侧面板 原始文件预览（PDF 自动按页切换） 右侧面板 OCR 识别结果（可编辑、翻译） 顶部工具栏 上传 / 扫描 / 翻译语言选择 / 导出 底部状态栏 模型状态 / 设备信息 翻译功能 1. 在顶部下拉框选择目标语言（如 → English ） 2. 点击 🌐 翻译 按钮 3. 译文以紫色缩进样式紧跟在原文下方 4. 再次点击可取消翻译 翻译 API 配置 （编辑 web/.env ）: 💡 提示 : 翻译是 可选功能 。不配置 API Key 仍可正常使用 OCR 识别和导出，只是无法翻译。 导出 Word 点击 📥 导出 Word 按钮后，可选择三种模式: 模式 说明 --- --- 仅原文 只输出 OCR 识别的原始文字 仅译文 只输出翻译后的文字（需先翻译） 双语对照 一行原文、一行译文交替排列 作为 MCP 服务 (给 Claude Code / Codex / 其他 AI 工具调用) 注册到 Claude Code ( /.claude.json 或项目 .mcp.json ): 注册到 OpenAI Codex CLI ( /.codex/config.toml ): 启动后,你的 AI 工具就能调用: - ocr image(path) — 单张图 OCR,返回 JSON - ocr directory(path) — 批处理目录 - model status() — 看模型加载状态 🏗️ 项目结构 三个 Mac 适配 patch (核心) 模型官方代码假设 NVIDIA GPU,在 Mac 上要改三处: 1. .cuda() 硬编码 → .to('mps') ( modeling unlimitedocr.py 里 13+","default_branch":null,"files":null,"tree":[],"storefront":"/r/Konsn666","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Konsn666/unlimited-ocr-mac/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}