This commit is contained in:
200
docs/update/update.en.md
Normal file
200
docs/update/update.en.md
Normal file
@@ -0,0 +1,200 @@
|
||||
---
|
||||
comments: true
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
---
|
||||
|
||||
### Recently Update
|
||||
#### **2025.06.29: Release of PaddleOCR 3.1.0**, includes:
|
||||
|
||||
- **Key Models and Pipelines:**
|
||||
- **Added PP-OCRv5 Multilingual Text Recognition Model**, which supports the training and inference process for text recognition models in 37 languages, including French, Spanish, Portuguese, Russian, Korean, etc. **Average accuracy improved by over 30%.** [Details](https://paddlepaddle.github.io/PaddleOCR/latest/en/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.html)
|
||||
- Upgraded the **PP-Chart2Table model** in PP-StructureV3, further enhancing the capability of converting charts to tables. On internal custom evaluation sets, the metric (RMS-F1) **increased by 9.36 percentage points (71.24% -> 80.60%).**
|
||||
- Newly launched **document translation pipeline, PP-DocTranslation, based on PP-StructureV3 and ERNIE 4.5 Turbo**, which supports the translation of Markdown format documents, various complex-layout PDF documents, and document images, with the results saved as Markdown format documents. [Details](https://paddlepaddle.github.io/PaddleOCR/latest/en/version3.x/pipeline_usage/PP-DocTranslation.html)
|
||||
|
||||
|
||||
- **New MCP server:** [Details](https://paddlepaddle.github.io/PaddleOCR/latest/en/version3.x/deployment/mcp_server.html)
|
||||
- **Supports both OCR and PP-StructureV3 pipelines.**
|
||||
- Supports three working modes: local Python library, AIStudio Community Cloud Service, and self-hosted service.
|
||||
- Supports invoking local services via stdio and remote services via Streamable HTTP.
|
||||
|
||||
- **Documentation Optimization:** Improved the descriptions in some user guides for a smoother reading experience.
|
||||
|
||||
|
||||
#### **2025.06.26: Release of PaddleOCR 3.0.3**, includes:
|
||||
|
||||
- Bug Fix: Resolved the issue where the `enable_mkldnn` parameter was not effective, restoring the default behavior of using MKL-DNN for CPU inference.
|
||||
|
||||
#### ** 2025.06.19: Release of PaddleOCR v3.0.2, which includes:**
|
||||
|
||||
- **New Features:**
|
||||
|
||||
- The default download source has been changed from `BOS` to `HuggingFace`. Users can also change the environment variable `PADDLE_PDX_MODEL_SOURCE` to `BOS` to set the model download source back to Baidu Object Storage (BOS).
|
||||
- Added service invocation examples for six languages—C++, Java, Go, C#, Node.js, and PHP—for pipelines like PP-OCRv5, PP-StructureV3, and PP-ChatOCRv4.
|
||||
- Improved the layout partition sorting algorithm in the PP-StructureV3 pipeline, enhancing the sorting logic for complex vertical layouts to deliver better results.
|
||||
- Enhanced model selection logic: when a language is specified but a model version is not, the system will automatically select the latest model version supporting that language.
|
||||
- Set a default upper limit for MKL-DNN cache size to prevent unlimited growth, while also allowing users to configure cache capacity.
|
||||
- Updated default configurations for high-performance inference to support Paddle MKL-DNN acceleration and optimized the logic for automatic configuration selection for smarter choices.
|
||||
- Adjusted the logic for obtaining the default device to consider the actual support for computing devices by the installed Paddle framework, making program behavior more intuitive.
|
||||
- Added Android example for PP-OCRv5. [Details](https://paddlepaddle.github.io/PaddleOCR/latest/en/version3.x/deployment/on_device_deployment.html).
|
||||
|
||||
- **Bug Fixes:**
|
||||
|
||||
- Fixed an issue with some CLI parameters in PP-StructureV3 not taking effect.
|
||||
- Resolved an issue where `export_paddlex_config_to_yaml` would not function correctly in certain cases.
|
||||
- Corrected the discrepancy between the actual behavior of `save_path` and its documentation description.
|
||||
- Fixed potential multithreading errors when using MKL-DNN in basic service deployment.
|
||||
- Corrected channel order errors in image preprocessing for the Latex-OCR model.
|
||||
- Fixed channel order errors in saving visualized images within the text recognition module.
|
||||
- Resolved channel order errors in visualized table results within PP-StructureV3 pipeline.
|
||||
- Fixed an overflow issue in the calculation of `overlap_ratio` under extremely special circumstances in the PP-StructureV3 pipeline.
|
||||
|
||||
- **Documentation Improvements:**
|
||||
|
||||
- Updated the description of the `enable_mkldnn` parameter in the documentation to accurately reflect the program's actual behavior.
|
||||
- Fixed errors in the documentation regarding the `lang` and `ocr_version` parameters.
|
||||
- Added instructions for exporting production line configuration files via CLI.
|
||||
- Fixed missing columns in the performance data table for PP-OCRv5.
|
||||
- Refined benchmark metrics for PP-StructureV3 pipeline across different configurations.
|
||||
|
||||
- **Others:**
|
||||
|
||||
- Relaxed version restrictions on dependencies like numpy and pandas, restoring support for Python 3.12.
|
||||
|
||||
#### ** 2025.06.05: Release of PaddleOCR v3.0.1, which includes:**
|
||||
|
||||
- **Optimisation of certain models and model configurations:**
|
||||
- Updated the default model configuration for PP-OCRv5, changing both detection and recognition from mobile to server models. To improve default performance in most scenarios, the parameter `limit_side_len` in the configuration has been changed from 736 to 64.
|
||||
- Added a new text line orientation classification model `PP-LCNet_x1_0_textline_ori` with an accuracy of 99.42%. The default text line orientation classifier for OCR, PP-StructureV3, and PP-ChatOCRv4 pipelines has been updated to this model.
|
||||
- Optimised the text line orientation classification model `PP-LCNet_x0_25_textline_ori`, improving accuracy by 3.3 percentage points to a current accuracy of 98.85%.
|
||||
|
||||
- **Optimisation of issues present in version 3.0.0:**
|
||||
- **Improved CLI usage experience:** When using the PaddleOCR CLI without passing any parameters, a usage prompt is now provided.
|
||||
- **New parameters added:** PP-ChatOCRv3 and PP-StructureV3 now support the `use_textline_orientation` parameter.
|
||||
- **CPU inference speed optimisation:** All pipeline CPU inferences now enable MKL-DNN by default.
|
||||
- **Support for C++ inference:** The detection and recognition concatenation part of PP-OCRv5 now supports C++ inference.
|
||||
|
||||
- **Fixes for issues present in version 3.0.0:**
|
||||
- Fixed an issue where PP-StructureV3 encountered CPU inference errors due to the inability to use MKL-DNN with formula and table recognition models.
|
||||
- Fixed an issue where GPU environments encountered the error `FatalError: Process abort signal is detected by the operating system` during inference.
|
||||
- Fixed type hint issues in some Python 3.8 environments.
|
||||
- Fixed the issue where the method `PPStructureV3.concatenate_markdown_pages` was missing.
|
||||
- Fixed an issue where specifying both `lang` and `model_name` when instantiating `paddleocr.PaddleOCR` resulted in `model_name` being ineffective.
|
||||
|
||||
#### ** 2025.05.20: PaddleOCR 3.0 Official Release Highlights**
|
||||
|
||||
- **PP-OCRv5: All-Scene Text Recognition Model**
|
||||
- Supports five text types and complex handwriting in a single model.
|
||||
- Achieves a 13% accuracy improvement over the previous generation.
|
||||
|
||||
- **PP-StructureV3: General Document Parsing Solution**
|
||||
- Offers high-precision parsing for multi-scene, multi-layout PDFs.
|
||||
- Outperforms numerous open and closed-source solutions in public benchmarks.
|
||||
|
||||
- **PP-ChatOCRv4: Intelligent Document Understanding Solution**
|
||||
- Natively supports ERNIE 4.5 Turbo.
|
||||
- Delivers a 15% accuracy boost over the previous version.
|
||||
|
||||
- **Rebuilt Deployment Capabilities with Unified Inference Interface:**
|
||||
- Integrates PaddleX3.0's core features for a comprehensive upgrade of the inference and deployment modules.
|
||||
- Optimizes the design from version 2.x and unifies the Python API and CLI.
|
||||
- Supports high-performance inference, serving, and on-device deployment scenarios.
|
||||
|
||||
- **Optimized Training with PaddlePaddle Framework 3.0:**
|
||||
- Compatible with the latest features such as the CINN compiler.
|
||||
- Inference model files now use `xxx.json` instead of `xxx.pdmodel`.
|
||||
|
||||
- **Unified Model Naming:**
|
||||
- Updated naming conventions for models supported by PaddleOCR 3.0 for consistency and easier maintenance.
|
||||
|
||||
- For more details, check out the [Upgrade Notes from 2.x to 3.x](./upgrade_notes.en.md).
|
||||
|
||||
#### **2025.3.7 release PaddleOCR v2.10, including**:
|
||||
|
||||
- **12 new self-developed single models:**
|
||||
- **[Layout Detection](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/layout_detection.html)** series with 3 models: PP-DocLayout-L, PP-DocLayout-M, PP-DocLayout-S, supporting prediction of 23 common layout categories. High-quality layout detection for various document types such as papers, reports, exams, books, magazines, contracts, newspapers in both English and Chinese. **mAP@0.5 reaches up to 90.4%, lightweight models can process over 100 pages of document images per second end-to-end.**
|
||||
- **[Formula Recognition](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/formula_recognition.html)** series with 2 models: PP-FormulaNet-L, PP-FormulaNet-S, supporting 50,000 common LaTeX vocabulary, capable of recognizing complex printed and handwritten formulas. **PP-FormulaNet-L has 6 percentage points higher accuracy than models of the same level, and PP-FormulaNet-S is 16 times faster than models with similar accuracy.**
|
||||
- **[Table Structure Recognition](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/table_structure_recognition.html)** series with 2 models: SLANeXt_wired, SLANeXt_wireless. A newly developed table structure recognition model, supporting structured prediction for both wired and wireless tables. Compared to SLANet_plus, SLANeXt shows significant improvement in table structure, **with 6 percentage points higher accuracy on internal high-difficulty table recognition evaluation sets.**
|
||||
- **[Table Classification](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/table_classification.html)** series with 1 model: PP-LCNet_x1_0_table_cls, an ultra-lightweight classification model for both wired and wireless tables.
|
||||
- **[Table Cell Detection](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/table_cells_detection.html)** series with 2 models: RT-DETR-L_wired_table_cell_det, RT-DETR-L_wireless_table_cell_det, supporting cell detection in both wired and wireless tables. These can be combined with SLANeXt_wired, SLANeXt_wireless, text detection, and text recognition modules for end-to-end table prediction. (See the newly added Table Recognition v2 pipeline)
|
||||
- **[Text Recognition](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/text_recognition.html)** series with 1 model: PP-OCRv4_server_rec_doc, **supports over 15,000 characters, with a broader text recognition range, additionally improving the recognition accuracy of certain texts. The accuracy is more than 3 percentage points higher than PP-OCRv4_server_rec on internal datasets.**
|
||||
- **[Text Line Orientation Classification](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_recognition.html)** series with 1 model: PP-LCNet_x0_25_textline_ori, **an ultra-lightweight text line orientation classification model with only 0.3M storage.**
|
||||
|
||||
- **4 high-value multi-model combination solutions:**
|
||||
- **[Document Image Preprocessing Pipeline](https://paddlepaddle.github.io/PaddleX/latest/en/pipeline_usage/tutorials/ocr_pipelines/doc_preprocessor.html)**: Achieve correction of distortion and orientation in document images through the combination of ultra-lightweight models.
|
||||
- **[Layout Parsing v2 Pipeline](https://paddlepaddle.github.io/PaddleX/latest/en/pipeline_usage/tutorials/ocr_pipelines/layout_parsing_v2.html)**: Combines multiple self-developed different types of OCR models to optimize complex layout reading order, achieving end-to-end conversion of various complex PDF files to Markdown and JSON files. The conversion effect is better than other open-source solutions in multiple document scenarios. It can provide high-quality data production capabilities for large model training and application.
|
||||
- **[Table Recognition v2 Pipeline](https://paddlepaddle.github.io/PaddleX/latest/en/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.html)**: **Provides better table recognition capabilities.** By combining table classification module, table cell detection module, table structure recognition module, text detection module, text recognition module, etc., it achieves prediction of various styles of tables. Users can customize and finetune any module to improve the effect of vertical tables.
|
||||
- **[PP-ChatOCRv4-doc Pipeline](https://paddlepaddle.github.io/PaddleX/latest/en/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v4.html)**: Based on PP-ChatOCRv3-doc, **integrating multi-modal large models, optimizing Prompt and multi-model combination post-processing logic. It effectively addresses common complex document information extraction challenges such as layout analysis, rare characters, multi-page PDFs, tables, and seal recognition, achieving 15 percentage points higher accuracy than PP-ChatOCRv3-doc. The large model upgrades local deployment capabilities, providing a standard OpenAI interface, supporting calls to locally deployed large models like DeepSeek-R1.**
|
||||
|
||||
#### **2024.10.18 release PaddleOCR v2.9, including**:
|
||||
* PaddleX, an All-in-One development tool based on PaddleOCR's advanced technology, supports low-code full-process development capabilities in the OCR field:
|
||||
* 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forecasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
|
||||
|
||||
* 🚀 [**High Efficiency and Low barrier of entry**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/overview.html): Provides two methods based on **unified commands** and **GUI** to achieve simple and efficient use, combination, and customization of models. Supports multiple deployment methods such as **high-performance inference, service-oriented deployment, and on-device deployment**. Additionally, for various mainstream hardware such as **NVIDIA GPU, Kunlunxin XPU, Ascend NPU, Cambricon MLU, and Haiguang DCU**, models can be developed with **seamless switching**.
|
||||
|
||||
* Supports [PP-ChatOCRv3-doc](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_en.md), [high-precision layout detection model based on RT-DETR](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/layout_detection_en.md) and [high-efficiency layout area detection model based on PicoDet](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/layout_detection_en.md), [high-precision table structure recognition model](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/table_structure_recognition_en.md), text image unwarping model [UVDoc](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/text_image_unwarping_en.md), formula recognition model [LatexOCR](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/formula_recognition_en.md), and [document image orientation classification model based on PP-LCNet](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification_en.md).
|
||||
|
||||
#### 2022.5.9 release PaddleOCR v2.5, including
|
||||
|
||||
- [PP-OCRv3](./ppocr_introduction_en.md#pp-ocrv3): With comparable speed, the effect of Chinese scene is further improved by 5% compared with PP-OCRv2, the effect of English scene is improved by 11%, and the average recognition accuracy of 80 language multilingual models is improved by more than 5%.
|
||||
- [PPOCRLabelv2](https://github.com/PFCCLab/PPOCRLabel/blob/main/README.md): Add the annotation function for table recognition task, key information extraction task and irregular text image.
|
||||
- Interactive e-book [*"Dive into OCR"*](./ocr_book_en.md), covers the cutting-edge theory and code practice of OCR full stack technology.
|
||||
|
||||
#### 2022.5.7 Add support for metric and model logging during training to [Weights & Biases](https://docs.wandb.ai/)
|
||||
|
||||
#### 2021.12.21 OCR open source online course starts. The lesson starts at 8:30 every night and lasts for ten days. Free registration: <https://aistudio.baidu.com/aistudio/course/introduce/25207>
|
||||
|
||||
#### 2021.12.21 release PaddleOCR v2.4, release 1 text detection algorithm (PSENet), 3 text recognition algorithms (NRTR、SEED、SAR), 1 key information extraction algorithm (SDMGR) and 3 DocVQA algorithms (LayoutLM、LayoutLMv2,LayoutXLM)
|
||||
|
||||
#### 2021.9.7 release PaddleOCR v2.3, [PP-OCRv2](#PP-OCRv2) is proposed. The CPU inference speed of PP-OCRv2 is 220% higher than that of PP-OCR server. The F-score of PP-OCRv2 is 7% higher than that of PP-OCR mobile
|
||||
|
||||
#### 2021.8.3 released PaddleOCR v2.2, add a new structured documents analysis toolkit, i.e., [PP-Structure](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/ppstructure/README.md), support layout analysis and table recognition (One-key to export chart images to Excel files)
|
||||
|
||||
#### 2021.4.8 release end-to-end text recognition algorithm [PGNet](https://www.aaai.org/AAAI21Papers/AAAI-2885.WangP.pdf) which is published in AAAI 2021. Find tutorial [here](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/doc/doc_en/pgnet_en.md);release multi language recognition [models](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/doc/doc_en/multi_languages_en.md), support more than 80 languages recognition; especially, the performance of [English recognition model](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/doc/doc_en/models_list_en.md#English) is Optimized
|
||||
|
||||
#### 2021.1.21 update more than 25+ multilingual recognition models [models list](./models_list_en.md), including:English, Chinese, German, French, Japanese,Spanish,Portuguese Russia Arabic and so on. Models for more languages will continue to be updated [Develop Plan](https://github.com/PaddlePaddle/PaddleOCR/issues/1048)
|
||||
|
||||
#### 2020.12.15 update Data synthesis tool, i.e., [Style-Text](https://github.com/PFCCLab/StyleText/blob/main/README.md),easy to synthesize a large number of images which are similar to the target scene image
|
||||
|
||||
#### 2020.11.25 Update a new data annotation tool, i.e., [PPOCRLabel](https://github.com/PFCCLab/PPOCRLabel/blob/main/README.md), which is helpful to improve the labeling efficiency. Moreover, the labeling results can be used in training of the PP-OCR system directly
|
||||
|
||||
#### 2020.9.22 Update the PP-OCR technical article, <https://arxiv.org/abs/2009.09941>
|
||||
|
||||
#### 2020.9.19 Update the ultra lightweight compressed ppocr_mobile_slim series models, the overall model size is 3.5M, suitable for mobile deployment
|
||||
|
||||
#### 2020.9.17 update English recognition model and Multilingual recognition model, `English`, `Chinese`, `German`, `French`, `Japanese` and `Korean` have been supported. Models for more languages will continue to be updated
|
||||
|
||||
#### 2020.8.24 Support the use of PaddleOCR through whl package installation,please refer [PaddleOCR Package](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/whl_en.md)
|
||||
|
||||
#### 2020.8.16 Release text detection algorithm [SAST](https://arxiv.org/abs/1908.05498) and text recognition algorithm [SRN](https://arxiv.org/abs/2003.12294)
|
||||
|
||||
#### 2020.7.23, Release the playback and PPT of live class on BiliBili station, PaddleOCR Introduction, [address](https://aistudio.baidu.com/aistudio/course/introduce/1519)
|
||||
|
||||
#### 2020.7.15, Add mobile App demo , support both iOS and Android (based on easyedge and Paddle Lite)
|
||||
|
||||
#### 2020.7.15, Improve the deployment ability, add the C + + inference , serving deployment. In addition, the benchmarks of the ultra-lightweight Chinese OCR model are provided
|
||||
|
||||
#### 2020.7.15, Add several related datasets, data annotation and synthesis tools
|
||||
|
||||
#### 2020.7.9 Add a new model to support recognize the character "space"
|
||||
|
||||
#### 2020.7.9 Add the data argument and learning rate decay strategies during training
|
||||
|
||||
#### 2020.6.8 Add [datasets](dataset/datasets_en.md) and keep updating
|
||||
|
||||
#### 2020.6.5 Support exporting `attention` model to `inference_model`
|
||||
|
||||
#### 2020.6.5 Support separate prediction and recognition, output result score
|
||||
|
||||
#### 2020.5.30 Provide Lightweight Chinese OCR online experience
|
||||
|
||||
#### 2020.5.30 Model prediction and training support on Windows system
|
||||
|
||||
#### 2020.5.30 Open source general Chinese OCR model
|
||||
|
||||
#### 2020.5.14 Release [PaddleOCR Open Class](https://www.bilibili.com/video/BV1nf4y1U7RX?p=4)
|
||||
|
||||
#### 2020.5.14 Release [PaddleOCR Practice Notebook](https://aistudio.baidu.com/aistudio/projectdetail/467229)
|
||||
|
||||
#### 2020.5.14 Open source 8.6M lightweight Chinese OCR model
|
||||
227
docs/update/update.md
Normal file
227
docs/update/update.md
Normal file
@@ -0,0 +1,227 @@
|
||||
---
|
||||
comments: true
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
---
|
||||
|
||||
### 更新
|
||||
|
||||
#### 2025.06.29: **PaddleOCR 3.1.0** 发布,新增能力如下:
|
||||
|
||||
- **重要模型和产线:**
|
||||
- **新增 PP-OCRv5 多语种文本识别模型**,支持法语、西班牙语、葡萄牙语、俄语、韩语等 37 种语言的文字识别模型的训推流程。**平均精度涨幅超30%。**[详情](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.html)
|
||||
- 升级 PP-StructureV3 中的 **PP-Chart2Table 模型**,图表转表能力进一步升级,在内部自建测评集合上指标(RMS-F1)**提升 9.36 个百分点(71.24% -> 80.60%)。**
|
||||
- 新增基于 PP-StructureV3 和 ERNIE 4.5 Turbo 的**文档翻译产线 PP-DocTranslation,支持翻译 Markdown 格式文档、各种复杂版式的 PDF 文档和文档图像,结果保存为 Markdown 格式文档。**[详情](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/pipeline_usage/PP-DocTranslation.html)
|
||||
|
||||
- **新增MCP server:**[详情](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/deployment/mcp_server.html)
|
||||
- **支持 OCR 和 PP-StructureV3 两种工具;**
|
||||
- 支持本地Python库、星河社区云服务、自托管服务三种工作模式;
|
||||
- 支持通过 stdio 调用本地服务,通过 Streamable HTTP 调用远程服务。
|
||||
|
||||
- **文档优化:** 优化了部分使用文档描述,提升阅读体验。
|
||||
|
||||
#### 2025.06.26: **PaddleOCR 3.0.3** 发布,包含:
|
||||
- Bug修复:修复`enable_mkldnn`参数不生效的问题,恢复CPU默认使用MKL-DNN推理的行为。
|
||||
|
||||
|
||||
#### **2025.06.19: PaddleOCR v3.0.2 版本发布,包含:**
|
||||
|
||||
- **功能新增:**
|
||||
- 模型默认下载源从`BOS`改为`HuggingFace`,同时也支持用户通过更改环境变量`PADDLE_PDX_MODEL_SOURCE`为`BOS`,将模型下载源设置为百度云对象存储BOS。
|
||||
- PP-OCRv5、PP-StructureV3、PP-ChatOCRv4等pipeline新增C++、Java、Go、C#、Node.js、PHP 6种语言的服务调用示例。
|
||||
- 优化PP-StructureV3产线中版面分区排序算法,对复杂竖版版面排序逻辑进行完善,进一步提升了复杂版面排序效果。
|
||||
- 优化模型选择逻辑,当指定语言、未指定模型版本时,自动选择支持该语言的最新版本的模型。 @timminator
|
||||
- 为MKL-DNN缓存大小设置默认上界,防止缓存无限增长。同时,支持用户配置缓存容量。@timminator
|
||||
- 更新高性能推理默认配置,支持Paddle MKL-DNN加速。优化高性能推理自动配置逻辑,支持更智能的配置选择。
|
||||
- 调整默认设备获取逻辑,考虑环境中安装的Paddle框架对计算设备的实际支持情况,使程序行为更符合直觉。
|
||||
- 新增PP-OCRv5的Android端示例,[详情](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/deployment/on_device_deployment.html)。
|
||||
|
||||
- **Bug修复:**
|
||||
- 修复PP-StructureV3部分CLI参数不生效的问题。
|
||||
- 修复部分情况下`export_paddlex_config_to_yaml`无法正常工作的问题。
|
||||
- 修复save_path实际行为与文档描述不符的问题。
|
||||
- 修复基础服务化部署在使用MKL-DNN时可能出现的多线程错误。
|
||||
- 修复Latex-OCR模型的图像预处理的通道顺序错误。
|
||||
- 修复文本识别模块保存可视化图像的通道顺序错误。
|
||||
- 修复PP-StructureV3中表格可视化结果通道顺序错误。
|
||||
- 修复PP-StructureV3产线中极特殊的情况下,计算overlap_ratio时,变量溢出问题。
|
||||
|
||||
- **文档优化:**
|
||||
- 更新文档中对`enable_mkldnn`参数的说明,使其更准确地描述程序的实际行为。
|
||||
- 修复文档中对`lang`和`ocr_version`参数描述的错误。
|
||||
- 补充通过CLI导出产线配置文件的说明。
|
||||
- 修复PP-OCRv5性能数据表格中的列缺失问题。
|
||||
- 润色PP-StructureV3在不同配置下的benchmark指标。
|
||||
|
||||
- **其他:**
|
||||
- 放松numpy、pandas等依赖的版本限制,恢复对Python 3.12的支持。
|
||||
|
||||
#### **2025.06.05: PaddleOCR v3.0.1 版本发布,包含:**
|
||||
- **优化部分模型和模型配置:**
|
||||
- 更新 PP-OCRv5默认模型配置,检测和识别均由mobile改为server模型。为了改善大多数的场景默认效果,配置中的参数`limit_side_len`由736改为64
|
||||
- 新增文本行方向分类`PP-LCNet_x1_0_textline_ori`模型,精度99.42%,OCR、PP-StructureV3、PP-ChatOCRv4产线的默认文本行方向分类器改为该模型
|
||||
- 优化文本行方向分类`PP-LCNet_x0_25_textline_ori`模型,精度提升3.3个百分点,当前精度98.85%
|
||||
- **优化3.0.0版本部分存在的问题**
|
||||
- **优化CLI使用体验:** 当使用PaddleOCR CLI不传入任何参数时,给出用法提示。
|
||||
- **新增参数:** PP-ChatOCRv3、PP-StructureV3支持`use_textline_orientation`参数。
|
||||
- **CPU推理速度优化:** 所有产线CPU推理默认开启MKL-DNN。
|
||||
- **C++推理支持:** PP-OCRv5的检测和识别串联部分支持C++推理
|
||||
- **修复3.0.0版本部分存在的问题**
|
||||
- 修复由于公式识别、表格识别模型无法使用MKL-DNN导致PP-StructureV3在部分cpu推理报错的问题
|
||||
- 修复在部分GPU环境中推理报`FatalError: Process abort signal is detected by the operating system`错误的问题
|
||||
- 修复部分Python3.8环境的type hint的问题
|
||||
- 修复`PPStructureV3.concatenate_markdown_pages`方法不存在的问题。
|
||||
- 修复实例化`paddleocr.PaddleOCR`时同时指定`lang`和`model_name`时`model_name`不生效的问题。
|
||||
|
||||
#### **2025.05.20: PaddleOCR 3.0 正式发布,包含:**
|
||||
|
||||
- **发布全场景文字识别模型PP-OCRv5:** 单模型支持五种文字类型和复杂手写体识别;整体识别精度相比上一代提升13个百分点。
|
||||
|
||||
- **发布通用文档解析方案PP-StructureV3:** 支持多场景、多版式 PDF 高精度解析,在公开评测集中领先众多开源和闭源方案。
|
||||
|
||||
- **发布智能文档理解方案PP-ChatOCRv4:** 原生支持文心大模型4.5 Turbo,精度相比上一代提升15个百分点。
|
||||
|
||||
- **重构部署能力,统一推理接口:** PaddleOCR 3.0 融合了飞桨 PaddleX3.0 工具的底层能力,全面升级推理、部署模块,优化 2.x 版本的设计,统一并优化了 Python API 和命令行接口(CLI)。部署能力现覆盖高性能推理、服务化部署及端侧部署三大场景。
|
||||
|
||||
- **适配飞桨框架 3.0,优化训练流程:** 新版本已兼容飞桨 3.0 的 CINN 编译器等最新特性,静态图模型存储文件名由 `xxx.pdmodel` 改为 `xxx.json`。
|
||||
|
||||
- **统一模型名称:** 对PaddleOCR3.0支持的模型命名体系进行了更新,采用更规范、统一的命名规则,为后续迭代与维护奠定基础。
|
||||
|
||||
- [2.x升级3.x其他说明](./upgrade_notes.md)。
|
||||
|
||||
#### **2025.3.7 PaddleOCR 2.10 版本,主要包含如下内容**
|
||||
|
||||
- **重磅新增 OCR 领域 12 个自研单模型:**
|
||||
- **[版面区域检测](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/layout_detection.html)** 系列 3 个模型:PP-DocLayout-L、PP-DocLayout-M、PP-DocLayout-S,支持预测 23 个常见版面类别,中英论文、研报、试卷、书籍、杂志、合同、报纸等丰富类型的文档实现高质量版面检测,**mAP@0.5 最高达 90.4%,轻量模型端到端每秒处理超百页文档图像。**
|
||||
- **[公式识别](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/formula_recognition.html)** 系列 2 个模型:PP-FormulaNet-L、PP-FormulaNet-S,支持 5 万种 LaTeX 常见词汇,支持识别高难度印刷公式和手写公式,其中 **PP-FormulaNet-L 较开源同等量级模型精度高 6 个百分点,PP-FormulaNet-S 较同等精度模型速度快 16 倍。**
|
||||
- **[表格结构识别](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/table_structure_recognition.html)** 系列 2 个模型:SLANeXt_wired、SLANeXt_wireless。飞桨自研新一代表格结构识别模型,分别支持有线表格和无线表格的结构预测。相比于SLANet_plus,SLANeXt在表格结构方面有较大提升,**在内部高难度表格识别评测集上精度高 6 个百分点。**
|
||||
- **[表格分类](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/table_classification.html)** 系列 1 个模型:PP-LCNet_x1_0_table_cls,超轻量级有线表格和无线表格的分类模型。
|
||||
- **[表格单元格检测](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/table_cells_detection.html)** 系列 2 个模型:RT-DETR-L_wired_table_cell_det、RT-DETR-L_wireless_table_cell_det,分别支持有线表格和无线表格的单元格检测,可配合SLANeXt_wired、SLANeXt_wireless、文本检测、文本识别模块完成对表格的端到端预测。(参见本次新增的表格识别v2产线)
|
||||
- **[文本识别](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_recognition.html)** 系列 1 个模型: PP-OCRv4_server_rec_doc,**支持1.5万+字典,文字识别范围更广,与此同时提升了部分文字的识别精准度,在内部数据集上,精度较 PP-OCRv4_server_rec 高 3 个百分点以上。**
|
||||
- **[文本行方向分类](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_recognition.html)** 系列 1 个模型:PP-LCNet_x0_25_textline_ori,**存储只有 0.3M** 的超轻量级文本行方向分类模型。
|
||||
|
||||
- **重磅推出 4 条高价值多模型组合方案:**
|
||||
- **[文档图像预处理产线](https://paddlepaddle.github.io/PaddleX/latest/pipeline_usage/tutorials/ocr_pipelines/doc_preprocessor.html)**:通过超轻量级模型组合使用,实现对文档图像的扭曲和方向的矫正。
|
||||
- **[版面解析v2产线](https://paddlepaddle.github.io/PaddleX/latest/pipeline_usage/tutorials/ocr_pipelines/layout_parsing_v2.html)**:组合多个自研的不同类型的 OCR 类模型,优化复杂版面阅读顺序,实现多种复杂 PDF 文件端到端转换 Markdown 文件和 JSON 文件。在多个文档场景下,转换效果较其他开源方案更好。可以为大模型训练和应用提供高质量的数据生产能力。
|
||||
- **[表格识别v2产线](https://paddlepaddle.github.io/PaddleX/latest/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.html)**:**提供更好的表格端到端识别能力。** 通过将表格分类模块、表格单元格检测模块、表格结构识别模块、文本检测模块、文本识别模块等组合使用,实现对多种样式的表格预测,用户可自定义微调其中任意模块以提升垂类表格的效果。
|
||||
- **[PP-ChatOCRv4-doc产线](https://paddlepaddle.github.io/PaddleX/latest/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v4.html)**:在 PP-ChatOCRv3-doc 的基础上,**融合了多模态大模型,优化了 Prompt 和多模型组合后处理逻辑,更好地解决了版面分析、生僻字、多页 pdf、表格、印章识别等常见的复杂文档信息抽取难点问题,准确率较 PP-ChatOCRv3-doc 高 15 个百分点。其中,大模型升级了本地部署的能力,提供了标准的 OpenAI 调用接口,支持对本地大模型如 DeepSeek-R1 部署的调用。**
|
||||
|
||||
#### **2024.10.1 添加OCR领域低代码全流程开发能力**
|
||||
|
||||
- 飞桨低代码开发工具PaddleX,依托于PaddleOCR的先进技术,支持了OCR领域的低代码全流程开发能力:
|
||||
- 🎨 [**模型丰富一键调用**](https://paddlepaddle.github.io/PaddleOCR/latest/paddlex/quick_start.html):将文本图像智能分析、通用OCR、通用版面解析、通用表格识别、公式识别、印章文本识别涉及的**17个模型**整合为6条模型产线,通过极简的**Python API一键调用**,快速体验模型效果。此外,同一套API,也支持图像分类、目标检测、图像分割、时序预测等共计**200+模型**,形成20+单功能模块,方便开发者进行**模型组合**使用。
|
||||
- 🚀[**提高效率降低门槛**](https://paddlepaddle.github.io/PaddleOCR/latest/paddlex/overview.html):提供基于**统一命令**和**图形界面**两种方式,实现模型简洁高效的使用、组合与定制。支持**高性能推理、服务化部署和端侧部署**等多种部署方式。此外,对于各种主流硬件如**英伟达GPU、昆仑芯、昇腾、寒武纪和海光**等,进行模型开发时,都可以**无缝切换**。
|
||||
|
||||
- 支持文档场景信息抽取v3[PP-ChatOCRv3-doc](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction.md)、基于RT-DETR的[高精度版面区域检测模型](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/layout_detection.md)和PicoDet的[高效率版面区域检测模型](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/layout_detection.md)、高精度表格结构识别模型[SLANet_Plus](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/table_structure_recognition.md)、文本图像矫正模型[UVDoc](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/text_image_unwarping.md)、公式识别模型[LatexOCR](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/formula_recognition.md)、基于PP-LCNet的[文档图像方向分类模型](https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.md)
|
||||
|
||||
#### 2024.7 添加 PaddleOCR 算法模型挑战赛冠军方案
|
||||
|
||||
- 赛题一:OCR 端到端识别任务冠军方案——[场景文本识别算法-SVTRv2](https://paddlepaddle.github.io/PaddleOCR/latest/algorithm/text_recognition/algorithm_rec_svtrv2.html);
|
||||
- 赛题二:通用表格识别任务冠军方案——[表格识别算法-SLANet-LCNetV2](https://paddlepaddle.github.io/PaddleOCR/latest/algorithm/table_recognition/algorithm_table_slanet.html)。
|
||||
|
||||
#### **2024.5.10 上线星河零代码产线(OCR 相关)**
|
||||
|
||||
全面覆盖了以下四大 OCR 核心任务,提供极便捷的 Badcase 分析和实用的在线体验
|
||||
|
||||
- [通用 OCR](https://aistudio.baidu.com/community/app/91660) (PP-OCRv4)。
|
||||
- [通用表格识别](https://aistudio.baidu.com/community/app/91661) (SLANet)。
|
||||
- [通用图像信息抽取](https://aistudio.baidu.com/community/app/91662) (PP-ChatOCRv2-common)。
|
||||
- [文档场景信息抽取](https://aistudio.baidu.com/community/app/70303) (PP-ChatOCRv2-doc)。
|
||||
|
||||
同时采用了 **[全新的场景任务开发范式](https://aistudio.baidu.com/pipeline/mine)** ,将模型统一汇聚,实现训练部署的零代码开发,并支持在线服务化部署和导出离线服务化部署包。
|
||||
|
||||
#### 2023.8.7 发布 PaddleOCR [release/2.7](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.7)
|
||||
|
||||
- 发布[PP-OCRv4](./doc/doc_ch/PP-OCRv4_introduction.md),提供 mobile 和 server 两种模型
|
||||
- PP-OCRv4-mobile:速度可比情况下,中文场景效果相比于 PP-OCRv3 再提升 4.5%,英文场景提升 10%,80 语种多语言模型平均识别准确率提升 8%以上
|
||||
- PP-OCRv4-server:发布了目前精度最高的 OCR 模型,中英文场景上检测模型精度提升 4.9%, 识别模型精度提升 2%
|
||||
可参考[快速开始](./doc/doc_ch/quickstart.md) 一行命令快速使用,同时也可在飞桨 AI 套件(PaddleX)中的[通用 OCR 产业方案](https://aistudio.baidu.com/aistudio/modelsdetail?modelId=286)中低代码完成模型训练、推理、高性能部署全流程
|
||||
|
||||
#### 🔨**2022.11 新增实现[4 种前沿算法](doc/doc_ch/algorithm_overview.md)**:文本检测 [DRRG](doc/doc_ch/algorithm_det_drrg.md), 文本识别 [RFL](doc/doc_ch/algorithm_rec_rfl.md), 文本超分[Text Telescope](doc/doc_ch/algorithm_sr_telescope.md),公式识别[CAN](doc/doc_ch/algorithm_rec_can.md)
|
||||
|
||||
#### **2022.10 优化[JS 版 PP-OCRv3 模型](./deploy/paddlejs/README_ch.md)**:模型大小仅 4.3M,预测速度提升 8 倍,配套 web demo 开箱即用
|
||||
|
||||
- **💥 直播回放:PaddleOCR 研发团队详解 PP-StructureV2 优化策略**。微信扫描[下方二维码](#开源社区),关注公众号并填写问卷后进入官方交流群,获取直播回放链接与 20G 重磅 OCR 学习大礼包(内含 PDF 转 Word 应用程序、10 种垂类模型、《动手学 OCR》电子书等)
|
||||
|
||||
#### **2022.8.24 发布 PaddleOCR [release/2.6](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.6)**
|
||||
|
||||
- 发布[PP-StructureV2](./ppstructure/README_ch.md),系统功能性能全面升级,适配中文场景,新增支持[版面复原](./ppstructure/recovery/README_ch.md),支持**一行命令完成 PDF 转 Word**;
|
||||
- [版面分析](./ppstructure/layout/README_ch.md)模型优化:模型存储减少 95%,速度提升 11 倍,平均 CPU 耗时仅需 41ms;
|
||||
- [表格识别](./ppstructure/table/README_ch.md)模型优化:设计 3 大优化策略,预测耗时不变情况下,模型精度提升 6%;
|
||||
- [关键信息抽取](./ppstructure/kie/README_ch.md)模型优化:设计视觉无关模型结构,语义实体识别精度提升 2.8%,关系抽取精度提升 9.1%。
|
||||
|
||||
#### **2022.8 发布 [OCR 场景应用集合](./applications)**:包含数码管、液晶屏、车牌、高精度 SVTR 模型、手写体识别等**9 个垂类模型**,覆盖通用,制造、金融、交通行业的主要 OCR 垂类应用
|
||||
|
||||
#### 2022.5.9 发布PaddleOCR v2.5。发布内容包括
|
||||
|
||||
- [PP-OCRv3](./ppocr_introduction.md#pp-ocrv3),速度可比情况下,中文场景效果相比于PP-OCRv2再提升5%,英文场景提升11%,80语种多语言模型平均识别准确率提升5%以上;
|
||||
- 半自动标注工具[PPOCRLabelv2](https://github.com/PFCCLab/PPOCRLabel):新增表格文字图像、图像关键信息抽取任务和不规则文字图像的标注功能;
|
||||
- OCR产业落地工具集:打通22种训练部署软硬件环境与方式,覆盖企业90%的训练部署环境需求
|
||||
- 交互式OCR开源电子书[《动手学OCR》](./ocr_book.md),覆盖OCR全栈技术的前沿理论与代码实践,并配套教学视频。
|
||||
|
||||
#### 2022.5.7 添加对[Weights & Biases](https://docs.wandb.ai/)训练日志记录工具的支持
|
||||
|
||||
#### 2021.12.21 《OCR十讲》课程开讲,12月21日起每晚八点半线上授课! 【免费】报名地址:<https://aistudio.baidu.com/aistudio/course/introduce/25207>
|
||||
|
||||
#### 2021.12.21 发布PaddleOCR v2.4。OCR算法新增1种文本检测算法(PSENet),3种文本识别算法(NRTR、SEED、SAR);文档结构化算法新增1种关键信息提取算法(SDMGR),3种DocVQA算法(LayoutLM、LayoutLMv2,LayoutXLM)
|
||||
|
||||
#### 2021.9.7 发布PaddleOCR v2.3,发布[PP-OCRv2](#PP-OCRv2),CPU推理速度相比于PP-OCR server提升220%;效果相比于PP-OCR mobile 提升7%
|
||||
|
||||
#### 2021.8.3 发布PaddleOCR v2.2,新增文档结构分析[PP-Structure](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/ppstructure/README_ch.md)工具包,支持版面分析与表格识别(含Excel导出)
|
||||
|
||||
#### 2021.6.29 [FAQ](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/doc/doc_ch/FAQ.md)新增5个高频问题,总数248个,每周一都会更新,欢迎大家持续关注
|
||||
|
||||
#### 2021.4.8 release 2.1版本,新增AAAI 2021论文[端到端识别算法PGNet](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/doc/doc_ch/pgnet.md)开源,[多语言模型](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/doc/doc_ch/multi_languages.md)支持种类增加到80+
|
||||
|
||||
#### 2020.12.15 更新数据合成工具[Style-Text](https://github.com/PFCCLab/StyleText/blob/main/README_ch.md),可以批量合成大量与目标场景类似的图像,在多个场景验证,效果明显提升
|
||||
|
||||
#### 2020.12.07 [FAQ](../../doc/doc_ch/FAQ.md)新增5个高频问题,总数124个,并且计划以后每周一都会更新,欢迎大家持续关注
|
||||
|
||||
#### 2020.11.25 更新半自动标注工具[PPOCRLabel](https://github.com/PFCCLab/PPOCRLabel/blob/main/README_ch.md),辅助开发者高效完成标注任务,输出格式与PP-OCR训练任务完美衔接
|
||||
|
||||
#### 2020.9.22 更新PP-OCR技术文章,<https://arxiv.org/abs/2009.09941>
|
||||
|
||||
#### 2020.9.19 更新超轻量压缩ppocr_mobile_slim系列模型,整体模型3.5M(详见PP-OCR Pipeline),适合在移动端部署使用
|
||||
|
||||
#### 2020.9.17 更新超轻量ppocr_mobile系列和通用ppocr_server系列中英文ocr模型,媲美商业效果
|
||||
|
||||
#### 2020.9.17 更新[英文识别模型](./models_list.md#english-recognition-model)和[多语种识别模型](./models_list.md#english-recognition-model),已支持`德语、法语、日语、韩语`,更多语种识别模型将持续更新
|
||||
|
||||
#### 2020.8.26 更新OCR相关的84个常见问题及解答,具体参考[FAQ](./FAQ.md)
|
||||
|
||||
#### 2020.8.24 支持通过whl包安装使用PaddleOCR,具体参考[Paddleocr Package使用说明](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/whl.md)
|
||||
|
||||
#### 2020.8.21 更新8月18日B站直播课回放和PPT,课节2,易学易用的OCR工具大礼包,[获取地址](https://aistudio.baidu.com/aistudio/education/group/info/1519)
|
||||
|
||||
#### 2020.8.16 开源文本检测算法[SAST](https://arxiv.org/abs/1908.05498)和文本识别算法[SRN](https://arxiv.org/abs/2003.12294)
|
||||
|
||||
#### 2020.7.23 发布7月21日B站直播课回放和PPT,课节1,PaddleOCR开源大礼包全面解读,[获取地址](https://aistudio.baidu.com/aistudio/course/introduce/1519)
|
||||
|
||||
#### 2020.7.15 添加基于EasyEdge和Paddle-Lite的移动端DEMO,支持iOS和Android系统
|
||||
|
||||
#### 2020.7.15 完善预测部署,添加基于C++预测引擎推理、服务化部署和端侧部署方案,以及超轻量级中文OCR模型预测耗时Benchmark
|
||||
|
||||
#### 2020.7.15 整理OCR相关数据集、常用数据标注以及合成工具
|
||||
|
||||
#### 2020.7.9 添加支持空格的识别模型,识别效果,预测及训练方式请参考快速开始和文本识别训练相关文档
|
||||
|
||||
#### 2020.7.9 添加数据增强、学习率衰减策略,具体参考[配置文件](./config.md)
|
||||
|
||||
#### 2020.6.8 添加[数据集](dataset/datasets.md),并保持持续更新
|
||||
|
||||
#### 2020.6.5 支持 `attetnion` 模型导出 `inference_model`
|
||||
|
||||
#### 2020.6.5 支持单独预测识别时,输出结果得分
|
||||
|
||||
#### 2020.5.30 提供超轻量级中文OCR在线体验
|
||||
|
||||
#### 2020.5.30 模型预测、训练支持Windows系统
|
||||
|
||||
#### 2020.5.30 开源通用中文OCR模型
|
||||
|
||||
#### 2020.5.14 发布[PaddleOCR公开课](https://www.bilibili.com/video/BV1nf4y1U7RX?p=4)
|
||||
|
||||
#### 2020.5.14 发布[PaddleOCR实战练习](https://aistudio.baidu.com/aistudio/projectdetail/467229)
|
||||
|
||||
#### 2020.5.14 开源8.6M超轻量级中文OCR模型
|
||||
81
docs/update/upgrade_notes.en.md
Normal file
81
docs/update/upgrade_notes.en.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# PaddleOCR 3.x Upgrade Notes
|
||||
|
||||
## 1. Why Upgrade from PaddleOCR 2.x to 3.x?
|
||||
|
||||
Since the release of PaddleOCR 2.0 in February 2021, the community has experienced over four years of rapid growth. The number of GitHub stars, community users and contributors, as well as issues and PRs, have all increased exponentially. With emerging needs such as multilingual recognition and layout analysis, PaddleOCR continued to expand its capabilities in the 2.x series. However, the original lightweight-centric architecture has struggled to accommodate the growing complexity and rising maintenance costs brought by the feature boom.
|
||||
|
||||
As more module branches and "bridging" layers were added to the codebase, issues such as code duplication and inconsistent interfaces became increasingly prominent. Testing became more difficult, and development efficiency was severely constrained. In addition, legacy dependencies became incompatible with newer versions of PaddlePaddle, limiting access to its latest features and slowing down training and inference. Under such circumstances, continuing to patch the existing architecture would only increase technical debt and system fragility.
|
||||
|
||||
Meanwhile, Transformer-based vision-language models are injecting new momentum into advanced scenarios such as document understanding, image-text summarization, and intelligent proofreading. The community is eager to go beyond traditional OCR recognition and fully harness the powerful contextual understanding and reasoning capabilities of these models. At the same time, lightweight OCR models can still work in tandem with large models—both supporting the input needs of large models in document parsing and achieving complementary strengths to further enhance overall system performance.
|
||||
|
||||
Moreover, the official release of PaddlePaddle 3.0 in April 2025 brought groundbreaking upgrades in unified training/inference and domestic hardware adaptation. This calls for a significant update to PaddleOCR in both its training and inference components.
|
||||
|
||||
Given this background, we’ve decided to implement a major, non-backward-compatible upgrade—transitioning from 2.x to 3.x. The new version introduces a modular and plugin-based architecture. While retaining familiar usage patterns for users as much as possible, it integrates large model capabilities, offers richer features, and leverages the latest advancements of PaddlePaddle 3.0. The result is reduced maintenance cost, improved performance, and a solid foundation for future feature expansion.
|
||||
|
||||
## 2. Key Upgrades from PaddleOCR 2.x to 3.x
|
||||
|
||||
The 3.x upgrade consists of three major enhancements:
|
||||
|
||||
1. **New Model Pipelines**: Introduced several new pipelines such as PP-OCRv5, PP-StructureV3, and PP-ChatOCR v4, covering a wide range of base models. These significantly enhance recognition capabilities for various text types, including handwriting, to meet the growing demand for high-precision parsing in complex documents. All models are ready-to-use out of the box, improving development efficiency.
|
||||
2. **Refactored Deployment and Unified Inference Interface**: The deployment module in PaddleOCR 3.x is rebuilt using [PaddleX](../version3.x/paddleocr_and_paddlex.en.md)’s underlying capabilities, fixing design flaws from 2.x and unifying both Python APIs and CLI interfaces. The deployment now supports three main scenarios: high-performance inference, service-oriented deployment, and on-device deployment.
|
||||
3. **PaddlePaddle 3.0 Compatibility and Optimized Training**: The new version is fully compatible with PaddlePaddle 3.0, including features like the CINN compiler. It also introduces a standardized model naming system to streamline future updates and maintenance.
|
||||
|
||||
Some legacy features from PaddleOCR 2.x remain partially supported in 3.x. For more information, refer to [Legacy Features](../version2.x/legacy/index.en.md).
|
||||
|
||||
## 3. Migrating Inference Code from PaddleOCR 2.x to 3.x
|
||||
|
||||
For OCR tasks, PaddleOCR 3.x still supports a usage pattern similar to 2.x. Here’s an example using the Python API in 2.x:
|
||||
|
||||
```python
|
||||
from paddleocr import PaddleOCR
|
||||
|
||||
ocr = PaddleOCR(lang="en")
|
||||
result = ocr.ocr("img.png")
|
||||
for res in result:
|
||||
for line in res:
|
||||
print(line)
|
||||
|
||||
# Visualization
|
||||
from PIL import Image
|
||||
from paddleocr import draw_ocr
|
||||
result = result[0]
|
||||
image = Image.open(img_path).convert("RGB")
|
||||
boxes = [line[0] for line in result]
|
||||
txts = [line[1][0] for line in result]
|
||||
scores = [line[1][1] for line in result]
|
||||
im_show = draw_ocr(image, boxes, txts, scores, font_path="simfang.ttf")
|
||||
im_show = Image.fromarray(im_show)
|
||||
im_show.save("result.jpg")
|
||||
```
|
||||
|
||||
In PaddleOCR 3.x, this workflow is further simplified:
|
||||
|
||||
```python
|
||||
from paddleocr import PaddleOCR
|
||||
|
||||
# Basic initialization parameters remain the same
|
||||
ocr = PaddleOCR(lang="en")
|
||||
result = ocr.ocr("img.png")
|
||||
# Or use the new unified interface
|
||||
# result = ocr.predict("img.png")
|
||||
for res in result:
|
||||
# Directly print recognition results, no nested loops required
|
||||
res.print()
|
||||
|
||||
# Visualization and saving results are simpler
|
||||
res.save_to_img("result")
|
||||
```
|
||||
|
||||
It’s worth noting that the `PPStructure` module in PaddleOCR 2.x has been removed in 3.x. We recommend switching to `PPStructureV3`, which offers richer functionality and better parsing results. Refer to the relevant documentation for usage details.
|
||||
|
||||
Also, in 2.x, the `show_log` parameter could be passed when creating a `PaddleOCR` object to control logging. However, this design affected all `PaddleOCR` instances due to the use of a shared logger—clearly not the expected behavior. PaddleOCR 3.x introduces a brand-new logging system to address this issue. For more details, see [Logging](../version3.x/logging.en.md).
|
||||
|
||||
## 4. Known Issues in PaddleOCR 3.0
|
||||
|
||||
PaddleOCR 3.0 is still under active development. Current known limitations include:
|
||||
|
||||
1. Incomplete support for native C++ deployment.
|
||||
2. High-performance service-oriented deployment is not yet on par with PaddleServing in 2.x.
|
||||
3. On-Device Deployment currently supports only a subset of key models, with broader support pending.
|
||||
|
||||
If you encounter any issues during use, feel free to submit feedback via GitHub issues. We also warmly welcome more community members to contribute to PaddleOCR's future. Thank you for your continued support and interest!
|
||||
81
docs/update/upgrade_notes.md
Normal file
81
docs/update/upgrade_notes.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# PaddleOCR 3.x 升级说明
|
||||
|
||||
## 1. PaddleOCR 为什么要从 2.x 升级到 3.x?
|
||||
|
||||
自 2021 年 2 月发布 2.0 版本以来,PaddleOCR 社区已走过四年多的快速发展期,GitHub star 数量、社区用户和贡献者、issue 与 PR 数量等均有指数级的增长。在多语种识别、版面分析等新需求的推动下,PaddleOCR 在 2.x 系列中不断增添功能,但最初以轻量化为核心的架构已难以应对功能繁荣带来的复杂性与维护成本。
|
||||
|
||||
随着代码中模块分支与“桥接”层频繁增加,重复实现、接口不统一的问题愈发突出,测试难度也不断增加,开发效率严重受限;而旧版依赖与最新 PaddlePaddle 更新的不兼容,限制了对飞桨新特性的使用,进一步拖慢了训练与推理速度。这种状况下,继续在现有架构基础上打补丁,只会带来更多技术债与系统脆弱性。
|
||||
|
||||
另一方面,基于 Transformer 的视觉语言大模型正在为文档理解、图文摘要、智能校对等高级应用场景注入新动能。社区迫切期待,这类模型能够突破传统 OCR 识别的局限,直接发挥其更强的上下文理解与推理能力。同时,传统的 OCR 小模型亦可与大模型协同工作,既能满足大模型在文档解析等方面的输入需求,又能通过大小模型协同,实现优势互补,进一步提升系统整体性能。
|
||||
|
||||
此外,飞桨框架于 2025 年 4 月发布的 3.0 正式版,在训推一体化、国产硬件适配等方面实现了颠覆性升级,这也对 PaddleOCR 在训练和推理层面提出了新的改造需求。
|
||||
|
||||
综合以上背景,我们决定对 PaddleOCR 进行一次重大、非兼容性升级——从 2.x 跳至 3.x。新版本将在架构层面实现模块化、插件化设计,在尽可能不改变用户使用习惯的同时,结合大模型,提供更加丰富的功能,并充分利用飞桨 3.0 的新特性,既清理冗余、降低维护成本,又为性能与功能扩展提供更坚实的基础。
|
||||
|
||||
## 2. PaddleOCR 2.x 到 3.x 主要升级内容
|
||||
|
||||
本次升级内容主要可分为三个部分:
|
||||
|
||||
1. **新增多条模型产线**:推出 PP-OCRv5、PP-StructureV3、PP-ChatOCR v4 等多条模型产线,并补充覆盖多种方向的基础模型,重点增强了多文字类型识别、手写体识别等能力,满足大模型应用对复杂文档高精度解析的旺盛需求。用户可直接开箱使用,提升开发效率。
|
||||
2. **重构部署能力,统一推理接口**:PaddleOCR 3.x 融合了飞桨 [PaddleX](../version3.x/paddleocr_and_paddlex.md) 工具的底层能力,全面升级推理、部署模块,修正 2.x 版本中的设计错误,统一并优化了 Python API 和命令行接口(CLI)。部署能力现覆盖高性能推理、服务化部署及端侧部署三大场景。
|
||||
3. **适配飞桨 3.0,优化训练流程**:新版本已兼容飞桨 3.0 的 CINN 编译器等最新特性,并对模型命名体系进行了更新,采用更规范、统一的命名规则,为后续迭代与维护奠定基础。
|
||||
|
||||
对于 PaddleOCR 2.x 中的部分历史遗留功能,PaddleOCR 3.x 目前仍提供了一定程度的兼容支持。详情请参阅 [历史遗留功能](../version2.x/legacy/index.md)。
|
||||
|
||||
## 3. 将 PaddleOCR 2.x 的推理代码移到 PaddleOCR 3.x
|
||||
|
||||
对于 OCR 任务,PaddleOCR 3.x 仍然支持与 PaddleOCR 2.x 类似的用法。以 Python API 为例,以下是 PaddleOCR 2.x 的常见使用方式:
|
||||
|
||||
```python
|
||||
from paddleocr import PaddleOCR
|
||||
|
||||
ocr = PaddleOCR(lang="en")
|
||||
result = ocr.ocr("img.png")
|
||||
for res in result:
|
||||
for line in res:
|
||||
print(line)
|
||||
|
||||
# 可视化
|
||||
from PIL import Image
|
||||
from paddleocr import draw_ocr
|
||||
result = result[0]
|
||||
image = Image.open(img_path).convert("RGB")
|
||||
boxes = [line[0] for line in result]
|
||||
txts = [line[1][0] for line in result]
|
||||
scores = [line[1][1] for line in result]
|
||||
im_show = draw_ocr(image, boxes, txts, scores, font_path="simfang.ttf")
|
||||
im_show = Image.fromarray(im_show)
|
||||
im_show.save("result.jpg")
|
||||
```
|
||||
|
||||
在 PaddleOCR 3.x 中,以上流程得到了进一步简化,示例如下:
|
||||
|
||||
```python
|
||||
from paddleocr import PaddleOCR
|
||||
|
||||
# 基础的初始化参数保持一致
|
||||
ocr = PaddleOCR(lang="en")
|
||||
result = ocr.ocr("img.png")
|
||||
# 也可以使用新的统一接口
|
||||
# result = ocr.predict("img.png")
|
||||
for res in result:
|
||||
# 可直接调用方法打印识别结果,无需嵌套循环
|
||||
res.print()
|
||||
|
||||
# 可视化及结果保存更为简洁
|
||||
res.save_to_img("result")
|
||||
```
|
||||
|
||||
需要特别指出的是,PaddleOCR 2.x 提供的 `PPStructure` 在 PaddleOCR 3.x 中已被移除。建议使用功能更丰富、解析效果更好的 `PPStructureV3` 替代,并参考相关文档了解新接口的用法。
|
||||
|
||||
此外,在 PaddleOCR 2.x 中,可以通过在构造 `PaddleOCR` 对象时传入 `show_log` 参数来控制日志输出。然而,这种设计存在局限:由于所有 `PaddleOCR` 实例共享一个日志器,当一个实例设置了日志行为后,其它实例也会受到影响,这显然不符合预期。为了解决这一问题,PaddleOCR 3.x 引入了全新的日志系统。详细内容请参阅 [日志](../version3.x/logging.md)。
|
||||
|
||||
## 4. PaddleOCR 3.0 已知问题
|
||||
|
||||
PaddleOCR 3.x 仍在持续迭代与优化中,目前已知存在以下尚待完善之处:
|
||||
|
||||
1. 对 C++ 本地部署的支持尚不完整。
|
||||
2. 暂未提供性能与 PaddleOCR 2.x 中 PaddleServing 部署方案对齐的高性能服务化部署方案。
|
||||
3. 端侧部署目前仅支持部分重点模型,其余模型尚未开放支持。
|
||||
|
||||
如果你在使用过程中遇到问题,欢迎随时在 issue 区提交反馈。我们也诚挚邀请更多社区用户参与到 PaddleOCR 的建设中来,感谢大家一直以来的关注与支持!
|
||||
Reference in New Issue
Block a user