优化照片涂抹功能架构

This commit is contained in:
2024-07-15 12:18:36 +08:00
parent ab15cb1fc3
commit a0997e0673
6 changed files with 535 additions and 438 deletions

28
photo_mask/__init__.py Normal file
View File

@@ -0,0 +1,28 @@
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}, ]
OCR = PaddleOCR(use_angle_cls=False, show_log=False, gpu_id=1)