[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-breezedeus--Pix2Text":3,"tool-breezedeus--Pix2Text":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160784,2,"2026-04-19T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":76,"owner_twitter":72,"owner_website":78,"owner_url":79,"languages":80,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":10,"env_os":97,"env_gpu":98,"env_ram":97,"env_deps":99,"category_tags":108,"github_topics":109,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":122,"updated_at":123,"faqs":124,"releases":154},9751,"breezedeus\u002FPix2Text","Pix2Text","An Open-Source Python3 tool with SMALL models for recognizing layouts, tables, math formulas (LaTeX), and text in images, converting them into Markdown format. A free alternative to Mathpix, empowering seamless conversion of visual content into text-based representations. 80+ languages are supported.","Pix2Text 是一款开源的 Python 工具，专为将图片中的复杂内容一键转换为可编辑的 Markdown 格式而设计。它能精准识别图像中的版面布局、表格结构、数学公式（自动转为 LaTeX）以及多语言文本，有效解决了从截图、扫描文档或论文中提取结构化信息的难题，是 Mathpix 的优质免费替代方案。\n\n无论是需要整理文献的研究人员、处理技术文档的开发者，还是希望数字化笔记的学生与普通用户，都能通过 Pix2Text 轻松实现“看图转文字”。其独特之处在于采用了轻量级模型，在保证高精度的同时降低了运行门槛；最新版本更集成了先进的 DocLayout-YOLO 版面分析模型，并支持接入闭源视觉大模型（VLM）以增强表格和公式的识别能力。此外，它还支持直接转换整个 PDF 文件，覆盖全球 80 多种语言，让视觉内容到文本的转化变得无缝且高效。","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_bedb228c91aa.png\" width=\"220px\"\u002F>\n  \u003Cdiv>&nbsp;\u003C\u002Fdiv>\n\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1200765964434821260?label=Discord)](https:\u002F\u002Fdiscord.gg\u002FGgD87WM8Tf)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_984e42906fe3.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpix2text)\n[![Visitors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_1aa7c70054ee.png)](https:\u002F\u002Fvisitorbadge.io\u002Fstatus?path=https%3A%2F%2Fgithub.com%2Fbreezedeus%2FPix2Text)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fbreezedeus\u002Fpix2text)](.\u002FLICENSE)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fpix2text.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fpix2text)\n[![forks](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fbreezedeus\u002Fpix2text)](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text)\n[![stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fbreezedeus\u002Fpix2text)](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text)\n![last-release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease-date\u002Fbreezedeus\u002Fpix2text)\n![last-commit](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flast-commit\u002Fbreezedeus\u002Fpix2text)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl?url=https%3A%2F%2Ftwitter.com%2Fbreezedeus)](https:\u002F\u002Ftwitter.com\u002Fbreezedeus)\n\n[📖 Doc](https:\u002F\u002Fpix2text.readthedocs.io) |\n[👩🏻‍💻 Online Service](https:\u002F\u002Fp2t.breezedeus.com) |\n[👨🏻‍💻 Demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbreezedeus\u002FPix2Text-Demo) |\n[💬 Contact](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fjoin-group)\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\n[中文](.\u002FREADME_cn.md) | English\n\n\u003C\u002Fdiv>\n\n\n\n# Pix2Text\n\n## Update 2025.07.25: **V1.1.4** Released\n\nMajor Changes:\n\n- Upgraded the Mathematical Formula Detection (MFD) and Mathematical Formula Recognition (MFR) models to version 1.5. All default configurations, documentation, and examples now use `mfd-1.5` and `mfr-1.5` as the standard models.\n\n## Update 2025.04.15: **V1.1.3** Released\n\nMajor Changes:\n\n- Support for `VlmTableOCR` and `VlmTextFormulaOCR` models based on the VLM interface (see [LiteLLM documentation](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002F)) allowing the use of closed-source VLM models. Installation command: `pip install pix2text[vlm]`.\n  - Usage examples can be found in [tests\u002Ftest_vlm.py](tests\u002Ftest_vlm.py) and [tests\u002Ftest_pix2text.py](tests\u002Ftest_pix2text.py).\n\n## Update 2024.11.17: **V1.1.2** Released\n\nMajor Changes:\n\n* A new layout analysis model [DocLayout-YOLO](https:\u002F\u002Fgithub.com\u002Fopendatalab\u002FDocLayout-YOLO) has been integrated, improving the accuracy of layout analysis.\n\n## Update 2024.06.18：**V1.1.1** Released\n\nMajor changes:\n\n* Support the new mathematical formula detection models (MFD): [breezedeus\u002Fpix2text-mfd](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-mfd) ([Mirror](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-mfd)), which significantly improves the accuracy of formula detection.\n\nSee details: [Pix2Text V1.1.1 Released, Bringing Better Mathematical Formula Detection Models | Breezedeus.com](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fp2t-mfd-v1.1.1).\n\n## Update 2024.04.28: **V1.1** Released\n\nMajor changes:\n\n* Added layout analysis and table recognition models, supporting the conversion of images with complex layouts into Markdown format. See examples: [Pix2Text Online Documentation \u002F Examples](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fexamples_en\u002F).\n* Added support for converting entire PDF files to Markdown format. See examples: [Pix2Text Online Documentation \u002F Examples](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fexamples_en\u002F).\n* Enhanced the interface with more features, including adjustments to existing interface parameters.\n* Launched the [Pix2Text Online Documentation](https:\u002F\u002Fpix2text.readthedocs.io).\n\n## Update 2024.02.26: **V1.0** Released\n\nMain Changes:\n\n* The Mathematical Formula Recognition (MFR) model employs a new architecture and has been trained on a new dataset, achieving state-of-the-art (SOTA) accuracy. For detailed information, please see: [Pix2Text V1.0 New Release: The Best Open-Source Formula Recognition Model | Breezedeus.com](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fp2t-v1.0).\n\nSee more at: [RELEASE.md](docs\u002FRELEASE.md) .\n\n\u003Cbr\u002F>\n\n**Pix2Text (P2T)** aims to be a **free and open-source Python** alternative to **[Mathpix](https:\u002F\u002Fmathpix.com\u002F)**, and it can already accomplish **Mathpix**'s core functionality. **Pix2Text (P2T) can recognize layouts, tables, images, text, mathematical formulas, and integrate all of these contents into Markdown format. P2T can also convert an entire PDF file (which can contain scanned images or any other format) into Markdown format.**\n\n**Pix2Text (P2T)** integrates the following models:\n\n- **Layout Analysis Model**: [breezedeus\u002Fpix2text-layout](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-layout) ([Mirror](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-layout)).\n- **Table Recognition Model**: [breezedeus\u002Fpix2text-table-rec](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-table-rec) ([Mirror](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-table-rec)).\n- **Text Recognition Engine**: Supports **80+ languages** such as **English, Simplified Chinese, Traditional Chinese, Vietnamese**, etc. For English and Simplified Chinese recognition, it uses the open-source OCR tool [CnOCR](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fcnocr), while for other languages, it uses the open-source OCR tool [EasyOCR](https:\u002F\u002Fgithub.com\u002FJaidedAI\u002FEasyOCR).\n- **Mathematical Formula Detection Model (MFD)**: [breezedeus\u002Fpix2text-mfd-1.5](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-mfd-1.5) ([Mirror](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-mfd-1.5)). Implemented based on [CnSTD](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fcnstd).\n- **Mathematical Formula Recognition Model (MFR)**: [breezedeus\u002Fpix2text-mfr-1.5](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-mfr-1.5) ([Mirror](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-mfr-1.5)).\n\nSeveral models are contributed by other open-source authors, and their contributions are highly appreciated.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_7ffa10983877.jpg\" alt=\"Pix2Text Arch Flow\"\u002F>\n\u003C\u002Fdiv>\n\nFor detailed explanations, please refer to the [Pix2Text Online Documentation\u002FModels](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fmodels\u002F).\n\n\u003Cbr\u002F>\n\nAs a Python3 toolkit, P2T may not be very user-friendly for those who are not familiar with Python. Therefore, we also provide a **[free-to-use P2T Online Web](https:\u002F\u002Fp2t.breezedeus.com)**, where you can directly upload images and get P2T parsing results. The web version uses the latest models, resulting in better performance compared to the open-source models.\n\nIf you're interested, feel free to add the assistant as a friend by scanning the QR code and mentioning `p2t`. The assistant will regularly invite everyone to join the group where the latest developments related to P2T tools will be announced:\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_56dc5e74c6f0.jpg\" alt=\"Wechat-QRCode\" width=\"300px\"\u002F>\n\u003C\u002Fdiv>\n\nThe author also maintains a **Knowledge Planet** [**P2T\u002FCnOCR\u002FCnSTD Private Group**](https:\u002F\u002Ft.zsxq.com\u002FFEYZRJQ), where questions are answered promptly. You're welcome to join. The **knowledge planet private group** will also gradually release some private materials related to P2T\u002FCnOCR\u002FCnSTD, including **some unreleased models**, **discounts on purchasing premium models**, **code snippets for different application scenarios**, and answers to difficult problems encountered during use. The planet will also publish the latest research materials related to P2T\u002FOCR\u002FSTD.\n\nFor more contact method, please refer to [Contact](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fcontact\u002F).\n\n\n## List of Supported Languages\n\nThe text recognition engine of Pix2Text supports **`80+` languages**, including **English, Simplified Chinese, Traditional Chinese, Vietnamese**, etc. Among these, **English** and **Simplified Chinese** recognition utilize the open-source OCR tool **[CnOCR](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fcnocr)**, while recognition for other languages employs the open-source OCR tool **[EasyOCR](https:\u002F\u002Fgithub.com\u002FJaidedAI\u002FEasyOCR)**. Special thanks to the respective authors.\n\nList of **Supported Languages** and **Language Codes** are shown below:\n\n\u003Cdetails>\n\u003Csummary>↓↓↓ Click to show details ↓↓↓\u003C\u002Fsummary>\n\n| Language            | Code Name   |\n| ------------------- | ----------- |\n| Abaza               | abq         |\n| Adyghe              | ady         |\n| Afrikaans           | af          |\n| Angika              | ang         |\n| Arabic              | ar          |\n| Assamese            | as          |\n| Avar                | ava         |\n| Azerbaijani         | az          |\n| Belarusian          | be          |\n| Bulgarian           | bg          |\n| Bihari              | bh          |\n| Bhojpuri            | bho         |\n| Bengali             | bn          |\n| Bosnian             | bs          |\n| Simplified Chinese  | ch_sim      |\n| Traditional Chinese | ch_tra      |\n| Chechen             | che         |\n| Czech               | cs          |\n| Welsh               | cy          |\n| Danish              | da          |\n| Dargwa              | dar         |\n| German              | de          |\n| English             | en          |\n| Spanish             | es          |\n| Estonian            | et          |\n| Persian (Farsi)     | fa          |\n| French              | fr          |\n| Irish               | ga          |\n| Goan Konkani        | gom         |\n| Hindi               | hi          |\n| Croatian            | hr          |\n| Hungarian           | hu          |\n| Indonesian          | id          |\n| Ingush              | inh         |\n| Icelandic           | is          |\n| Italian             | it          |\n| Japanese            | ja          |\n| Kabardian           | kbd         |\n| Kannada             | kn          |\n| Korean              | ko          |\n| Kurdish             | ku          |\n| Latin               | la          |\n| Lak                 | lbe         |\n| Lezghian            | lez         |\n| Lithuanian          | lt          |\n| Latvian             | lv          |\n| Magahi              | mah         |\n| Maithili            | mai         |\n| Maori               | mi          |\n| Mongolian           | mn          |\n| Marathi             | mr          |\n| Malay               | ms          |\n| Maltese             | mt          |\n| Nepali              | ne          |\n| Newari              | new         |\n| Dutch               | nl          |\n| Norwegian           | no          |\n| Occitan             | oc          |\n| Pali                | pi          |\n| Polish              | pl          |\n| Portuguese          | pt          |\n| Romanian            | ro          |\n| Russian             | ru          |\n| Serbian (cyrillic)  | rs_cyrillic |\n| Serbian (latin)     | rs_latin    |\n| Nagpuri             | sck         |\n| Slovak              | sk          |\n| Slovenian           | sl          |\n| Albanian            | sq          |\n| Swedish             | sv          |\n| Swahili             | sw          |\n| Tamil               | ta          |\n| Tabassaran          | tab         |\n| Telugu              | te          |\n| Thai                | th          |\n| Tajik               | tjk         |\n| Tagalog             | tl          |\n| Turkish             | tr          |\n| Uyghur              | ug          |\n| Ukranian            | uk          |\n| Urdu                | ur          |\n| Uzbek               | uz          |\n| Vietnamese          | vi          |\n\n\n> Ref: [Supported Languages](https:\u002F\u002Fwww.jaided.ai\u002Feasyocr\u002F) .\n\n\u003C\u002Fdetails>\n\n\n\n## Online Service\n\nEveryone can use the **[P2T Online Service](https:\u002F\u002Fp2t.breezedeus.com)** for free, with a daily limit of 10,000 characters per account, which should be sufficient for normal use. *Please refrain from bulk API calls, as machine resources are limited, and this could prevent others from accessing the service.*\n\nDue to hardware constraints, the Online Service currently only supports **Simplified Chinese** and **English** languages. To try the models in other languages, please use the following **Online Demo**.\n\n## Online Demo 🤗\n\nYou can also try the **[Online Demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbreezedeus\u002FPix2Text-Demo)** to see the performance of **P2T** in various languages. However, the online demo operates on lower hardware specifications and may be slower. For Simplified Chinese or English images, it is recommended to use the **[P2T Online Service](https:\u002F\u002Fp2t.breezedeus.com)**.\n\n## Examples\n\nSee: [Pix2Text Online Documentation\u002FExamples](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fexamples_en\u002F).\n\n## Usage\n\nSee: [Pix2Text Online Documentation\u002FUsage](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fusage\u002F).\n\n## Models\n\nSee: [Pix2Text Online Documentation\u002FModels](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fmodels\u002F).\n\n## Install\n\nWell, one line of command is enough if it goes well.\n\n```bash\npip install pix2text\n```\n\nIf you need to recognize languages other than **English** and **Simplified Chinese**, please use the following command to install additional packages:\n\n```bash\npip install pix2text[multilingual]\n```\n\nIf the installation is slow, you can specify an installation source, such as using the Aliyun source: \n\n```bash\npip install pix2text -i https:\u002F\u002Fmirrors.aliyun.com\u002Fpypi\u002Fsimple\n```\n\nFor more information, please refer to: [Pix2Text Online Documentation\u002FInstall](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Finstall\u002F).\n\n## Command Line Tool\n\nSee: [Pix2Text Online Documentation\u002FCommand Tool](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fcommand\u002F).\n\n## HTTP Service\n\nSee: [Pix2Text Online Documentation\u002FCommand Tool\u002FStart Service](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fcommand\u002F).\n\n\n## MacOS Desktop Application\n\nPlease refer to [Pix2Text-Mac](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text-Mac) for installing the Pix2Text Desktop App for MacOS.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_6f160fbc5274.jpg\" alt=\"Pix2Text Mac App\" width=\"400px\"\u002F>\n\u003C\u002Fdiv>\n\n\n## A cup of coffee for the author\n\nIt is not easy to maintain and evolve the project, so if it is helpful to you, please consider [offering the author a cup of coffee 🥤](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fbuy-me-coffee).\n\n---\n\nOfficial code base: [https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text). Please cite it properly.\n\nFor more information on Pix2Text (P2T), visit: [https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fpix2text](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fpix2text).\n","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_bedb228c91aa.png\" width=\"220px\"\u002F>\n  \u003Cdiv>&nbsp;\u003C\u002Fdiv>\n\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1200765964434821260?label=Discord)](https:\u002F\u002Fdiscord.gg\u002FGgD87WM8Tf)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_984e42906fe3.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpix2text)\n[![Visitors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_1aa7c70054ee.png)](https:\u002F\u002Fvisitorbadge.io\u002Fstatus?path=https%3A%2F%2Fgithub.com%2Fbreezedeus%2FPix2Text)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fbreezedeus\u002Fpix2text)](.\u002FLICENSE)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fpix2text.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fpix2text)\n[![forks](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fbreezedeus\u002Fpix2text)](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text)\n[![stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fbreezedeus\u002Fpix2text)](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text)\n![last-release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease-date\u002Fbreezedeus\u002Fpix2text)\n![last-commit](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flast-commit\u002Fbreezedeus\u002Fpix2text)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl?url=https%3A%2F%2Ftwitter.com%2Fbreezedeus)](https:\u002F\u002Ftwitter.com\u002Fbreezedeus)\n\n[📖 文档](https:\u002F\u002Fpix2text.readthedocs.io) |\n[👩🏻‍💻 在线服务](https:\u002F\u002Fp2t.breezedeus.com) |\n[👨🏻‍💻 演示](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbreezedeus\u002FPix2Text-Demo) |\n[💬 联系](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fjoin-group)\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\n[中文](.\u002FREADME_cn.md) | 英文\n\n\u003C\u002Fdiv>\n\n\n\n# Pix2Text\n\n## 更新 2025.07.25：**V1.1.4** 发布\n\n主要更新：\n\n- 数学公式检测（MFD）和数学公式识别（MFR）模型升级至 1.5 版本。所有默认配置、文档和示例现均已采用 `mfd-1.5` 和 `mfr-1.5` 作为标准模型。\n\n## 更新 2025.04.15：**V1.1.3** 发布\n\n主要更新：\n\n- 支持基于 VLM 接口的 `VlmTableOCR` 和 `VlmTextFormulaOCR` 模型（详见 [LiteLLM 文档](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002F)），允许使用闭源 VLM 模型。安装命令：`pip install pix2text[vlm]`。\n  - 使用示例请参见 [tests\u002Ftest_vlm.py](tests\u002Ftest_vlm.py) 和 [tests\u002Ftest_pix2text.py](tests\u002Ftest_pix2text.py)。\n\n## 更新 2024.11.17：**V1.1.2** 发布\n\n主要更新：\n\n* 集成了新的版面分析模型 [DocLayout-YOLO](https:\u002F\u002Fgithub.com\u002Fopendatalab\u002FDocLayout-YOLO)，提升了版面分析的准确性。\n\n## 更新 2024.06.18：**V1.1.1** 发布\n\n主要变化：\n\n* 支持全新的数学公式检测模型（MFD）：[breezedeus\u002Fpix2text-mfd](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-mfd)（[镜像](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-mfd)），显著提高了公式检测的准确率。\n  查看详情：[Pix2Text V1.1.1 发布，带来更优秀的数学公式检测模型 | Breezedeus.com](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fp2t-mfd-v1.1.1)。\n\n## 更新 2024.04.28：**V1.1** 发布\n\n主要变化：\n\n* 新增了版面分析和表格识别模型，支持将复杂布局的图片转换为 Markdown 格式。示例请参见：[Pix2Text 在线文档 \u002F 示例](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fexamples_en\u002F)。\n* 增加了将整个 PDF 文件转换为 Markdown 格式的功能。示例请参见：[Pix2Text 在线文档 \u002F 示例](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fexamples_en\u002F)。\n* 对接口进行了增强，增加了更多功能，并调整了现有接口参数。\n* 正式上线了 [Pix2Text 在线文档](https:\u002F\u002Fpix2text.readthedocs.io)。\n\n## 更新 2024年2月26日：**V1.0** 正式发布\n\n主要更新：\n\n* 数学公式识别（MFR）模型采用了全新架构，并在新数据集上进行了训练，达到了当前最先进的准确率。详细信息请参阅：[Pix2Text V1.0 新版本发布：最佳开源公式识别模型 | Breezedeus.com](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fp2t-v1.0)。\n\n更多信息请查看：[RELEASE.md](docs\u002FRELEASE.md)。\n\n\u003Cbr\u002F>\n\n**Pix2Text (P2T)** 旨在成为 **Mathpix** 的一个 **免费且开源的 Python** 替代方案，并且已经能够实现 **Mathpix** 的核心功能。**Pix2Text (P2T)** 可以识别版面、表格、图像、文本、数学公式，并将所有这些内容整合为 Markdown 格式。此外，P2T 还可以将整份 PDF 文件（其中可能包含扫描图像或其他格式）转换为 Markdown 格式。\n\n**Pix2Text (P2T)** 集成了以下模型：\n\n- **版面分析模型**：[breezedeus\u002Fpix2text-layout](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-layout)（[镜像](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-layout)）。\n- **表格识别模型**：[breezedeus\u002Fpix2text-table-rec](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-table-rec)（[镜像](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-table-rec)）。\n- **文本识别引擎**：支持 **80多种语言**，如 **英语、简体中文、繁体中文、越南语** 等。对于英语和简体中文的识别，使用开源 OCR 工具 [CnOCR](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fcnocr)，而对于其他语言，则使用开源 OCR 工具 [EasyOCR](https:\u002F\u002Fgithub.com\u002FJaidedAI\u002FEasyOCR)。\n- **数学公式检测模型（MFD）**：[breezedeus\u002Fpix2text-mfd-1.5](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-mfd-1.5)（[镜像](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-mfd-1.5)）。基于 [CnSTD](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fcnstd) 实现。\n- **数学公式识别模型（MFR）**：[breezedeus\u002Fpix2text-mfr-1.5](https:\u002F\u002Fhuggingface.co\u002Fbreezedeus\u002Fpix2text-mfr-1.5)（[镜像](https:\u002F\u002Fhf-mirror.com\u002Fbreezedeus\u002Fpix2text-mfr-1.5)）。\n\n其中多个模型由其他开源项目作者贡献，我们对此表示衷心感谢。\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_7ffa10983877.jpg\" alt=\"Pix2Text 架构流程图\"\u002F>\n\u003C\u002Fdiv>\n\n如需详细说明，请参阅 [Pix2Text 在线文档\u002F模型](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fmodels\u002F)。\n\n\u003Cbr\u002F>\n\n作为一款 Python3 工具包，P2T 对于不熟悉 Python 的用户来说可能不太友好。因此，我们还提供了一个 **免费使用的 P2T 在线网页**：[p2t.breezedeus.com](https:\u002F\u002Fp2t.breezedeus.com)，您可以在上面直接上传图片并获取 P2T 的解析结果。该网页版本使用了最新的模型，性能相比开源版本更优。\n\n如果您感兴趣，欢迎扫描二维码添加助手为好友，并注明 `p2t`。助手会定期邀请大家加入群组，群内将发布与 P2T 工具相关的最新动态：\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_56dc5e74c6f0.jpg\" alt=\"微信二维码\" width=\"300px\"\u002F>\n\u003C\u002Fdiv>\n\n作者还维护着一个 **知识星球** [**P2T\u002FCnOCR\u002FCnSTD 私人社群**](https:\u002F\u002Ft.zsxq.com\u002FFEYZRJQ)，在这里问题能够得到及时解答，欢迎大家加入。该 **知识星球私人社群** 还会逐步发布一些与 P2T\u002FCnOCR\u002FCnSTD 相关的私密资料，包括 **部分未公开的模型**、**购买高级模型的折扣优惠**、**不同应用场景的代码片段**，以及使用过程中遇到的疑难问题解答。同时，星球也会分享与 P2T\u002FOCR\u002FSTD 相关的最新研究资料。\n\n更多联系方式请参阅 [联系我们](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fcontact\u002F)。\n\n## 支持的语言列表\n\nPix2Text 的文本识别引擎支持 **`80+` 种语言**，包括 **英语、简体中文、繁体中文、越南语** 等。其中，**英语** 和 **简体中文** 的识别使用了开源 OCR 工具 **[CnOCR](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fcnocr)**，而其他语言的识别则采用了开源 OCR 工具 **[EasyOCR](https:\u002F\u002Fgithub.com\u002FJaidedAI\u002FEasyOCR)**。在此特别感谢两位作者。\n\n以下是 **支持的语言** 及其 **语言代码** 列表：\n\n\u003Cdetails>\n\u003Csummary>↓↓↓ 点击展开详情 ↓↓↓\u003C\u002Fsummary>\n\n| 语言            | 代码名称   |\n| ------------------- | ----------- |\n| 阿巴扎语               | abq         |\n| 阿迪格语              | ady         |\n| 南非语           | af          |\n| 安吉卡语              | ang         |\n| 阿拉伯语              | ar          |\n| 阿萨姆语            | as          |\n| 阿瓦尔语                | ava         |\n| 阿塞拜疆语         | az          |\n| 白俄罗斯语          | be          |\n| 保加利亚语           | bg          |\n| 比哈尔语              | bh          |\n| 博杰普里语            | bho         |\n| 孟加拉语             | bn          |\n| 波斯尼亚语             | bs          |\n| 简体中文  | ch_sim      |\n| 繁体中文 | ch_tra      |\n| 车臣语             | che         |\n| 捷克语               | cs          |\n| 威尔士语               | cy          |\n| 丹麦语              | da          |\n| 达尔金语              | dar         |\n| 德语              | de          |\n| 英语             | en          |\n| 西班牙语             | es          |\n| 爱沙尼亚语            | et          |\n| 波斯语（法尔西语）     | fa          |\n| 法语              | fr          |\n| 爱尔兰语               | ga          |\n| 果阿孔卡尼语        | gom         |\n| 印地语               | hi          |\n| 克罗地亚语            | hr          |\n| 匈牙利语           | hu          |\n| 印度尼西亚语          | id          |\n| 因古什语              | inh         |\n| 冰岛语               | is          |\n| 意大利语             | it          |\n| 日语                | ja          |\n| 卡巴尔达语           | kbd         |\n| 坎那达语             | kn          |\n| 韩语                | ko          |\n| 库尔德语             | ku          |\n| 拉丁语               | la          |\n| 拉克语                 | lbe         |\n| 列兹金语              | lez         |\n| 立陶宛语          | lt          |\n| 拉脱维亚语             | lv          |\n| 马嘎希语              | mah         |\n| 迈蒂利语            | mai         |\n| 毛利语               | mi          |\n| 蒙古语               | mn          |\n| 马拉地语             | mr          |\n| 马来语               | ms          |\n| 马耳他语             | mt          |\n| 尼泊尔语              | ne          |\n| 新瓦里语              | new         |\n| 荷兰语               | nl          |\n| 挪威语               | no          |\n| 奥克西塔尼语          | oc          |\n| 巴利语                | pi          |\n| 波兰语               | pl          |\n| 葡萄牙语             | pt          |\n| 罗马尼亚语            | ro          |\n| 俄语                | ru          |\n| 塞尔维亚语（西里尔字母）  | rs_cyrillic |\n| 塞尔维亚语（拉丁字母）     | rs_latin    |\n| 纳格浦里语            | sck         |\n| 斯洛伐克语           | sk          |\n| 斯洛文尼亚语           | sl          |\n| 阿尔巴尼亚语            | sq          |\n| 瑞典语               | sv          |\n| 斯瓦希里语             | sw          |\n| 泰米尔语             | ta          |\n| 塔巴萨兰语           | tab         |\n| 泰卢固语              | te          |\n| 泰语                | th          |\n| 塔吉克语              | tjk         |\n| 他加禄语              | tl          |\n| 土耳其语             | tr          |\n| 维吾尔语              | ug          |\n| 乌克兰语              | uk          |\n| 乌尔都语              | ur          |\n| 乌兹别克语             | uz          |\n| 越南语              | vi          |\n\n\n> 参考：[支持的语言](https:\u002F\u002Fwww.jaided.ai\u002Feasyocr\u002F)。\n\n\u003C\u002Fdetails>\n\n\n\n## 在线服务\n\n大家可以免费使用 **[P2T 在线服务](https:\u002F\u002Fp2t.breezedeus.com)**，每个账号每天有 10,000 字符的使用限制，对于一般用途来说已经足够。*请勿进行批量 API 调用，因为机器资源有限，这可能会导致其他人无法访问该服务。*\n\n由于硬件限制，在线服务目前仅支持 **简体中文** 和 **英语**。如需尝试其他语言的模型，请使用以下 **在线演示**。\n\n## 在线演示 🤗\n\n您也可以尝试 **[在线演示](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbreezedeus\u002FPix2Text-Demo)**，查看 **P2T** 在各种语言中的表现。不过，在线演示运行在较低的硬件配置上，速度可能会较慢。对于简体中文或英语图像，建议使用 **[P2T 在线服务](https:\u002F\u002Fp2t.breezedeus.com)**。\n\n## 示例\n\n请参阅：[Pix2Text 在线文档\u002F示例](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fexamples_en\u002F)。\n\n## 使用方法\n\n请参阅：[Pix2Text 在线文档\u002F使用方法](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fusage\u002F)。\n\n## 模型\n\n请参阅：[Pix2Text 在线文档\u002F模型](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fmodels\u002F)。\n\n## 安装\n\n如果一切顺利，只需一行命令即可完成安装。\n\n```bash\npip install pix2text\n```\n\n如果您需要识别除 **英语** 和 **简体中文** 之外的语言，请使用以下命令安装额外的包：\n\n```bash\npip install pix2text[multilingual]\n```\n\n如果安装速度较慢，可以指定安装源，例如使用阿里云镜像：\n\n```bash\npip install pix2text -i https:\u002F\u002Fmirrors.aliyun.com\u002Fpypi\u002Fsimple\n```\n\n更多信息请参考：[Pix2Text 在线文档\u002F安装](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Finstall\u002F)。\n\n## 命令行工具\n\n请参阅：[Pix2Text 在线文档\u002F命令行工具](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fcommand\u002F)。\n\n## HTTP 服务\n\n请参阅：[Pix2Text 在线文档\u002F命令行工具\u002F启动服务](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002Fcommand\u002F)。\n\n## macOS 桌面应用\n\n请参考 [Pix2Text-Mac](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text-Mac) 来安装适用于 macOS 的 Pix2Text 桌面应用。\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_readme_6f160fbc5274.jpg\" alt=\"Pix2Text Mac App\" width=\"400px\"\u002F>\n\u003C\u002Fdiv>\n\n\n## 为作者点一杯咖啡\n\n维护和推进这个项目并不容易，因此如果您觉得它对您有所帮助，请考虑 [为作者点一杯咖啡 🥤](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fbuy-me-coffee)。\n\n---\n\n官方代码库：[https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002Fpix2text)。请正确引用。\n\n更多关于 Pix2Text (P2T) 的信息，请访问：[https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fpix2text](https:\u002F\u002Fwww.breezedeus.com\u002Farticle\u002Fpix2text)。","# Pix2Text 快速上手指南\n\nPix2Text (P2T) 是一款免费开源的 Python 工具，旨在作为 Mathpix 的替代品。它能够识别图片中的布局、表格、文本和数学公式，并将其整合输出为 Markdown 格式，支持将整本 PDF 文件转换为 Markdown。\n\n## 环境准备\n\n*   **操作系统**：Linux, macOS, Windows\n*   **Python 版本**：Python 3.8+\n*   **前置依赖**：\n    *   建议先安装 PyTorch（CPU 或 GPU 版本）。若未安装，`pip` 安装时会自动尝试安装 CPU 版本。\n    *   如需使用基于 VLM（视觉语言模型）的高级功能（如 `VlmTableOCR`），需额外安装相关依赖。\n\n## 安装步骤\n\n推荐使用国内镜像源以加速下载。\n\n### 1. 基础安装\n安装核心功能（包含布局分析、表格识别、OCR 及公式识别）：\n\n```bash\npip install pix2text -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 2. 可选：安装 VLM 支持\n如果需要调用闭源 VLM 模型进行更复杂的表格或公式识别：\n\n```bash\npip install \"pix2text[vlm]\" -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n> **注意**：模型文件会在首次运行时自动从 Hugging Face 下载。如果网络受限，可配置 Hugging Face 镜像环境变量：\n> ```bash\n> export HF_ENDPOINT=https:\u002F\u002Fhf-mirror.com\n> ```\n\n## 基本使用\n\n### 示例 1：识别单张图片\n最简单的用法是直接对包含公式或复杂排版的图片进行识别，输出 Markdown 内容。\n\n```python\nfrom pix2text import Pix2Text\n\n# 初始化 P2T 实例\np2t = Pix2Text()\n\n# 识别图片并输出 Markdown 文本\nimg_path = 'examples\u002Fformula.jpg'\nresult = p2t.recognize(img_path)\n\nprint(result)\n```\n\n### 示例 2：转换整个 PDF 文件\n支持将扫描版或电子版 PDF 直接转换为 Markdown 文件。\n\n```python\nfrom pix2text import Pix2Text\n\np2t = Pix2Text()\n\n# 将 PDF 转换为 Markdown 文件\npdf_path = 'examples\u002Fsample.pdf'\noutput_md_path = 'output.md'\n\np2t.recognize_pdf(pdf_path, output_md_path)\nprint(f\"转换完成，文件保存至：{output_md_path}\")\n```\n\n### 示例 3：指定语言识别\nPix2Text 支持 80+ 种语言。默认情况下，英文和简体中文使用 `CnOCR`，其他语言使用 `EasyOCR`。\n\n```python\nfrom pix2text import Pix2Text\n\n# 初始化时指定语言代码，例如繁体中文 ('ch_tra') 或日文 ('ja')\np2t = Pix2Text(lang='ch_tra')\n\nresult = p2t.recognize('traditional_chinese_image.png')\nprint(result)\n```\n\n> **提示**：更多高级用法（如自定义模型版本、调整参数）请参考 [官方文档](https:\u002F\u002Fpix2text.readthedocs.io\u002Fzh-cn\u002Fstable\u002F)。","一位数据科学研究员正在整理包含复杂数学公式、表格和多栏排版的英文学术论文 PDF，急需将其转换为可编辑的 Markdown 格式以便复现代码和引用文献。\n\n### 没有 Pix2Text 时\n- **公式识别困难**：遇到行内或独立的数学公式只能手动截图或使用昂贵的 Mathpix 服务，且无法直接生成标准的 LaTeX 代码。\n- **表格结构丢失**：普通 OCR 工具将表格识别为混乱的纯文本，行列关系完全错乱，需要人工重新绘制表格。\n- **排版逻辑混乱**：双栏或多栏论文被错误地按行读取，导致句子断裂、段落顺序颠倒，后期校对耗时极长。\n- **多语言支持弱**：若论文中包含非英语的术语或注释，传统工具往往识别率极低甚至直接乱码。\n- **成本与门槛高**：高质量转换依赖付费 API 或繁琐的本地部署流程，难以批量处理大量文献。\n\n### 使用 Pix2Text 后\n- **公式自动转 LaTeX**：Pix2Text 内置的高精度模型能精准检测并识别数学公式，直接输出可编译的 LaTeX 源码，无缝嵌入 Markdown。\n- **表格完美还原**：利用专用的表格识别模型，自动解析单元格结构并转换为 Markdown 表格格式，保留完整数据逻辑。\n- **智能布局分析**：基于 DocLayout-YOLO 模型，Pix2Text 能准确理解双栏及复杂版面，按正确的阅读顺序重组文本段落。\n- **全球语言覆盖**：支持 80 多种语言的混合识别，无论是英文正文还是其他语言的标注都能准确转录。\n- **免费批量处理**：作为开源免费方案，研究者可在本地一键将整个文件夹的 PDF 批量转为 Markdown，大幅降低时间与经济成本。\n\nPix2Text 通过一站式解决布局、表格、公式和文本的识别难题，让科研人员能以零成本将视觉文档高效转化为结构化知识。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbreezedeus_Pix2Text_6f160fbc.jpg","breezedeus","Breezedeus","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fbreezedeus_a3ae84dc.png","善意的AI生产幸福❤️",null,"Beijing","www.breezedeus.com","https:\u002F\u002Fgithub.com\u002Fbreezedeus",[81,85,89],{"name":82,"color":83,"percentage":84},"Jupyter Notebook","#DA5B0B",82.2,{"name":86,"color":87,"percentage":88},"Python","#3572A5",17.8,{"name":90,"color":91,"percentage":92},"Makefile","#427819",0.1,3099,268,"2026-04-19T12:07:44","MIT","未说明","未说明（但集成深度学习模型如 MFD\u002FMFR\u002FLayout，通常建议配备 NVIDIA GPU 以加速推理）",{"notes":100,"python":101,"dependencies":102},"该工具是一个 Python3 工具箱，旨在作为 Mathpix 的开源替代品。它集成了布局分析、表格识别、文本识别（支持 80+ 语言）、数学公式检测（MFD）和数学公式识别（MFR）模型。默认使用 mfd-1.5 和 mfr-1.5 模型。支持通过 pip install pix2text[vlm] 安装以使用基于 VLM 接口的闭源模型。首次运行需从 Hugging Face 下载模型文件。非 Python 用户可使用其提供的免费在线 Web 服务。","Python 3",[103,104,105,106,107],"CnOCR","EasyOCR","CnSTD","DocLayout-YOLO","LiteLLM (可选，用于 VLM 支持)",[15,14],[110,111,112,113,114,115,116,117,118,119,120,121],"math-formula","ocr","latex","math-formula-recognition","mathpix","python","pytorch","layout-analysis","math-ocr","table-ocr","image-to-markdown","latex-pdf","2026-03-27T02:49:30.150509","2026-04-20T04:05:15.675414",[125,130,135,140,145,150],{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},43789,"调用 Pix2Text 时遇到 `model_kwargs` are not used by the model 错误怎么办？","这是由于 transformers 版本过低（\u003C=4.37.2）不支持该参数导致的。解决方法有两种：\n1. 将 transformers 升级到 >=4.38.0 版本。\n2. 或者直接升级 Pix2Text 到最新版（>=1.0.2.2），新版已修复此兼容性问题，无需强制升级 transformers。\n安装命令：\npip install pix2text==1.0.2.2 -i https:\u002F\u002Fpypi.org\u002Fsimple","https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F81",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},43790,"识别图片时报错 `IndexError: list index out of range` 是什么原因？","该问题通常发生在某些图片没有识别出任何文本框时，后处理逻辑尝试访问空列表导致索引越界。此问题已在 Pix2Text v1.0.2.3 及更高版本中修复。\n解决方案：请更新 Pix2Text 到最新版本。\n命令：pip install --upgrade pix2text","https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F84",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},43791,"如何配置 Pix2Text 以解决 CUDA 加速无效或识别速度慢的问题？","如果发现识别速度慢或 CUDA 未生效，可能是 cnocr 中的文字识别模型默认使用了 ONNX 后端。可以尝试将文字识别模型后端指定为 'pytorch' 来提升性能或使用 GPU 加速。\n配置示例代码如下：\n```python\nfrom pix2text import Pix2Text\n\ntext_formula_config = dict(\n    text=dict(rec_model_backend='pytorch'),  # 关键配置：使用 pytorch 后端\n)\ntotal_config = {\n    'layout': {'scores_thresh': 0.35},\n    'text_formula': text_formula_config,\n}\np2t = Pix2Text.from_config(total_configs=total_config)\n```\n注意：请确保安装了 pix2text>=1.1.1 版本。","https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F121",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},43792,"识别结果在“通用文本”和“公式”之间不稳定，能否指定识别模型类型？","目前可以通过传入特定参数来尝试控制识别行为，但根本的准确率提升依赖于模型本身。维护者建议：\n1. 使用更多的训练数据。\n2. 使用更大的模型版本以获得更好的分类和识别效果。\n对于特定的公式识别需求，确保输入图片的裁剪范围尽量准确，或者在代码逻辑中根据场景手动选择调用公式识别接口而非自动检测接口。","https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F2",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},43793,"处理文档布局分析时出现列表为空导致的索引错误或逻辑异常怎么办？","这通常发生在计算列重叠（overlap）时，如果没有检测到任何重叠值，直接排序取值会导致错误。可以通过修改源码增加空值判断来临时修复。\n修复代码示例（针对 `pix_to_text.py` 相关逻辑）：\n```python\nfor _box_info in _out:\n    overlap_vals = []\n    for col_number, col_info in column_meta.items():\n        overlap_val = x_overlap(_box_info, col_info, key='position')\n        overlap_vals.append([col_number, overlap_val])\n    \n    if len(overlap_vals) > 0:\n        overlap_vals.sort(key=lambda x: (x[1], x[0]), reverse=True)\n        match_col_number = overlap_vals[0][0]\n    else:\n        match_col_number = 0  # 当无重叠时赋予默认值\n    \n    _box_info['col_number'] = match_col_number\n```\n建议关注官方后续版本更新，此类边界情况通常会在新版本中被修复。","https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F111",{"id":151,"question_zh":152,"answer_zh":153,"source_url":144},43794,"如何提高行内公式（inline formula）与独立公式的识别区分效果？","行内公式识别效果受限于模型训练数据和模型容量。维护者指出，提高识别效果的主要途径是：\n1. 使用包含更多样化行内公式样本的数据集进行训练或微调。\n2. 使用参数量更大、能力更强的预训练模型。\n目前暂无简单的配置开关能完美解决所有场景下的区分问题，主要依赖模型本身的泛化能力。",[155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250],{"id":156,"version":157,"summary_zh":158,"released_at":159},351222,"v1.1.6","# 更新 2026.02.07：**V1.1.6** 已发布\n\n主要变更：\n\n- `Pix2Text` 类现在支持通过 `__init__` 直接进行基于配置的初始化，参数与 `from_config()` 相同。用户现在可以使用 `Pix2Text(total_configs=..., enable_table=True, device='cuda')` 代替 `Pix2Text.from_config(...)`。","2026-02-07T11:13:23",{"id":161,"version":162,"summary_zh":163,"released_at":164},351223,"v1.1.5","# 更新 2026.02.07：**V1.1.5** 已发布\n\n主要变更：\n\n- 重构了模型下载逻辑，改用 `huggingface_hub.snapshot_download()`，并支持镜像列表按顺序回退（优先官方地址）。","2026-02-07T10:45:54",{"id":166,"version":167,"summary_zh":168,"released_at":169},351224,"v1.1.4","\r\n# 更新 2025.07.25：**V1.1.4** 发布\r\n\r\n主要变更：\r\n\r\n- 数学公式检测（MFD）和数学公式识别（MFR）模型升级到 1.5 版本，所有默认配置、文档和示例均以 `mfd-1.5` 和 `mfr-1.5` 为标准模型。","2025-07-24T16:02:14",{"id":171,"version":172,"summary_zh":173,"released_at":174},351225,"v1.1.3.2","# 更新 2025.05.06：**V1.1.3.2** 已发布\n\n主要变更：\n\n- 修复了处理透明图片时可能出现的错误，具体见 [#171](https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F171) 。","2025-05-07T15:22:54",{"id":176,"version":177,"summary_zh":178,"released_at":179},351226,"v1.1.3.1","# 更新 2025年4月27日：**V1.1.3.1** 版本发布\n\n主要变更：\n\n- 修复了 VLM 相关的模型导入问题。","2025-04-27T11:43:47",{"id":181,"version":182,"summary_zh":183,"released_at":184},351227,"v1.1.3","# 更新 2025.04.15：**V1.1.3** 发布\n\n主要变更：\n\n- 支持基于 VLM 接口（具体参考 [LiteLLM 文档](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002F)）的 `VlmTableOCR` 和 `VlmTextFormulaOCR` 模型，可使用闭源 VLM 模型。安装命令：`pip install pix2text[vlm]`。\n  - 使用方式见 [tests\u002Ftest_vlm.py](tests\u002Ftest_vlm.py) 和 [tests\u002Ftest_pix2text.py](tests\u002Ftest_pix2text.py)。","2025-04-15T15:35:31",{"id":186,"version":187,"summary_zh":188,"released_at":189},351228,"v1.1.2.3","# 更新 2024年12月17日：**V1.1.2.3** 发布\n\n主要变更：\n\n- 修复了在 Windows 环境下下载模型的问题。","2024-12-17T14:32:24",{"id":191,"version":192,"summary_zh":193,"released_at":194},351229,"v1.1.2.2","# 更新 2024年12月11日：**V1.1.2.2** 已发布\n\n主要变更：\n\n- 修复了与 ONNX Runtime session options 相关的序列化错误，通过确保不可序列化的配置信息在适当的管理下进行处理。","2024-12-11T13:40:42",{"id":196,"version":197,"summary_zh":198,"released_at":199},351230,"v1.1.2.1","# 更新 2024.12.02：**V1.1.2.1** 已发布\n\n主要变更：\n\n* 修复了 fetch_column_info()@DocYoloLayoutParser 中的错误，感谢网友 Bin 。","2024-12-02T15:32:00",{"id":201,"version":202,"summary_zh":203,"released_at":204},351231,"v1.1.2","# 更新 2024.11.17：**V1.1.2** 已发布\r\n\r\n主要变更：\r\n\r\n* 集成了新的版面分析模型 [DocLayout-YOLO](https:\u002F\u002Fgithub.com\u002Fopendatalab\u002FDocLayout-YOLO)，提升了版面分析的准确性。\r\n* 修复了以下问题：\r\n  * 当文本语言仅设置为英语时，会使用专门的英文 OCR 模型，以避免输出中包含中文。  \r\n  * 优化了 PNG 图像的处理逻辑，进一步提升了识别性能。\r\n\r\n\r\n主要变更：\r\n\r\n* 版面分析模型加入 [DocLayout-YOLO](https:\u002F\u002Fgithub.com\u002Fopendatalab\u002FDocLayout-YOLO)，提升版面分析的准确性。\r\n* 修复 bugs：\r\n  * 在设置文本语言只有英语时，使用专门的英文 OCR 模型，避免输出中包含中文。\r\n  * 对 PNG 图片的处理逻辑进行了优化，提升了识别效果。\r\n\r\n","2024-11-16T15:05:15",{"id":206,"version":207,"summary_zh":208,"released_at":209},351232,"v1.1.1.2","# Update 2024.07.18: **V1.1.1.2** Released\r\n\r\nMajor Changes:\r\n\r\n* fix bugs：\r\n    * https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F129\r\n    * https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F116\r\n\r\n主要变更：\r\n\r\n* 修复 bugs：\r\n  * https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F129\r\n  * https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fissues\u002F116","2024-07-18T05:36:39",{"id":211,"version":212,"summary_zh":213,"released_at":214},351233,"v1.1.1.1","# Update 2024.06.24: **V1.1.1.1** Released\r\n\r\nMajor Changes:\r\n\r\n* Added a new parameter `static_resized_shape` when initializing `MathFormulaDetector`, which is used to resize the input image to a fixed size. Some formats of models require fixed-size input images during inference, such as `CoreML`.\r\n\r\n主要变更：\r\n\r\n* `MathFormulaDetector` 初始化时加入了参数 `static_resized_shape`, 用于把输入图片 resize 为固定大小。某些格式的模型在推理时需要固定大小的输入图片，如 `CoreML`。\r\n\r\n","2024-06-24T15:09:26",{"id":216,"version":217,"summary_zh":218,"released_at":219},351234,"v1.1.1","## Update 2024.06.18：**V1.1.1** Released\r\n\r\nMajor changes:\r\n\r\n* Support the new mathematical formula detection models (MFD), which significantly improves the accuracy of formula detection.\r\n\r\n\r\n主要变更：\r\n\r\n* 支持新的数学公式检测模型（MFD），公式检测精度获得较大提升。","2024-06-18T15:33:15",{"id":221,"version":222,"summary_zh":223,"released_at":224},351235,"v1.1.0.7","## Update 2024.06.17：**V1.1.0.7** Released\r\n\r\nMajor changes:\r\n\r\n* adapted with cnstd==1.2.4 , thanks to https:\u002F\u002Fgithub.com\u002Fg1y5x3 .\r\n\r\n主要变更：\r\n\r\n* 适配 cnstd==1.2.4 ，感谢 https:\u002F\u002Fgithub.com\u002Fg1y5x3 。","2024-06-17T02:25:21",{"id":226,"version":227,"summary_zh":228,"released_at":229},351236,"v1.1.0.6","## Update 2024.06.04：**V1.1.0.6** Released\r\n\r\nMajor changes:\r\n\r\n* Fix: The Text OCR incorrectly carried over the configuration from previous calls when it was called multiple times.\r\n\r\n主要变更：\r\n\r\n* 修复 bug：Text OCR 多次调用时错误沿用了之前的配置信息。","2024-06-04T10:14:55",{"id":231,"version":232,"summary_zh":233,"released_at":234},351237,"v1.1.0.5","## Update 2024.05.27：**V1.1.0.5** Released\r\n\r\nMajor changes:\r\n\r\n* Fixed bugs such as that in `._parse_remaining`.\r\n\r\n主要变更：\r\n\r\n* 修复 `._parse_remaining` 等 bug。","2024-05-27T04:10:38",{"id":236,"version":237,"summary_zh":238,"released_at":239},351238,"v1.1.0.4","Major changes:\r\n\r\n* set `table_as_image` as `True` if `self.table_ocr` is not available.\r\n* fix typo: https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fpull\u002F108 . Thanks to [@billvsme](https:\u002F\u002Fgithub.com\u002Fbillvsme).\r\n\r\n主要变更：\r\n\r\n* 如果 `self.table_ocr` 不可用，将 `table_as_image` 设置为 `True`。\r\n* 修复拼写错误：https:\u002F\u002Fgithub.com\u002Fbreezedeus\u002FPix2Text\u002Fpull\u002F108 。感谢 [@billvsme](https:\u002F\u002Fgithub.com\u002Fbillvsme)。\r\n\r\n","2024-05-20T15:18:54",{"id":241,"version":242,"summary_zh":243,"released_at":244},351239,"v1.1.0.3","Major changes:\r\n\r\n* A new paid model, `mfr-plus`, has been added, which offers better recognition for multi-line formulas.\r\n* When recognizing only English, CnOCR does not output Chinese.\r\n* Bugs have been fixed.\r\n\r\n主要变更：\r\n\r\n* 加入新的付费模型：`mfr-plus`，对多行公式的识别效果更好。\r\n* 在只识别英文时，CnOCR 不输出中文。\r\n* 修复 bugs。","2024-05-19T09:22:56",{"id":246,"version":247,"summary_zh":248,"released_at":249},351240,"v1.1.0.2","Major changes:\r\n\r\n* Fixed the error caused by empty lines in `merge_line_texts`.\r\n\r\n主要变更：\r\n\r\n* 修复 `merge_line_texts` 中空行导致的错误。","2024-05-10T08:31:39",{"id":251,"version":252,"summary_zh":253,"released_at":254},351241,"v1.1.0.1","Major changes:\r\n\r\n* Fix the exception occurring when saving files on Windows.\r\n\r\n主要变更： \r\n\r\n* 修复 Windows 下存储文件时出现的异常。","2024-04-30T03:17:58"]