u
This commit is contained in:
1 parent
189a085353
commit
c3b6589f52
1 file changed
+38
@@ -0,0 +1,38 @@
|
||||
# 整体 pipeline 名称,用于识别产线名称
|
||||
pipeline_name: OCR
|
||||
|
||||
# 文本类型,可选 general(通用)或 others,决定一些后处理策略
|
||||
text_type: general
|
||||
|
||||
# 如无严重倾斜/扫描件,建议设为 False,可显著提升速度
|
||||
use_doc_preprocessor: False
|
||||
|
||||
# mobile 模型一般建议关闭
|
||||
use_textline_orientation: False
|
||||
|
||||
# 正式的 OCR 主流程模块
|
||||
SubModules:
|
||||
|
||||
# 文本检测模块(通常是基于 DB 的检测器)
|
||||
TextDetection:
|
||||
module_name: text_detection
|
||||
model_name: PP-OCRv5_mobile_det # 使用的是 mobile 版大模型
|
||||
model_dir: ./det_inference # 本地模型文件夹路径(需包含 model.pdmodel 等)
|
||||
# 调大输入尺寸,关注细节
|
||||
limit_side_len: 960
|
||||
limit_type: min
|
||||
max_side_limit: 4000
|
||||
# 降低阈值,减少漏检
|
||||
thresh: 0.3
|
||||
box_thresh: 0.5
|
||||
# 放宽文本框,避免裁字
|
||||
unclip_ratio: 1.8
|
||||
|
||||
# 文本识别模块(通常是 CRNN + CTC 或 SVTR 模型)
|
||||
TextRecognition:
|
||||
module_name: text_recognition
|
||||
model_name: PP-OCRv5_mobile_rec # 同样使用的是 mobile 版识别模型
|
||||
model_dir: ./rec_inference
|
||||
batch_size: 6 # 一次识别图块的数量,适当调大可提高 GPU 利用率
|
||||
score_thresh: 0.0 # 识别结果置信度下限,低于此不输出
|
||||
|
||||
Reference in new issue
Block a user