"notebooks/vscode:/vscode.git/clone" did not exist on "5472cd417b6c206ebe26a44b5c3fecd308d7eabe"
paddleocr.py 356 Bytes
Newer Older
yangql's avatar
yangql committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#导入rapidocr_onnxruntime
from rapidocr_onnxruntime import RapidOCR

if __name__ == "__main__":
    rapid_ocr = RapidOCR()
    
    #设置图片路径
    image_path = "../Resource/Images/1.jpg"
    with open(image_path, "rb") as f:
        img = f.read()
    
    #对图片进行文字识别
    result, elapse_list = rapid_ocr(img)
    print(result)