日常更新

from NUC
This commit is contained in:
liubiren 2025-12-10 22:09:22 +08:00
parent 6a286e7c69
commit 6fd52609e9
1 changed files with 14 additions and 6 deletions

View File

@ -14,7 +14,7 @@ from datetime import datetime
from decimal import Decimal, ROUND_HALF_UP
from hashlib import md5
from pathlib import Path
from typing import Optional, Tuple
from typing import Dict, Optional, Tuple
import cv2
import numpy
@ -1192,10 +1192,17 @@ if __name__ == "__main__":
if image_base64 is None:
raise RuntimeError("旋正后影像件再次压缩发生异常")
global image
return image_base64, image_type, image_orientation
# noinspection PyShadowingNames
def image_recognize(image_base64, image_type) -> Optional[Dict]:
"""
影像件分类并旋正
:param image_base64: 影像件BASE64编码
:param image_type: 影像件类型
:return: 影像件识别内容
"""
# 遍历工作目录中赔案目录并创建赔案档案(模拟自动化域就待自动化任务创建理赔档案)
for case_path in [x for x in directory_path.iterdir() if x.is_dir()]:
# 初始化赔案档案(实际报案层包括保险分公司名称、报案渠道、批次号、报案号和报案时间等)
@ -1249,9 +1256,6 @@ if __name__ == "__main__":
# 将影像件数据添加至影像件层
dossier["影像件层"].append(image)
print(dossier)
exit()
# 影像件识别使能检查,若影像件不识别则跳过
if not recognition_enable.evaluate(
{
@ -1261,6 +1265,10 @@ if __name__ == "__main__":
)["result"]["recognition_enable"]:
continue
# 影像件识别
recognition = image_recognize(image_base64, image_type)
"""