from paddleocr import PaddleOCR, draw_ocr
import time
# Paddleocr目前支持的多语言语种可以通过修改lang参数进行切换
# 例如`ch`, `en`, `fr`, `german`, `korean`, `japan`
ocr = PaddleOCR(use_angle_cls=True,use_npu=True, lang="ch") # need to run only once to download and load model into memory
img_path = './imgs/11.jpg'
result = ocr.ocr(img_path, cls=True)
for idx in range(len(result)):
res = result[idx]
for line in res:
print(line)
python -c "import paddle; paddle.utils.run_check()"
/root/.local/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:686: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
warnings.warn(warning_message)
I1108 15:49:13.433903 112098 init.cc:236] ENV [CUSTOM_DEVICE_ROOT]=/root/.local/lib/python3.10/site-packages/paddle_custom_device
I1108 15:49:13.433957 112098 init.cc:145] Try loading custom device libs from: [/root/.local/lib/python3.10/site-packages/paddle_custom_device]
I1108 15:49:13.977823 112098 custom_device.cc:1099] Succeed in loading custom runtime in lib: /root/.local/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-npu.so
I1108 15:49:13.988801 112098 custom_kernel.cc:63] Succeed in loading 357 custom kernel(s) from loaded lib(s), will be used like native ones.
I1108 15:49:13.989019 112098 init.cc:157] Finished in LoadCustomDevice with libs_path: [/root/.local/lib/python3.10/site-packages/paddle_custom_device]
I1108 15:49:13.989063 112098 init.cc:242] CustomDevice: npu, visible devices count: 1
Running verify PaddlePaddle program ...
I1108 15:49:14.750527 112098 pir_interpreter.cc:1480] New Executor is Running ...
I1108 15:49:14.753567 112098 pir_interpreter.cc:1506] pir interpreter is running by multi-thread mode ...
PaddlePaddle works well on 1 npu.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.
bug描述 Describe the Bug
paddle 使用3.0.0b2分支源码编译,arm架构,操作系统为ubuntu20.04
测试代码
测试命令
报错信息
基础健康检查
其他补充信息 Additional Supplementary Information
No response