Files
ocr-server/config.yaml
T
zimoyin 11883e260f init
2026-10-11 02:26:26 +08:00

36 lines
908 B
YAML

# OCR Server 配置文件。修改后重启服务生效。
host: 127.0.0.1
port: 8000
# 支持绝对路径或相对项目根目录的路径。
upload_dir: data/uploads
model_dir: models
# 模型缺失时自动下载到 model_dir/official_models/。
det_model_name: PP-OCRv5_server_det
rec_model_name: PP-OCRv5_server_rec
# 每个线程会独立占用一份 OCR 模型内存。
ocr_workers: 1
device: cpu
lang: ch
# 识别速度/精度参数。
# 速度优先可将 text_det_limit_side_len 调小到 640;默认 960。text_recognition_batch_size 调整为 2 默认 1
# 检测图像最长边
text_det_limit_side_len: 960
# 检测缩放类型
text_det_limit_type: max
# 检测阈值
text_det_thresh: 0.3
text_det_box_thresh: 0.6
text_det_unclip_ratio: 1.5
# 识别置信度阈值
text_rec_score_thresh: 0.0
# 识别批量大小
text_recognition_batch_size: 1
max_upload_mb: 10
max_image_pixels: 20000000