init
This commit is contained in:
14
test001.py
Normal file
14
test001.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from paddleocr import PaddleOCR
|
||||
# 初始化 PaddleOCR 实例
|
||||
ocr = PaddleOCR(
|
||||
use_doc_orientation_classify=False,
|
||||
use_doc_unwarping=False,
|
||||
use_textline_orientation=False)
|
||||
# 对示例图像执行 OCR 推理
|
||||
result = ocr.predict(
|
||||
input="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")
|
Reference in New Issue
Block a user