Skip to content

Commit

Permalink
update documentation about the installation (PaddlePaddle#12565)
Browse files Browse the repository at this point in the history
* update documentation about the installation

* Apply suggestions from code review

Co-authored-by: jzhang533 <jzhang533@gmail.com>

---------

Co-authored-by: jzhang533 <jzhang533@gmail.com>
  • Loading branch information
GreatV and jzhang533 authored May 31, 2024
1 parent 56fc05e commit 9a0bbe4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
5 changes: 3 additions & 2 deletions doc/doc_ch/multi_languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ pip install paddlepaddle-gpu

pip 安装
```
pip install "paddleocr>=2.0.6" # 推荐使用2.0.6版本
pip install paddleocr
```

本地构建并安装
```
python3 setup.py bdist_wheel
python3 -m build
pip3 install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x是paddleocr的版本号
```

Expand Down
12 changes: 6 additions & 6 deletions doc/doc_ch/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@

> 如果您没有基础的Python运行环境,请参考[运行环境准备](./environment.md)
- 您的机器安装的是CUDA9或CUDA10,请运行以下命令安装
- 您的机器安装的是CUDA 11,请运行以下命令安装

```bash
python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
pip install paddlepaddle-gpu
```

- 您的机器是CPU,请运行以下命令安装

```bash
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
pip install paddlepaddle
```

更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。
Expand All @@ -40,7 +40,7 @@
### 1.2 安装PaddleOCR whl包

```bash
pip install "paddleocr>=2.0.1" # 推荐使用2.0.1+版本
pip install paddleocr
```

- 对于Windows环境用户:直接通过pip安装的shapely库可能出现`[winRrror 126] 找不到指定模块的问题`。建议从[这里](https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely)下载shapely安装包完成安装。
Expand Down Expand Up @@ -276,8 +276,8 @@ font = ImageFont.truetype("./doc/fonts/simfang.ttf", size=20) # 根据需要调
# 处理并绘制结果
for res in results:
for line in res:
box = [tuple(point) for point in line[0]] # 将列表转换为元组列表
# 将四个角转换为两个角
box = [tuple(point) for point in line[0]]
# 找出边界框
box = [(min(point[0] for point in box), min(point[1] for point in box)),
(max(point[0] for point in box), max(point[1] for point in box))]
txt = line[1][0]
Expand Down
4 changes: 2 additions & 2 deletions doc/doc_ch/whl.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
pip安装

```bash
pip install "paddleocr>=2.0.1" # 推荐使用2.0.1+版本
pip install paddleocr
```

本地构建并安装

```bash
python3 setup.py bdist_wheel
python3 -m build
pip3 install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x是paddleocr的版本号
```

Expand Down
4 changes: 2 additions & 2 deletions doc/doc_en/multi_languages_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ pip install paddlepaddle-gpu

pip install
```
pip install "paddleocr>=2.0.6" # 2.0.6 version is recommended
pip install paddleocr
```
Build and install locally
```
python3 setup.py bdist_wheel
python3 -m build
pip3 install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x is the version number of paddleocr
```

Expand Down
12 changes: 6 additions & 6 deletions doc/doc_en/quickstart_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@

> If you do not have a Python environment, please refer to [Environment Preparation](./environment_en.md).
- If you have CUDA 9 or CUDA 10 installed on your machine, please run the following command to install
- If you have CUDA 11 installed on your machine, please run the following command to install

```bash
python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install paddlepaddle-gpu
```

- If you have no available GPU on your machine, please run the following command to install the CPU version

```bash
python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple
python -m pip install paddlepaddle
```

For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/install/quick) for operation.
For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/en/install/quick) for operation.

<a name="12-install-paddleocr-whl-package"></a>

Expand Down Expand Up @@ -289,8 +289,8 @@ font = ImageFont.truetype("./doc/fonts/simfang.ttf", size=20) # Adjust size as
# Process and draw results
for res in results:
for line in res:
box = [tuple(point) for point in line[0]] # Convert list of lists to list of tuples
# Convert four corners to two corners
box = [tuple(point) for point in line[0]]
# Finding the bounding box
box = [(min(point[0] for point in box), min(point[1] for point in box)),
(max(point[0] for point in box), max(point[1] for point in box))]
txt = line[1][0]
Expand Down
2 changes: 1 addition & 1 deletion doc/doc_en/whl_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pip install "paddleocr>=2.0.1" # Recommend to use version 2.0.1+

build own whl package and install
```bash
python3 setup.py bdist_wheel
python3 -m build
pip3 install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x is the version of paddleocr
```
## 2 Use
Expand Down

0 comments on commit 9a0bbe4

Please sign in to comment.