开源推荐
morning
GitHub 热门项目: llama-ocr
摘要
GitHub项目:llama-ocr 仓库地址:https://github。com/Nutlope/llama-ocr Stars:2426 | 作者:Nutlope 项目描述:Document to Markdown OCR library with Llama 3。
Llama
for
ocr
OCR
Add
2026-05-20
1 阅读
GitHub Trending
GitHub 项目:llama-ocr
仓库地址:https://github.com/Nutlope/llama-ocr
星级:2426 | 作者:Nutlope
项目描述:使用 Llama 3.2 视觉的 Markdown OCR 库文档
===================================================
自述文件内容:
---
## 安装
`npm 我 llama-ocr`
## 用法
````js
从“llama-ocr”导入 { ocr };
const markdown = 等待 ocr({
filePath: "./trader-joes-receipt.jpg", // 图像路径(很快是 PDF!)
apiKey: process.env.TOGETHER_API_KEY, // 一起AI API密钥
});
````
## 托管演示
我们在 [LlamaOCR.com](https://llamaocr.com/) 上有一个托管演示,您可以尝试一下!
## 它是如何工作的
该库使用 [Together AI](https://togetherai.link/) 的免费 Llama 3.2 端点来解析图像并返回 markdown。 Llama 3.2 11B 和 Llama 3.2 90B 的付费端点也可提供更快的性能和更高的速率限制。
您可以使用“model”选项来控制它,该选项默认设置为“Llama-3.2-90B-Vision”,但也可以接受“free”或“Llama-3.2-11B-Vision”。
## 路线图
- [x] 添加对本地图像 OCR 的支持
- [x] 添加对远程图像 OCR 的支持
- [ ] 添加对单页 PDF 的支持
- [ ] 添加对多页 PDF OCR 的支持(截取 PDF 的屏幕截图并馈送到视觉模型)
- [ ] 除了 markdown 之外还添加了对 JSON 输出的支持
## 信用
该项目的灵感来自 [Zerox](https://github.com/getomni-ai/zerox)。去看看吧!