- 自动调参: 自动分析照片类型(闪光灯/偏暗/模糊/正常),按类型选最优参数 - 大小写金额交叉验证: chinese_amount_to_number 大写→数字,自动比对合计 - 双管线识别: PPStructure TableMaster → 回退 DB+SVTR - 外置配置: config.yaml 集中管理所有参数,部署只需改这一个文件 - 模块化拆分: preprocessor / recognizer / parser / postprocessor / excel_writer
17 lines
354 B
Bash
Executable File
17 lines
354 B
Bash
Executable File
#!/bin/bash
|
|
# KOCR v4 — 快捷调用脚本
|
|
# 用法: ./kocr.sh [参数] # 项目中执行
|
|
# 或: bash kocr.sh [参数] # 任何目录执行
|
|
#
|
|
# 自动定位项目根目录
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
# 检查虚拟环境
|
|
if [ -n "$VIRTUAL_ENV" ]; then
|
|
python3 kocr.py "$@"
|
|
else
|
|
python3 kocr.py "$@"
|
|
fi
|