介绍
模型的介绍和下载,与模块、解决方案有关,所以入口也分这两个
模块入口
https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/module_usage/text_detection.html#_3
其中,文本识别模块分 server和mobile,如果是普通cpu运行,推荐使用 mobile版本,执行速度快,但精度低
解决方案入口
PP-OCRv5:
https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/pipeline_usage/OCR.html#1-ocr
PP-StructureV3:
https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/pipeline_usage/PP-StructureV3.html
例子
ocr = PaddleOCR(
use_doc_orientation_classify=True, # 文档方向分类
# use_doc_unwarping=False,
use_textline_orientation=True, # 启用行方向分类
text_detection_model_name="PP-OCRv5_mobile_det",
text_recognition_model_name="PP-OCRv5_mobile_rec",
# 古籍识别优化参数
text_det_box_thresh = 0.5, # 检测框阈值调低,提高漏检文字检出率
text_det_thresh = 0.3, # 二值化阈值调低,适应古籍纸张偏黄偏暗特性
)