Image-Text-to-Text
PaddleOCR
Safetensors
English
Chinese
multilingual
paddleocr_vl
ERNIE4.5
PaddlePaddle
image-to-text
ocr
document-parse
layout
table
formula
chart
conversational
custom_code
Eval Results
Instructions to use PaddlePaddle/PaddleOCR-VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PaddleOCR-VL with PaddleOCR:
# See https://www.paddleocr.ai/latest/version3.x/pipeline_usage/PaddleOCR-VL.html to installation from paddleocr import PaddleOCRVL pipeline = PaddleOCRVL(pipeline_version="v1") output = pipeline.predict("path/to/document_image.png") for res in output: res.print() res.save_to_json(save_path="output") res.save_to_markdown(save_path="output") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,22 +87,15 @@ Install [PaddlePaddle](https://www.paddlepaddle.org.cn/install/quick) and [Paddl
|
|
| 87 |
```bash
|
| 88 |
# The following command installs the PaddlePaddle version for CUDA 12.6. For other CUDA versions and the CPU version, please refer to https://www.paddlepaddle.org.cn/en/install/quick?docurl=/documentation/docs/en/develop/install/pip/linux-pip_en.html
|
| 89 |
python -m pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
|
| 90 |
-
python -m pip install -U "paddleocr[doc-parser]"
|
| 91 |
-
# For Linux systems, run:
|
| 92 |
-
python -m pip install https://paddle-whl.bj.bcebos.com/nightly/cu126/safetensors/safetensors-0.6.2.dev0-cp38-abi3-linux_x86_64.whl
|
| 93 |
-
# For Windows systems, run:
|
| 94 |
-
python -m pip install https://xly-devops.cdn.bcebos.com/safetensors-nightly/safetensors-0.6.2.dev0-cp38-abi3-win_amd64.whl
|
| 95 |
```
|
| 96 |
|
| 97 |
-
> **Please ensure that you install PaddlePaddle framework version 3.2.1 or above, along with the special version of safetensors.** For macOS users, please use Docker to set up the environment.
|
| 98 |
-
|
| 99 |
-
|
| 100 |
### Basic Usage
|
| 101 |
|
| 102 |
CLI usage:
|
| 103 |
|
| 104 |
```bash
|
| 105 |
-
paddleocr doc_parser -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png
|
| 106 |
```
|
| 107 |
|
| 108 |
Python API usage:
|
|
@@ -130,7 +123,7 @@ for res in output:
|
|
| 130 |
--rm \
|
| 131 |
--gpus all \
|
| 132 |
--network host \
|
| 133 |
-
ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-vllm-server:latest \
|
| 134 |
paddleocr genai_server --model_name PaddleOCR-VL-0.9B --host 0.0.0.0 --port 8080 --backend vllm
|
| 135 |
```
|
| 136 |
|
|
@@ -143,13 +136,14 @@ for res in output:
|
|
| 143 |
```bash
|
| 144 |
paddleocr doc_parser \
|
| 145 |
-i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png \
|
|
|
|
| 146 |
--vl_rec_backend vllm-server \
|
| 147 |
--vl_rec_server_url http://127.0.0.1:8080/v1
|
| 148 |
```
|
| 149 |
|
| 150 |
```python
|
| 151 |
from paddleocr import PaddleOCRVL
|
| 152 |
-
pipeline = PaddleOCRVL(vl_rec_backend="vllm-server", vl_rec_server_url="http://127.0.0.1:8080/v1")
|
| 153 |
output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png")
|
| 154 |
for res in output:
|
| 155 |
res.print()
|
|
|
|
| 87 |
```bash
|
| 88 |
# The following command installs the PaddlePaddle version for CUDA 12.6. For other CUDA versions and the CPU version, please refer to https://www.paddlepaddle.org.cn/en/install/quick?docurl=/documentation/docs/en/develop/install/pip/linux-pip_en.html
|
| 89 |
python -m pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
|
| 90 |
+
python -m pip install -U "paddleocr[doc-parser]>=3.4.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
```
|
| 92 |
|
|
|
|
|
|
|
|
|
|
| 93 |
### Basic Usage
|
| 94 |
|
| 95 |
CLI usage:
|
| 96 |
|
| 97 |
```bash
|
| 98 |
+
paddleocr doc_parser -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png --pipeline_version v1
|
| 99 |
```
|
| 100 |
|
| 101 |
Python API usage:
|
|
|
|
| 123 |
--rm \
|
| 124 |
--gpus all \
|
| 125 |
--network host \
|
| 126 |
+
ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-vllm-server:latest-nvidia-gpu \
|
| 127 |
paddleocr genai_server --model_name PaddleOCR-VL-0.9B --host 0.0.0.0 --port 8080 --backend vllm
|
| 128 |
```
|
| 129 |
|
|
|
|
| 136 |
```bash
|
| 137 |
paddleocr doc_parser \
|
| 138 |
-i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png \
|
| 139 |
+
--pipeline_version v1 \
|
| 140 |
--vl_rec_backend vllm-server \
|
| 141 |
--vl_rec_server_url http://127.0.0.1:8080/v1
|
| 142 |
```
|
| 143 |
|
| 144 |
```python
|
| 145 |
from paddleocr import PaddleOCRVL
|
| 146 |
+
pipeline = PaddleOCRVL(pipeline_version="v1", vl_rec_backend="vllm-server", vl_rec_server_url="http://127.0.0.1:8080/v1")
|
| 147 |
output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png")
|
| 148 |
for res in output:
|
| 149 |
res.print()
|