Files
fcb_photo_review/photo_mask/__init__.py

30 lines
828 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
# 备份原图的尝试次数
COPY_TRY_TIMES = 3
# 上传新图的尝试次数
UPLOAD_TRY_TIMES = 3
"""
关键词配置
"""
NAME_KEYS = [
{"key": "姓名", "length": 4},
{"key": "娃名", "length": 4},
{"key": "款人", "length": 4},
{"key": "购买方名称", "length": 4},
]
ID_CARD_NUM_KEYS = [{"key": "身份证号", "length": 19}, ]
# 如果不希望识别出空格可以设置use_space_char=False。做此项设置一定要测试2.7.3版本此项设置有bug会导致识别失败
OCR = PaddleOCR(use_angle_cls=False, show_log=False, det_db_box_thresh=0.3)