这是一个基于Mistral AI OCR API的Umi-OCR插件,可以帮助您使用Mistral的OCR服务进行文字识别。
- 从Releases页面下载最新版本
- 将整个
MistralOCR
文件夹放入Umi-OCR的插件目录:- Windows:
%APPDATA%\Umi-OCR\plugins\
- Linux:
~/.config/Umi-OCR/plugins/
- macOS:
~/Library/Application Support/Umi-OCR/plugins/
- Windows:
- 重启Umi-OCR
- 在设置中启用Mistral OCR插件
注意: 插件已内置所有必要的依赖库,无需手动安装任何依赖。
- API密钥: 您的Mistral API密钥,可以从Mistral AI控制台获取
- 模型: OCR模型名称,默认为
mistral-ocr-latest
- 超时时间: API请求的超时时间(秒)
- 包含图像Base64: 是否在响应中包含图像的Base64编码(高级选项)
- 语言: 识别的目标语言,支持自动检测、中文、英文等多种语言
- 最小图像尺寸: 提取图像的最小尺寸(像素),0表示不限制(高级选项)
- 启动Umi-OCR后,在全局设置中切换到"Mistral OCR"
- 配置您的API密钥和其他参数
- 在识别界面选择"文字识别(Mistral OCR)"
- 设置识别语言等参数
- 开始使用OCR功能
如果遇到OCR识别失败,请检查:
- API密钥错误: 确保您在插件设置中输入了有效的Mistral AI API密钥
- 网络错误: 检查您的网络连接是否正常,插件需要网络访问Mistral AI API
- 超时错误: 如果您处理的图像较大,请尝试在设置中增加超时值
- 额度不足: 确保您的Mistral账户有足够的API调用额度
MistralOCR/
├── __init__.py # 插件入口点
├── mistral_ocr.py # OCR实现
├── mistral_ocr_config.py # 插件配置
├── i18n.csv # 国际化字符串
└── README.md # 文档
- 克隆仓库:
git clone https://github.com/chunzhimoe/mistral.ai_umi_plugin
- 进行您的修改
- 通过将
MistralOCR
文件夹复制到Umi-OCR插件目录来测试插件
本项目使用GitHub Actions自动构建和发布插件包。当您创建一个新的标签(如v1.0.0
)时,工作流将自动构建插件包并创建一个新的发布版本。
本项目采用MIT许可证 - 详情请参阅LICENSE文件。
- 感谢Mistral AI提供OCR API
- 感谢Umi-OCR提供优秀的OCR平台
A powerful OCR plugin for Umi-OCR that utilizes Mistral AI's OCR capabilities to extract text from images.
- High-accuracy text recognition powered by Mistral AI's OCR API
- Supports multiple languages
- Simple integration with Umi-OCR
- No external dependencies required
- Easy configuration
- Download the latest release from the Releases page
- Extract the
MistralOCR
folder to the Umi-OCR plugins directory:- Windows:
%APPDATA%\Umi-OCR\plugins\
- Linux:
~/.config/Umi-OCR/plugins/
- macOS:
~/Library/Application Support/Umi-OCR/plugins/
- Windows:
- Restart Umi-OCR
- Enable the Mistral OCR plugin in the Umi-OCR settings
- API Key: Your Mistral AI API key. You can obtain one from Mistral AI Platform.
- Model: The Mistral OCR model to use (default:
mistral-ocr-latest
) - Timeout: Request timeout in seconds (default: 30)
- Include Image Base64: Whether to include the base64-encoded image in the response (default: false)
- Image Minimum Size: Minimum size for the image in pixels (default: 0)
- Open Umi-OCR
- Select "Mistral OCR" as the OCR engine
- Configure your API key and other settings
- Use Umi-OCR as normal to process images
- API Key Error: Ensure you have entered a valid Mistral AI API key in the plugin settings.
- Network Error: Check your internet connection. The plugin requires internet access to communicate with the Mistral AI API.
- Timeout Error: If you're processing large images, try increasing the timeout value in the settings.
MistralOCR/
├── __init__.py # Plugin entry point
├── mistral_ocr.py # OCR implementation
├── mistral_ocr_config.py # Plugin configuration
├── i18n.csv # Internationalization strings
└── README.md # Documentation
This project uses GitHub Actions to automatically build and release plugin packages. When you create a new tag (e.g., v1.0.0
), the workflow will automatically build the plugin package and create a new release.
This project is licensed under the MIT License - see the LICENSE file for details.
- Mistral AI for providing the OCR API
- Umi-OCR for the excellent OCR platform