diff --git a/docs/version2.x/legacy/index.en.md b/docs/version2.x/legacy/index.en.md index f8f6e79c01..643ae600c2 100644 --- a/docs/version2.x/legacy/index.en.md +++ b/docs/version2.x/legacy/index.en.md @@ -1,24 +1,30 @@ --- -comments: true typora-copy-images-to: images +comments: true hide: - toc --- -# PP-OCR Deployment +# Legacy Features -## Paddle Deployment Introduction +## Overview -Paddle provides a variety of deployment schemes to meet the deployment requirements of different scenarios. Please choose according to the actual situation: +This section introduces the features and models related to the PaddleOCR 2.x branch. Due to the upgrades in the 3.x branch, some models and features are no longer compatible with the older branch. Therefore, users who need to use or refer to the features of the older branch can refer to this part of the documentation. - +## Models Supported by PaddleOCR 2.x Branch: -PP-OCR has supported multi deployment schemes. Click the link to get the specific tutorial. +* [Model List](model_list.md) -- [Python Inference](./python_infer.en.md) -- [C++ Inference](./cpp_infer.en.md) -- [Serving (Python/C++)](./paddle_server.en.md) -- [Paddle-Lite (ARM CPU/OpenCL ARM GPU)](./lite.en.md) -- [Paddle2ONNX](./paddle2onnx.en.md) +## Features Supported by PaddleOCR 2.x Branch: -If you need the deployment tutorial of academic algorithm models other than PP-OCR, please directly enter the main page of corresponding algorithms, [entrance](../../algorithm/overview.en.md)。 +* [Inference with Python Prediction Engine](python_infer.en.md) +* [Inference with C++ Prediction Engine](cpp_infer.en.md) +* [Compilation Guide for Visual Studio 2019 Community CMake](windows_vs2019_build.en.md) +* [Service-Oriented Deployment](paddle_server.en.md) +* [Android Deployment](android_demo.en.md) +* [Jetson Deployment](Jetson_infer.en.md) +* [Edge Device Deployment](lite.en.md) +* [Web Frontend Deployment](paddle_js.en.md) +* [Paddle2ONNX Model Conversion and Prediction](paddle2onnx.en.md) +* [PaddlePaddle Cloud Deployment Tool](paddle_cloud.en.md) +* [Benchmark](benchmark.en.md) diff --git a/docs/version2.x/legacy/index.md b/docs/version2.x/legacy/index.md index 7952d9f5c4..2dd679ea08 100644 --- a/docs/version2.x/legacy/index.md +++ b/docs/version2.x/legacy/index.md @@ -9,13 +9,13 @@ hide: ## 概述 -本节介绍了 PaddleOCR 2.x 版本的相关功能和模型。由于最新版本的升级,部分模型和功能与旧版本不再兼容。因此,需要使用或参考旧版本特性的用户可以参考这部分文档。 +本节介绍了 PaddleOCR 2.x 分支的相关功能和模型。由于 3.x 分支的升级,部分模型和功能与旧分支不再兼容。因此,需要使用或参考旧分支特性的用户可以参考这部分文档。 -## PaddleOCR 2.x 版本支持的模型: +## PaddleOCR 2.x 分支支持的模型: * [模型列表](model_list.md) -## PaddleOCR 2.x 版本支持的功能: +## PaddleOCR 2.x 分支支持的功能: * [基于Python预测引擎推理](python_infer.md) * [基于C++预测引擎推理](cpp_infer.md) diff --git a/docs/version2.x/ppocr/installation.en.md b/docs/version2.x/ppocr/installation.en.md new file mode 100644 index 0000000000..244e88dffa --- /dev/null +++ b/docs/version2.x/ppocr/installation.en.md @@ -0,0 +1,85 @@ +--- +comments: true +--- + +## Quick Installation + +After testing, PaddleOCR can run on glibc 2.23. You can also test other glibc versions or install glibc 2.23 for the best compatibility. + +PaddleOCR working environment: + +- PaddlePaddle > 2.0.0 +- Python 3 +- glibc 2.23 + +It is recommended to use the docker provided by us to run PaddleOCR. Please refer to the docker tutorial [link](https://www.runoob.com/docker/docker-tutorial.html/). + +*If you want to directly run the prediction code on Mac or Windows, you can start from step 2.* + +### 1. (Recommended) Prepare a docker environment + +For the first time you use this docker image, it will be downloaded automatically. Please be patient. + +```bash linenums="1" +# Switch to the working directory +cd /home/Projects +# You need to create a docker container for the first run, and do not need to run the current command when you run it again +# Create a docker container named ppocr and map the current directory to the /paddle directory of the container + +#If using CPU, use docker instead of nvidia-docker to create docker +sudo docker run --name ppocr -v $PWD:/paddle --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash +``` + +With CUDA10, please run the following command to create a container. +It is recommended to set a shared memory greater than or equal to 32G through the --shm-size parameter: + +```bash linenums="1" +sudo nvidia-docker run --name ppocr -v $PWD:/paddle --shm-size=64G --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash +``` + +You can also visit [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) to get the image that fits your machine. + +```bash linenums="1" +# ctrl+P+Q to exit docker, to re-enter docker using the following command: +sudo docker container exec -it ppocr /bin/bash +``` + +### 2. Install PaddlePaddle 2.0 + +```bash linenums="1" +pip3 install --upgrade pip + +# If you have cuda9 or cuda10 installed on your machine, please run the following command to install +python3 -m pip install paddlepaddle-gpu==2.0.0 -i https://mirror.baidu.com/pypi/simple + +# If you only have cpu on your machine, please run the following command to install +python3 -m pip install paddlepaddle==2.0.0 -i https://mirror.baidu.com/pypi/simple +``` + +For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/install/quick) for operation. + +### 3. Clone PaddleOCR repo + +```bash linenums="1" +# Recommend +git clone https://github.com/PaddlePaddle/PaddleOCR + +# If you cannot pull successfully due to network problems, you can switch to the mirror hosted on Gitee: + +git clone https://gitee.com/paddlepaddle/PaddleOCR + +# Note: The mirror on Gitee may not keep in synchronization with the latest update with the project on GitHub. There might be a delay of 3-5 days. Please try GitHub at first. +``` + +### 4. Install third-party libraries + +```bash linenums="1" +cd PaddleOCR +pip3 install -r requirements.txt +``` + +If you getting this error `OSError: [WinError 126] The specified module could not be found` when you install shapely on windows. + +Please try to download Shapely whl file from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely](http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely). + +Reference: [Solve shapely installation on windows](https://stackoverflow.com/questions/44398265/install-shapely-oserror-winerror-126-the-specified-module-could-not-be-found) diff --git a/docs/version2.x/ppocr/installation.md b/docs/version2.x/ppocr/installation.md index 74a3eeef65..30e35795fb 100644 --- a/docs/version2.x/ppocr/installation.md +++ b/docs/version2.x/ppocr/installation.md @@ -2,49 +2,75 @@ comments: true --- -# 安装 +## 快速安装 -# 1. 安装飞桨框架 +经测试PaddleOCR可在glibc 2.23上运行,您也可以测试其他glibc版本或安装glic 2.23 +PaddleOCR 工作环境 -请参考 [飞桨官网](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html) 安装 `3.0` 及以上版本的飞桨框架。**推荐使用飞桨官方 Docker 镜像。** +- PaddlePaddle 2.0.0 +- python3 +- glibc 2.23 +- cuDNN 7.6+ (GPU) -# 2. 安装 PaddleOCR +建议使用我们提供的docker运行PaddleOCR,有关docker、nvidia-docker使用请参考[链接](https://www.runoob.com/docker/docker-tutorial.html/)。 -如果只希望使用 PaddleOCR 的推理功能,请参考 [安装推理包](#21-安装推理包);如果希望进行模型训练、导出等,请参考 [安装训练依赖](#22-安装训练依赖)。在同一环境中安装推理包和训练依赖是允许的,无需进行环境隔离。 +*如您希望使用 mac 或 windows直接运行预测代码,可以从第2步开始执行。* -## 2.1 安装推理包 +### 1. (建议)准备docker环境 -从 PyPI 安装最新版本 PaddleOCR 推理包: +第一次使用这个镜像,会自动下载该镜像,请耐心等待 -```bash -python -m pip install paddleocr +```bash linenums="1" +# 切换到工作目录下 +cd /home/Projects +# 首次运行需创建一个docker容器,再次运行时不需要运行当前命令 +# 创建一个名字为ppocr的docker容器,并将当前目录映射到容器的/paddle目录下 + +如果您希望在CPU环境下使用docker,使用docker而不是nvidia-docker创建docker +sudo docker run --name ppocr -v $PWD:/paddle --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash + +如果使用CUDA10,请运行以下命令创建容器,设置docker容器共享内存shm-size为64G,建议设置32G以上 +sudo nvidia-docker run --name ppocr -v $PWD:/paddle --shm-size=64G --network=host -it paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash + +您也可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取与您机器适配的镜像。 + +# ctrl+P+Q可退出docker 容器,重新进入docker 容器使用如下命令 +sudo docker container exec -it ppocr /bin/bash ``` -或者从源码安装(默认为开发分支): +### 2. 安装PaddlePaddle 2.0 -```bash -python -m pip install "git+https://github.com/PaddlePaddle/PaddleOCR.git" +```bash linenums="1" +pip3 install --upgrade pip + +# 如果您的机器安装的是CUDA9或CUDA10,请运行以下命令安装 +python3 -m pip install paddlepaddle-gpu==2.0.0 -i https://mirror.baidu.com/pypi/simple + +# 如果您的机器是CPU,请运行以下命令安装 +python3 -m pip install paddlepaddle==2.0.0 -i https://mirror.baidu.com/pypi/simple + +# 更多的版本需求,请参照[安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。 ``` -## 2.2 安装训练依赖 +### 3. 克隆PaddleOCR repo代码 -要进行模型训练、导出等,需要首先将仓库克隆到本地: - -```bash -# 推荐方式 +```bash linenums="1" +#【推荐】 git clone https://github.com/PaddlePaddle/PaddleOCR -# (可选)切换到指定分支 -git checkout release/3.0 +# 如果因为网络问题无法pull成功,也可选择使用码云上的托管: -# 如果因为网络问题无法克隆成功,也可选择使用码云上的仓库: git clone https://gitee.com/paddlepaddle/PaddleOCR -# 注:码云托管代码可能无法实时同步本 GitHub 项目更新,存在3~5天延时,请优先使用推荐方式。 +# 注:码云托管代码可能无法实时同步本github项目更新,存在3~5天延时,请优先使用推荐方式。 ``` -执行如下命令安装依赖: +### 4. 安装第三方库 -```bash -python -m pip install -r requirements.txt +```bash linenums="1" +cd PaddleOCR +pip3 install -r requirements.txt ``` + +注意,windows环境下,建议从[这里](https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely)下载shapely安装包完成安装, +直接通过pip安装的shapely库可能出现`[winRrror 126] 找不到指定模块的问题`。 diff --git a/docs/version3.x/deployment/high_performance_inference.en.md b/docs/version3.x/deployment/high_performance_inference.en.md new file mode 100644 index 0000000000..4d93121431 --- /dev/null +++ b/docs/version3.x/deployment/high_performance_inference.en.md @@ -0,0 +1,94 @@ +# High-Performance Inference + +In real-world production environments, many applications have stringent performance requirements for deployment strategies, particularly regarding response speed, to ensure efficient system operation and a smooth user experience. PaddleOCR provides high-performance inference capabilities, allowing users to enhance model inference speed with a single click without worrying about complex configurations or underlying details. Specifically, PaddleOCR's high-performance inference functionality can: + +- Automatically select an appropriate inference backend (e.g., Paddle Inference, OpenVINO, ONNX Runtime, TensorRT) based on prior knowledge and configure acceleration strategies (e.g., increasing the number of inference threads, setting FP16 precision inference); +- Automatically convert PaddlePaddle static graph models to ONNX format as needed to leverage better inference backends for acceleration. + +This document primarily introduces the installation and usage methods for high-performance inference. + +## 1. Prerequisites + +### 1.1 Install High-Performance Inference Dependencies + +Install the dependencies required for high-performance inference using the PaddleOCR CLI: + +```bash +paddleocr install_hpi_deps {device_type} +``` + +The supported device types are: + +- `cpu`: For CPU-only inference. Currently supports Linux systems, x86-64 architecture processors, and Python 3.8-3.12. +- `gpu`: For inference using either CPU or NVIDIA GPU. Currently supports Linux systems, x86-64 architecture processors, and Python 3.8-3.12. Refer to the next subsection for detailed instructions. + +Only one type of device dependency should exist in the same environment. For Windows systems, it is currently recommended to install within a Docker container or [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) environment. + +**It is recommended to use the official PaddlePaddle Docker image to install high-performance inference dependencies.** The corresponding images for each device type are as follows: + +- `cpu`: `ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0` +- `gpu`: + - CUDA 11.8: `ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0-gpu-cuda11.8-cudnn8.9-trt8.6` + +### 1.2 Detailed GPU Environment Instructions + +First, ensure that the environment has the required CUDA and cuDNN versions installed. Currently, PaddleOCR only supports CUDA and cuDNN versions compatible with CUDA 11.8 + cuDNN 8.9. Below are the installation instructions for CUDA 11.8 and cuDNN 8.9: + +- [Install CUDA 11.8](https://developer.nvidia.com/cuda-11-8-0-download-archive) +- [Install cuDNN 8.9](https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-890/install-guide/index.html) + +If using the official PaddlePaddle image, the CUDA and cuDNN versions in the image already meet the requirements, and no additional installation is needed. + +If installing PaddlePaddle via pip, the relevant Python packages for CUDA and cuDNN will typically be installed automatically. In this case, **you still need to install the non-Python-specific CUDA and cuDNN versions.** It is also recommended to install CUDA and cuDNN versions that match the Python package versions in your environment to avoid potential issues caused by coexisting library versions. You can check the versions of the CUDA and cuDNN-related Python packages with the following commands: + +```bash +# CUDA-related Python package versions +pip list | grep nvidia-cuda +# cuDNN-related Python package versions +pip list | grep nvidia-cudnn +``` + +Secondly, ensure that the environment has the required TensorRT version installed. Currently, PaddleOCR only supports TensorRT 8.6.1.6. If using the official PaddlePaddle image, you can install the TensorRT wheel package with the following command: + +```bash +python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl +``` + +For other environments, refer to the [TensorRT documentation](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html) to install TensorRT. Here is an example: + +```bash +# Download the TensorRT tar file +wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz +# Extract the TensorRT tar file +tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz +# Install the TensorRT wheel package +python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl +# Add the absolute path of the TensorRT `lib` directory to LD_LIBRARY_PATH +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib" +``` + +## 2. Executing High-Performance Inference + +For the PaddleOCR CLI, specify `--enable_hpi` as `True` to execute high-performance inference. For example: + +```bash +paddleocr ocr --enable_hpi True ... +``` + +For the PaddleOCR Python API, set `enable_hpi` to `True` when initializing the pipeline or module object to enable high-performance inference when calling the inference method. For example: + +```python +from paddleocr import PaddleOCR +pipeline = PaddleOCR(enable_hpi=True) +result = pipeline.predict(...) +``` + +## 3. Notes + +1. For some models, the first execution of high-performance inference may take longer to complete the construction of the inference engine. Relevant information about the inference engine will be cached in the model directory after the first construction, and subsequent initializations can reuse the cached content to improve speed. + +2. Currently, due to reasons such as not using static graph format models or the presence of unsupported operators, some models may not achieve inference acceleration. + +3. During high-performance inference, PaddleOCR automatically handles the conversion of model formats and selects the optimal inference backend whenever possible. Additionally, PaddleOCR supports users specifying ONNX models. For information on converting PaddlePaddle static graph models to ONNX format, refer to [Obtaining ONNX Models](./obtaining_onnx_models.en.md). + +4. The high-performance inference capabilities of PaddleOCR rely on PaddleX and its high-performance inference plugins. By passing in a custom PaddleX production line configuration file, you can configure the inference backend and other related settings. Please refer to [Using PaddleX Production Line Configuration Files](../paddleocr_and_paddlex.en.md#3-Using-PaddleX-Pipeline-Configuration-Files) and the [PaddleX High-Performance Inference Guide](https://paddlepaddle.github.io/PaddleX/3.0/en/pipeline_deploy/high_performance_inference.html#22) to learn how to adjust the high-performance inference configurations. diff --git a/docs/version3.x/deployment/obtaining_onnx_models.en.md b/docs/version3.x/deployment/obtaining_onnx_models.en.md new file mode 100644 index 0000000000..25ca0002eb --- /dev/null +++ b/docs/version3.x/deployment/obtaining_onnx_models.en.md @@ -0,0 +1,48 @@ +# Obtaining ONNX Models + +PaddleOCR provides a rich collection of pre-trained models, all stored in PaddlePaddle's static graph format. To use these models in ONNX format during deployment, you can convert them using the Paddle2ONNX plugin provided by PaddleX. For more information about PaddleX and its relationship with PaddleOCR, refer to [Differences and Connections Between PaddleOCR and PaddleX](../paddleocr_and_paddlex.en.md#1-Differences-and-Connections-Between-PaddleOCR-and-PaddleX). + +First, install the Paddle2ONNX plugin for PaddleX using the following command via the PaddleX CLI: + +```bash +paddlex --install paddle2onnx +``` + +Then, execute the following command to complete the model conversion: + +```bash +paddlex \ + --paddle2onnx \ # Use the paddle2onnx feature + --paddle_model_dir /your/paddle_model/dir \ # Specify the directory containing the Paddle model + --onnx_model_dir /your/onnx_model/output/dir \ # Specify the output directory for the converted ONNX model + --opset_version 7 # Specify the ONNX opset version to use +``` + +The parameters are described as follows: + +
Parameter | +Type | +Description | +
---|---|---|
paddle_model_dir | +str | +The directory containing the Paddle model. | +
onnx_model_dir | +str | +The output directory for the ONNX model. It can be the same as the Paddle model directory. Defaults to onnx . |
+
opset_version | +int | +The ONNX opset version to use. If conversion fails with a lower opset version, a higher version will be automatically selected for conversion. Defaults to 7 . |
+
Name | +Description | +
---|---|
--pipeline |
+PaddleX pipeline registration name or pipeline configuration file path. | +
--device |
+Deployment device for the pipeline. Defaults to cpu (if GPU is unavailable) or gpu (if GPU is available). |
+
--host |
+Hostname or IP address to which the server is bound. Defaults to 0.0.0.0 . |
+
--port |
+Port number on which the server listens. Defaults to 8080 . |
+
--use_hpip |
+If specified, uses high-performance inference. | +
--hpi_config |
+High-performance inference configuration. Refer to the PaddleX High-Performance Inference Guide for more information. | +
模型 | +检测Hmean(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-OCRv5_server_det | +- | +- / - | +- / - | +101 | +PP-OCRv5_server_det.yaml | +推理模型/训练模型 | +
PP-OCRv5_mobile_det | +- | +- / - | +- / - | +20 | +PP-OCRv5_mobile_det.yaml | +推理模型/训练模型 | +
PP-OCRv4_server_det | +82.56 | +83.34 / 80.91 | +442.58 / 442.58 | +109 | +PP-OCRv4_server_det.yaml | +推理模型/训练模型 | +
PP-OCRv4_mobile_det | +77.35 | +8.79 / 3.13 | +51.00 / 28.58 | +4.7 | +PP-OCRv4_mobile_det.yaml | +推理模型/训练模型 | +
PP-OCRv3_mobile_det | +78.68 | +8.44 / 2.91 | +27.87 / 27.87 | +2.1 | +PP-OCRv3_mobile_det.yaml | +推理模型/训练模型 | +
PP-OCRv3_server_det | +80.11 | +65.41 / 13.67 | +305.07 / 305.07 | +102.1 | +PP-OCRv3_server_det.yaml | +推理模型/训练模型 | +
模型名称 | +检测Hmean(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小 | +yaml 文件 | +模型下载链接 |
---|---|---|---|---|---|---|
PP-OCRv4_mobile_seal_det | +96.47 | +7.82 / 3.09 | +48.28 / 23.97 | +4.7M | +PP-OCRv4_mobile_seal_det.yaml | +推理模型/训练模型 |
PP-OCRv4_server_seal_det | +98.21 | +74.75 / 67.72 | +382.55 / 382.55 | +108.3 M | +PP-OCRv4_server_seal_det.yaml | +推理模型/训练模型 |
模型 | +识别 Avg Accuracy(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-OCRv5_server_rec | +- | +- / - | +- / - | +206 M | +PP-OCRv5_server_rec.yaml | +推理模型/训练模型 | +
PP-OCRv5_mobile_rec | +- | +- / - | +- / - | +137 M | +PP-OCRv5_mobile_rec.yaml | +推理模型/训练模型 | +
PP-OCRv4_server_rec_doc | +81.53 | +6.65 / 2.38 | +32.92 / 32.92 | +74.7 M | +PP-OCRv4_server_rec_doc.yaml | +推理模型/训练模型 | +
PP-OCRv4_mobile_rec | +78.74 | +4.82 / 1.20 | +16.74 / 4.64 | +10.6 M | +PP-OCRv4_mobile_rec.yaml | +推理模型/训练模型 | +
PP-OCRv4_server_rec | +80.61 | +6.58 / 2.43 | +33.17 / 33.17 | +71.2 M | +PP-OCRv4_server_rec.yaml | +推理模型/训练模型 | +
PP-OCRv3_mobile_rec | +72.96 | +5.87 / 1.19 | +9.07 / 4.28 | +9.2 M | +PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
注:以上精度指标的评估集是 PaddleOCR 自建的中文数据集,覆盖街景、网图、文档、手写多个场景,其中文本识别包含 8367 张图片。
+模型 | +识别 Avg Accuracy(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
ch_SVTRv2_rec | +68.81 | +8.08 / 2.74 | +50.17 / 42.50 | +73.9 M | +ch_SVTRv2_rec.yaml | +推理模型/训练模型 | +
注:以上精度指标的评估集是 PaddleOCR算法模型挑战赛 - 赛题一:OCR端到端识别任务A榜。
+模型 | +识别 Avg Accuracy(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
ch_RepSVTR_rec | +65.07 | +5.93 / 1.62 | +20.73 / 7.32 | +22.1 M | +ch_RepSVTR_rec.yaml | +推理模型/训练模型 | +
注:以上精度指标的评估集是 PaddleOCR算法模型挑战赛 - 赛题一:OCR端到端识别任务B榜。
+ +* 英文识别模型 +模型 | +识别 Avg Accuracy(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
en_PP-OCRv4_mobile_rec | +70.39 | +4.81 / 0.75 | +16.10 / 5.31 | +6.8 M | +en_PP-OCRv4_mobile_rec.yaml | +推理模型/训练模型 | +
en_PP-OCRv3_mobile_rec | +70.69 | +5.44 / 0.75 | +8.65 / 5.57 | +7.8 M | +en_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
注:以上精度指标的评估集是 PaddleX 自建的英文数据集。
+ +* 多语言识别模型 +模型 | +识别 Avg Accuracy(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
korean_PP-OCRv3_mobile_rec | +60.21 | +5.40 / 0.97 | +9.11 / 4.05 | +8.6 M | +korean_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
japan_PP-OCRv3_mobile_rec | +45.69 | +5.70 / 1.02 | +8.48 / 4.07 | +8.8 M | +japan_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
chinese_cht_PP-OCRv3_mobile_rec | +82.06 | +5.90 / 1.28 | +9.28 / 4.34 | +9.7 M | +chinese_cht_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
te_PP-OCRv3_mobile_rec | +95.88 | +5.42 / 0.82 | +8.10 / 6.91 | +7.8 M | +te_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
ka_PP-OCRv3_mobile_rec | +96.96 | +5.25 / 0.79 | +9.09 / 3.86 | +8.0 M | +ka_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
ta_PP-OCRv3_mobile_rec | +76.83 | +5.23 / 0.75 | +10.13 / 4.30 | +8.0 M | +ta_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
latin_PP-OCRv3_mobile_rec | +76.93 | +5.20 / 0.79 | +8.83 / 7.15 | +7.8 M | +latin_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
arabic_PP-OCRv3_mobile_rec | +73.55 | +5.35 / 0.79 | +8.80 / 4.56 | +7.8 M | +arabic_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
cyrillic_PP-OCRv3_mobile_rec | +94.28 | +5.23 / 0.76 | +8.89 / 3.88 | +7.9 M | +cyrillic_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
devanagari_PP-OCRv3_mobile_rec | +96.44 | +5.22 / 0.79 | +8.56 / 4.06 | +7.9 M | +devanagari_PP-OCRv3_mobile_rec.yaml | +推理模型/训练模型 | +
注:以上精度指标的评估集是 PaddleX 自建的多语种数据集。
+ +## [公式识别模块](../module_usage/tutorials/ocr_modules/formula_recognition.md) + +模型 | +En-BLEU(%) | +Zh-BLEU(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小 (M) | +yaml 文件 | +模型下载链接 | +UniMERNet | +85.91 | +43.50 | +2266.96/- | +-/- | +1.53 G | +UniMERNet.yaml | +推理模型/训练模型 | +
---|---|---|---|---|---|---|---|
PP-FormulaNet-S | +87.00 | +45.71 | +202.25/- | +-/- | +224 M | +PP-FormulaNet-S.yaml | +推理模型/训练模型 | +PP-FormulaNet-L | +90.36 | +45.78 | +1976.52/- | +-/- | +695 M | +PP-FormulaNet-L.yaml | +推理模型/训练模型 | +
PP-FormulaNet_plus-S | +88.71 | +53.32 | +191.69/- | +-/- | +248 M | +PP-FormulaNet_plus-S.yaml | +推理模型/训练模型 | +
PP-FormulaNet_plus-M | +91.45 | +89.76 | +1301.56/- | +-/- | +592 M | +PP-FormulaNet_plus-M.yaml | +推理模型/训练模型 | +
PP-FormulaNet_plus-L | +92.22 | +90.64 | +1745.25/- | +-/- | +698 M | +PP-FormulaNet_plus-L.yaml | +推理模型/训练模型 | +
LaTeX_OCR_rec | +74.55 | +39.96 | +1244.61/- | +-/- | +99 M | +LaTeX_OCR_rec.yaml | +推理模型/训练模型 | +
模型 | +精度(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小 (M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
SLANet | +59.52 | +103.08 / 103.08 | +197.99 / 197.99 | +6.9 M | +SLANet.yaml | +推理模型/训练模型 | +
SLANet_plus | +63.69 | +140.29 / 140.29 | +195.39 / 195.39 | +6.9 M | +SLANet_plus.yaml | +推理模型/训练模型 | +
SLANeXt_wired | +69.65 | +-- | +-- | +-- | +SLANeXt_wired.yaml | +推理模型/训练模型 | +
SLANeXt_wireless | +SLANeXt_wireless.yaml | +推理模型/训练模型 | +
模型 | +mAP(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小 (M) | +yaml 文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
RT-DETR-L_wired_table_cell_det | + +82.7 | +35.00 / 10.45 | +495.51 / 495.51 | +124M | +RT-DETR-L_wired_table_cell_det.yaml | +推理模型/训练模型 | +
RT-DETR-L_wireless_table_cell_det | +RT-DETR-L_wireless_table_cell_det.yaml | +推理模型/训练模型 | +
注:以上精度指标测量自 PaddleX 内部自建表格单元格检测数据集。
+ +## [表格分类模块](../module_usage/tutorials/ocr_modules/table_classification.md) + +模型 | +Top1 Acc(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小 (M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-LCNet_x1_0_table_cls | +94.2 | +2.35 / 0.47 | +4.03 / 1.35 | +6.6M | +PP-LCNet_x1_0_table_cls.yaml | +推理模型/训练模型 | +
注:以上精度指标测量自 PaddleX 内部自建表格分类数据集。
+ +## [文本图像矫正模块](../module_usage/tutorials/ocr_modules/text_image_unwarping.md) +模型名称 | +MS-SSIM (%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小 | +yaml 文件 | +模型下载链接 |
---|---|---|---|---|---|---|
UVDoc | +54.40 | +16.27 / 7.76 | +176.97 / 80.60 | +30.3 M | +UVDoc.yaml | +推理模型/训练模型 |
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-DocLayout_plus-L | +83.2 | +34.6244 / 10.3945 | +510.57 / - | +126.01 | +PP-DocLayout_plus-L.yaml | +推理模型/训练模型 | +
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-DocBlockLayout | +95.9 | +34.6244 / 10.3945 | +510.57 / - | +123 M | +PP-DocBlockLayout.yaml | +推理模型/训练模型 | +
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-DocLayout-L | +90.4 | +34.6244 / 10.3945 | +510.57 / - | +123.76 | +PP-DocLayout-L.yaml | +推理模型/训练模型 | +
PP-DocLayout-M | +75.2 | +13.3259 / 4.8685 | +44.0680 / 44.0680 | +22.578 | +PP-DocLayout-M.yaml | +推理模型/训练模型 | +
PP-DocLayout-S | +70.9 | +8.3008 / 2.3794 | +10.0623 / 9.9296 | +4.834 | +PP-DocLayout-S.yaml | +推理模型/训练模型 | +
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PicoDet_layout_1x_table | +97.5 | +8.02 / 3.09 | +23.70 / 20.41 | +7.4 M | +PicoDet_layout_1x_table.yaml | +推理模型/训练模型 | +
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PicoDet-S_layout_3cls | +88.2 | +8.99 / 2.22 | +16.11 / 8.73 | +4.8 | +PicoDet-S_layout_3cls.yaml | +推理模型/训练模型 | +
PicoDet-L_layout_3cls | +89.0 | +13.05 / 4.50 | +41.30 / 41.30 | +22.6 | +PicoDet-L_layout_3cls.yaml | +推理模型/训练模型 | +
RT-DETR-H_layout_3cls | +95.8 | +114.93 / 27.71 | +947.56 / 947.56 | +470.1 | +RT-DETR-H_layout_3cls.yaml | +推理模型/训练模型 | +
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PicoDet_layout_1x | +97.8 | +9.03 / 3.10 | +25.82 / 20.70 | +7.4 | +PicoDet_layout_1x.yaml | +推理模型/训练模型 | +
模型 | +mAP(0.5)(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PicoDet-S_layout_17cls | +87.4 | +9.11 / 2.12 | +15.42 / 9.12 | +4.8 | +PicoDet-S_layout_17cls.yaml | +推理模型/训练模型 | +
PicoDet-L_layout_17cls | +89.0 | +13.50 / 4.69 | +43.32 / 43.32 | +22.6 | +PicoDet-L_layout_17cls.yaml | +推理模型/训练模型 | +
RT-DETR-H_layout_17cls | +98.3 | +115.29 / 104.09 | +995.27 / 995.27 | +470.2 | +RT-DETR-H_layout_17cls.yaml | +推理模型/训练模型 | +
模型 | +Top-1 Acc(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-LCNet_x1_0_doc_ori | +99.06 | +2.31 / 0.43 | +3.37 / 1.27 | +7 | +PP-LCNet_x1_0_doc_ori.yaml | +推理模型/训练模型 | +
模型 | +Top-1 Acc(%) | +GPU推理耗时(ms) [常规模式 / 高性能模式] |
+CPU推理耗时(ms) [常规模式 / 高性能模式] |
+模型存储大小(M) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|---|---|
PP-LCNet_x1_0_doc_ori | +99.06 | +2.31 / 0.43 | +3.37 / 1.27 | +7 | +PP-LCNet_x0_25_textline_ori.yaml | +推理模型/训练模型 | +
模型 | +模型参数尺寸(B) | +模型存储大小(GB) | +yaml文件 | +模型下载链接 | +
---|---|---|---|---|
PP-DocBee-2B | +2 | +4.2 | +PP-DocBee-2B.yaml | +推理模型 | +
PP-DocBee-7B | +7 | +15.8 | +PP-DocBee-7B.yaml | +推理模型 | +
PP-DocBee2-3B | +3 | +7.6 | ++ | 推理模型 | +