PaddleOCR 3.0 安装及使用

参考:https://gitee.com/paddlepaddle/PaddleOCR#-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B

from paddleocr import PaddleOCR
# 初始化 PaddleOCR 实例
ocr = PaddleOCR()
# 对示例图像执行 OCR 推理 
result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
# 可视化结果并保存 json 结果
for res in result:
    res.print()
    res.save_to_img("output")
    res.save_to_json("output")

 

posted @ 2025-06-03 11:36  cup_leo  阅读(800)  评论(0)    收藏  举报