diff --git a/ppstructure/recovery/README.md b/ppstructure/recovery/README.md index 7e5936706320c5b5b93affd2d55581a326210432..883dbef3e829dfa213644b610af1ca279dac8641 100644 --- a/ppstructure/recovery/README.md +++ b/ppstructure/recovery/README.md @@ -2,7 +2,10 @@ English | [简体中文](README_ch.md) - [Getting Started](#getting-started) - [1. Introduction](#1) - - [2. Quick Start](#2) + - [2. Install](#2) + - [2.1 Installation dependencies](#2.1) + - [2.2 Install PaddleOCR](#2.2) + - [3. Quick Start](#3) @@ -16,10 +19,53 @@ The following figure shows the result:
- -## 2. Quick Start +## 2. Install + + + +### 2.1 Install dependencies + +- **(1) Install PaddlePaddle** + +```bash +python3 -m pip install --upgrade pip + +# GPU installation +python3 -m pip install "paddlepaddle-gpu>=2.2" -i https://mirror.baidu.com/pypi/simple + +# CPU installation +python3 -m pip install "paddlepaddle>=2.2" -i https://mirror.baidu.com/pypi/simple + +```` + +For more requirements, please refer to the instructions in [Installation Documentation](https://www.paddlepaddle.org.cn/install/quick). + + + +### 2.2 Install PaddleOCR + +- **(1) Download source code** + +```bash +[Recommended] git clone https://github.com/PaddlePaddle/PaddleOCR + +# If the pull cannot be successful due to network problems, you can also choose to use the hosting on the code cloud: +git clone https://gitee.com/paddlepaddle/PaddleOCR + +# Note: Code cloud hosting code may not be able to synchronize the update of this github project in real time, there is a delay of 3 to 5 days, please use the recommended method first. +```` + +- **(2) Install recovery's `requirements`** + +```bash +python3 -m pip install -r ppstructure/recovery/requirements.txt +```` + + + +## 3. Quick Start ```python cd PaddleOCR/ppstructure diff --git a/ppstructure/recovery/README_ch.md b/ppstructure/recovery/README_ch.md index 570acc4011cbcf05357d76ffb3ce8f783c31e357..1f72f8de8a5e2eb51c8c4f58df30465f5361a301 100644 --- a/ppstructure/recovery/README_ch.md +++ b/ppstructure/recovery/README_ch.md @@ -3,7 +3,11 @@ # 版面恢复使用说明 - [1. 简介](#1) -- [2. 使用](#2) +- [2. 安装](#2) + - [2.1 安装依赖](#2.1) + - [2.2 安装PaddleOCR](#2.2) + +- [3. 使用](#3) @@ -17,10 +21,53 @@
- -## 2. 使用 +## 2. 安装 + + + +### 2.1 安装依赖 + +- **(1) 安装PaddlePaddle** + +```bash +python3 -m pip install --upgrade pip + +# GPU安装 +python3 -m pip install "paddlepaddle-gpu>=2.2" -i https://mirror.baidu.com/pypi/simple + +# CPU安装 +python3 -m pip install "paddlepaddle>=2.2" -i https://mirror.baidu.com/pypi/simple + +``` + +更多需求,请参照[安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。 + + + +### 2.2 安装PaddleOCR + +- **(1)下载版面恢复源码** + +```bash +【推荐】git clone https://github.com/PaddlePaddle/PaddleOCR + +# 如果因为网络问题无法pull成功,也可选择使用码云上的托管: +git clone https://gitee.com/paddlepaddle/PaddleOCR + +# 注:码云托管代码可能无法实时同步本github项目更新,存在3~5天延时,请优先使用推荐方式。 +``` + +- **(2)安装recovery的`requirements`** + +```bash +python3 -m pip install -r ppstructure/recovery/requirements.txt +``` + + + +## 3. 使用 恢复给定文档的版面: diff --git a/ppstructure/recovery/requirements.txt b/ppstructure/recovery/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..04187baa2a72d2ac60f0a4e5ce643f882b7255fb --- /dev/null +++ b/ppstructure/recovery/requirements.txt @@ -0,0 +1,3 @@ +opencv-contrib-python==4.4.0.46 +pypandoc +python-docx \ No newline at end of file