Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
try:
from paddleocr import PaddleOCR
ocr = PaddleOCR(use_angle_cls=True, lang="ch") # need to run only once to download and load model into memory
img_path = 'test.png'
result = ocr.ocr(img_path, cls=True)
for idx in range(len(result)):
res = result[idx]
for line in res:
print(line)
except Exception as e:
traceback.print_exc()
Traceback (most recent call last):
File "test.py", line 7, in
from paddleocr import PaddleOCR
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "paddleocr__init.py", line 14, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "paddleocr\paddleocr.py", line 43, in
File "paddleocr\paddleocr.py", line 37, in _import_file
File "", line 879, in exec_module
File "", line 1016, in get_code
File "", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\18191\AppData\Local\Temp\_MEI86442\paddleocr\tools/init__.py'
我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no): yes
请尽量不要包含图片在问题中/Please try to not include the image in the issue.
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
try: from paddleocr import PaddleOCR ocr = PaddleOCR(use_angle_cls=True, lang="ch") # need to run only once to download and load model into memory img_path = 'test.png' result = ocr.ocr(img_path, cls=True) for idx in range(len(result)): res = result[idx] for line in res: print(line) except Exception as e: traceback.print_exc()
Traceback (most recent call last): File "test.py", line 7, in
from paddleocr import PaddleOCR
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "paddleocr__init.py", line 14, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "paddleocr\paddleocr.py", line 43, in
File "paddleocr\paddleocr.py", line 37, in _import_file
File "", line 879, in exec_module
File "", line 1016, in get_code
File "", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\18191\AppData\Local\Temp\_MEI86442\paddleocr\tools/ init__.py'