PaddleOCR识别速度问题
收藏
我了解到PaddleOCR识别一张图片的速度应该在1秒左右,但是我在公司配发的电脑上运行识别一张图片要十秒左右,想请教一下大家这个速度正常吗?有没有提高速度的方式?
我的代码如下:
from paddleocr import PaddleOCR import pyautogui ocr = PaddleOCR(use_gpu=True,lang='ch',use_angle_cls=False) img_path = './Cache/capture.png' print(1) while True: img = pyautogui.screenshot(region=(260, 80, 1100, 920)) img.save(img_path,quality=25) result = ocr.ocr(img_path) print("处理完毕")
代码的输出如下:
[2024/01/10 18:05:14] ppocr WARNING: Since the angle classifier is not initialized, it will not be used during the forward process [2024/01/10 18:05:15] ppocr DEBUG: dt_boxes num : 39, elapsed : 0.967134952545166 [2024/01/10 18:05:23] ppocr DEBUG: rec_res num : 39, elapsed : 8.143852233886719 处理完毕 [2024/01/10 18:05:23] ppocr WARNING: Since the angle classifier is not initialized, it will not be used during the forward process [2024/01/10 18:05:24] ppocr DEBUG: dt_boxes num : 40, elapsed : 1.1364779472351074 [2024/01/10 18:05:35] ppocr DEBUG: rec_res num : 40, elapsed : 11.155273199081421 处理完毕 [2024/01/10 18:05:35] ppocr WARNING: Since the angle classifier is not initialized, it will not be used during the forward process [2024/01/10 18:05:36] ppocr DEBUG: dt_boxes num : 42, elapsed : 1.1929733753204346 [2024/01/10 18:05:45] ppocr DEBUG: rec_res num : 42, elapsed : 8.7143075466156 处理完毕
可以看到一张图片要十秒左右才能处理完毕。
我的电脑配置如下:
使用的是CPU进行计算。
0
收藏
请登录后评论