From 67e8dd1b0118f202b9d7599cacd0b6b83fddac32 Mon Sep 17 00:00:00 2001
From: an1018 <614803115@qq.com>
Date: Mon, 9 May 2022 16:17:40 +0800
Subject: [PATCH] modify recovery
---
ppstructure/recovery/README.md | 52 ++++++++++++++++++++++++--
ppstructure/recovery/README_ch.md | 53 +++++++++++++++++++++++++--
ppstructure/recovery/requirements.txt | 3 ++
3 files changed, 102 insertions(+), 6 deletions(-)
create mode 100644 ppstructure/recovery/requirements.txt
diff --git a/ppstructure/recovery/README.md b/ppstructure/recovery/README.md
index 7e593670..883dbef3 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 570acc40..1f72f8de 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 00000000..04187baa
--- /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
--
GitLab