update documentation about the installation (#12565)

* update documentation about the installation

* Apply suggestions from code review

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

---------

Co-authored-by: jzhang533 <jzhang533@gmail.com>
pull/12583/head
Wang Xin 2024-05-31 16:25:10 +08:00 committed by GitHub
parent 56fc05e604
commit 9a0bbe44ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 20 additions and 19 deletions

View File

@ -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的版本号
```

View File

@ -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)中的说明进行操作。
@ -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安装包完成安装。
@ -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]

View File

@ -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的版本号
```

View File

@ -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
```

View File

@ -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>
@ -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]

View File

@ -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