|
25 | 25 |
|
26 | 26 | > If you do not have a Python environment, please refer to [Environment Preparation](./environment_en.md).
|
27 | 27 |
|
28 |
| -- If you have CUDA 9 or CUDA 10 installed on your machine, please run the following command to install |
| 28 | +- If you have CUDA 11 installed on your machine, please run the following command to install |
29 | 29 |
|
30 | 30 | ```bash
|
31 |
| - python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple |
| 31 | + python -m pip install paddlepaddle-gpu |
32 | 32 | ```
|
33 | 33 |
|
34 | 34 | - If you have no available GPU on your machine, please run the following command to install the CPU version
|
35 | 35 |
|
36 | 36 | ```bash
|
37 |
| - python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple |
| 37 | + python -m pip install paddlepaddle |
38 | 38 | ```
|
39 | 39 |
|
40 |
| -For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/install/quick) for operation. |
| 40 | +For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/en/install/quick) for operation. |
41 | 41 |
|
42 | 42 | <a name="12-install-paddleocr-whl-package"></a>
|
43 | 43 |
|
@@ -289,8 +289,8 @@ font = ImageFont.truetype("./doc/fonts/simfang.ttf", size=20) # Adjust size as
|
289 | 289 | # Process and draw results
|
290 | 290 | for res in results:
|
291 | 291 | for line in res:
|
292 |
| - box = [tuple(point) for point in line[0]] # Convert list of lists to list of tuples |
293 |
| - # Convert four corners to two corners |
| 292 | + box = [tuple(point) for point in line[0]] |
| 293 | + # Finding the bounding box |
294 | 294 | box = [(min(point[0] for point in box), min(point[1] for point in box)),
|
295 | 295 | (max(point[0] for point in box), max(point[1] for point in box))]
|
296 | 296 | txt = line[1][0]
|
|
0 commit comments