Files
fcb_photo_review/photo_mask/__init__.py
2024-07-25 14:36:01 +08:00

35 lines
952 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from paddleocr import PaddleOCR
"""
项目配置
"""
# 每次从数据库获取的案子数量
PHHD_BATCH_SIZE = 20
# 没有查询到案子的等待时间(分钟)
SLEEP_MINUTES = 5
# 是否发送异常提醒邮件
SEND_ERROR_EMAIL = True
"""
关键词配置
"""
# 使用正则匹配
NAME_KEYS = [
{"key": "^名[:|]$", "length": 3}, # 可能误涂
{"key": "[姓|娃]名", "length": 4},
{"key": "款人", "length": 4},
{"key": "[交|文][^病]人", "length": 4},
{"key": "购买方名称", "length": 4},
]
ID_CARD_NUM_KEYS = [
{"key": "[身]?份证号", "length": 19},
]
# 形近字,只对姓名涂抹生效
SIMILAR_CHAR = {
"": [""]
}
# 如果不希望识别出空格可以设置use_space_char=False。做此项设置一定要测试2.7.3版本此项设置有bug会导致识别失败
OCR = PaddleOCR(use_angle_cls=False, show_log=False, det_db_box_thresh=0.1, det_limit_side_len=1248, drop_score=0.3)