-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paddleocr在昇腾910b上非常缓慢 #13977
Comments
加上以下环境变量试试 |
谢谢,基本解决问题,还是有个疑问,它这个东西有没有类似tensorrt的缓存机制,否则每次重启应用之后都要先预热一遍,这个太麻烦了 |
问一下,有没有910b的安装文档,我用paddleocr很慢还报错Warning: tiling offset out of range, index: 32。 |
npu上第一次运行会触发一些算子的编译,所以第一次会慢一些,这个是npu硬件相关的机制,目前可能也很难避免哈,后续我们看看能不能优化一下。 |
可以参考这个文档:https:/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/multy_devices_use_guide.md |
好的谢谢,还要问一下paddleocr和paddlex哪个能支持昇腾910吗? |
都支持昇腾910B的 |
🔎 Search before asking
🐛 Bug (问题描述)
刚开始我以为是图片尺寸问题,然后我进行了归一化处理,将所有大小的图片都标准化成同样大小,但是只要换一张图片,速度基本就编程2、3分钟一张图片,这是什么原因
🏃♂️ Environment (运行环境)
cann 8.0.1
docker 24.0.1
firmware 24.0.1rc
就是按照官方的docker镜像来进行的
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
ppocr = paddleocr.PaddleOCR(use_angle_cls=False, lang="ch"
, det_model_dir="model/ch_PP-OCRv4_det"
, rec_model_dir="model/ch_PP-OCRv4_rec"
, cls_model_dir="model/ch_ppocr_mobile_v2.0_cls_infer"
, use_npu=True, det_db_thresh = params['DET_DB_THRESH']
, det_db_box_thresh = params['DET_DB_BOX_THRESH']
, det_db_score_mode = params['DET_DB_SCORE_MODE']
, enable_mkldnn=False
, rec_batch_num = 16
)
T3 = time.perf_counter()
result = ppocr.ocr(array, cls=False)
T4 = time.perf_counter()
The text was updated successfully, but these errors were encountered: