Instructions to use PaddlePaddle/PaddleOCR-VL-1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PaddleOCR-VL-1.5 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.5") 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
RuntimeError
py -V:3.12 -m pip install --force-reinstall paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
py -V:3.12 -m pip install --force-reinstall -U "paddleocr[doc-parser]"
py -V:3.12 .\paddleOCRVL.py
运行时报错
Traceback (most recent call last):
File "C:\tools\ocr\paddleOCRVL.py", line 3, in
output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\qwj\AppData\Local\Python\pythoncore-3.12-64\Lib\site-packages\paddleocr_pipelines\paddleocr_vl.py", line 183, in predict
return list(
^^^^^
File "C:\Users\qwj\AppData\Local\Python\pythoncore-3.12-64\Lib\site-packages\paddlex\inference\pipelines_parallel.py", line 139, in predict
yield from self._pipeline.predict(
File "C:\Users\qwj\AppData\Local\Python\pythoncore-3.12-64\Lib\site-packages\paddlex\inference\pipelines\paddleocr_vl\pipeline.py", line 889, in predict
raise RuntimeError(
RuntimeError: Exception from the 'vlm' worker: only 0-dimensional arrays can be converted to Python scalars
sys:1: DeprecationWarning: builtin type swigvarlink has no module attribute
check:
print(paddle.device.get_device())
print(paddle.version.cuda())
print(paddle.version.cudnn())
gpu:0
12.6
9.9.0 (9.5 一样)
I got the same error and fixed it by downgrading numpy to <2.4.0
I got the same error and fixed it by downgrading numpy to <2.4.0
thanks,it works