weijiang2024 commited on
Commit
88e28b1
·
verified ·
1 Parent(s): 7ca293d

Upload folder using huggingface_hub

Browse files
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
.gitattributes CHANGED
@@ -54,3 +54,4 @@ data/exp3.in/origin/20240722-175852.091-6.jpg filter=lfs diff=lfs merge=lfs -tex
54
  data/exp3.in/origin/20240722-175852.091-7.jpg filter=lfs diff=lfs merge=lfs -text
55
  data/exp3.in/origin/20240722-175852.091-8.jpg filter=lfs diff=lfs merge=lfs -text
56
  data/exp3.in/origin/20240722-175852.091-9.jpg filter=lfs diff=lfs merge=lfs -text
 
 
54
  data/exp3.in/origin/20240722-175852.091-7.jpg filter=lfs diff=lfs merge=lfs -text
55
  data/exp3.in/origin/20240722-175852.091-8.jpg filter=lfs diff=lfs merge=lfs -text
56
  data/exp3.in/origin/20240722-175852.091-9.jpg filter=lfs diff=lfs merge=lfs -text
57
+ img/demo.ui.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -4,34 +4,46 @@ app_file: app.py
4
  sdk: gradio
5
  sdk_version: 4.29.0
6
  ---
7
- ## 基于广州北京路商圈来往时尚用户及趋势被动发现模块
 
 
 
8
  ### 目标
9
- *
10
- ### 模型训练 & 预测
11
- * 模型训练狭义:准备数据集 通过正向传播 及 反向传播 及 梯度下降等核心DL算法 输出一个经权重迭代后的神经网络
12
- * 模型训练广义:
13
- * 基模型的灵活使用
14
- * AIGC知识库的不断更新 及 RAG算法的调优
15
- * 价值及安全对齐 如时尚
16
- * 模型训练:每天都有增量的黄金标准,每天都根据专家咨询意见(如小玲买手)整理知识库 调节智能体各部分设定 以达到复制人脑部分功能的目标
17
- * 模型预测:专家给出一个分数及文本原因 机器智能体也给出一个分数及文本原因 不断优化 不断拟合 total loss value 不断下降
18
-
19
- ### 技术架构
20
- * 1.0
21
- * 直接控制摄像头并拍照
22
- * 传给分析模块
23
- * 触发被动用户注册及时尚分数评估
24
- * 完成最终入库逻辑
25
- * 1.1
26
- * 实时视频流成为单独 微服务
27
- * 截取图片 后续逻辑不变
28
- * 1.2
29
- * 实时视频流成为单独 微服务
30
- * 向外提供一个API接口 输入实时视频流
31
- * 计算:完整的入库
32
- * 输出:用json返回运行结果
33
 
 
 
34
 
 
 
35
 
 
 
36
 
 
 
 
 
 
 
 
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  sdk: gradio
5
  sdk_version: 4.29.0
6
  ---
7
+
8
+ ## 认知计算时尚模块
9
+ ![](./img/demo.ui.png)
10
+
11
  ### 目标
12
+ * 上传一张图片,小玲智能体对时尚图片进行感知,并根据AIGC知识库及模型,给出相关权威时尚分数及穿搭建议。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ ### 如何在本地运行
15
+ * gradio app.py
16
 
17
+ ### 如何进行部署
18
+ * gradio deploy
19
 
20
+ ### huggingface 空间
21
+ * https://huggingface.co/spaces/weijiang2024/Suanfamama_Cognitive_Computational_Fashion
22
 
23
+ ### 智能体训练 & 预测
24
+ #### 训练
25
+ * 与真人专家 对齐 时尚评分
26
+ * 与真人专家 对齐 时尚穿搭建议
27
+ * 与真人专家 对齐 感知维度
28
+ #### 预测
29
+ * 部分替代真人专家职能,根据认知计算时尚理论框架,为广大消费者提供专业且权威的穿搭建议,并作商品及服务推荐。
30
 
31
+ ### 模型训练 & 预测
32
+ #### 训练
33
+ * loss(每张图):abs(真人专家分数 - 模型本次迭代所预测分数)
34
+ * loss(总):
35
+ * 损失函数:
36
+ * 优化总损失使其最小化:
37
+ #### 预测
38
+ * 11个时尚维度感知,分别为上衣、下衣
39
+
40
+ ### 技术架构推演
41
+ * 1.0
42
+ 1. 摄像头
43
+ 2. 分析模块
44
+ 3. 被动用户注册
45
+ 4. 入库
46
+ * 1.1
47
+ * 微服务
48
+ * 1.2
49
+ * 智能API接口(实时视频流)
__pycache__/app.cpython-311.pyc ADDED
Binary file (7.32 kB). View file
 
__pycache__/eval_fashion_person.cpython-311.pyc CHANGED
Binary files a/__pycache__/eval_fashion_person.cpython-311.pyc and b/__pycache__/eval_fashion_person.cpython-311.pyc differ
 
__pycache__/name_entity_recognition.cpython-311.pyc ADDED
Binary file (2.67 kB). View file
 
app.py CHANGED
@@ -3,21 +3,48 @@ import gradio as gr
3
  from eval_fashion_person import *
4
  from name_entity_recognition import *
5
  from utils.operate_json import *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
 
8
  def eval_image(input_image, progress=gr.Progress()):
9
  if input_image is None:
10
  raise gr.Error("未上传图片,请先上传图片")
11
  progress((0, 3), desc="上传图片中")
 
 
12
  img_name = get_one_name()
13
  input_image = output_to_binary(input_image)
14
  save_tx(file_data=input_image,
15
  file_name=img_name)
16
  progress((1, 3), desc="评估分数中")
 
 
17
  data = eval_fashion_person_tx_url(img_name)
18
  progress((2, 3), desc="识别类型中")
 
 
19
  reason = data['fashion_eval_reason']
20
  score = data['fashion_score_predict']
 
 
21
  score = ("未识别出" if score == -1 else score)
22
  data = {}
23
  while not data:
@@ -53,31 +80,32 @@ def eval_image(input_image, progress=gr.Progress()):
53
 
54
 
55
  with gr.Blocks() as demo:
 
 
56
  with gr.Row():
57
  with gr.Column():
58
  Image_input = gr.Image(label="请上传图片",
59
  height=640,
60
- width=640,
61
  show_share_button=False)
62
  with gr.Row():
63
- run_button = gr.Button(value="开始评估")
64
- score = gr.Textbox(label="评分")
65
  with gr.Column():
66
  with gr.Group():
67
  with gr.Row():
68
  with gr.Column():
69
- type = gr.Textbox(label="人物类型")
70
- headgear = gr.Textbox(label="帽子类型")
71
- shoe = gr.Textbox(label="鞋子类型")
72
- backpack = gr.Textbox(label="背包类型")
73
- countenance = gr.Textbox(label="表情类型")
74
  with gr.Column():
75
- upper_garment = gr.Textbox(label="上衣类型")
76
- lower_garment = gr.Textbox(label="下衣类型")
77
- sock = gr.Textbox(label="袜子类型")
78
- accessory = gr.Textbox(label="配饰类型")
79
- action = gr.Textbox(label="动作类型")
80
- text_output = gr.Textbox(label="时尚买手小玲评估结果")
81
 
82
  run_button.click(eval_image,
83
  inputs=Image_input,
@@ -94,4 +122,4 @@ with gr.Blocks() as demo:
94
  action,
95
  countenance])
96
 
97
- demo.queue().launch()
 
3
  from eval_fashion_person import *
4
  from name_entity_recognition import *
5
  from utils.operate_json import *
6
+ import logging
7
+
8
+ # Create a logger
9
+ logger = logging.getLogger(__name__)
10
+
11
+ # Set the logging level
12
+ logger.setLevel(logging.DEBUG)
13
+
14
+ # Create a file handler
15
+ file_handler = logging.FileHandler('my_app.log')
16
+
17
+ # Create a formatter
18
+ formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
19
+
20
+ # Add the formatter to the handler
21
+ file_handler.setFormatter(formatter)
22
+
23
+ # Add the handler to the logger
24
+ logger.addHandler(file_handler)
25
 
26
 
27
  def eval_image(input_image, progress=gr.Progress()):
28
  if input_image is None:
29
  raise gr.Error("未上传图片,请先上传图片")
30
  progress((0, 3), desc="上传图片中")
31
+ logger.debug("上传图片中")
32
+
33
  img_name = get_one_name()
34
  input_image = output_to_binary(input_image)
35
  save_tx(file_data=input_image,
36
  file_name=img_name)
37
  progress((1, 3), desc="评估分数中")
38
+ logger.debug("评估分数中")
39
+
40
  data = eval_fashion_person_tx_url(img_name)
41
  progress((2, 3), desc="识别类型中")
42
+ logger.debug("识别类型中")
43
+
44
  reason = data['fashion_eval_reason']
45
  score = data['fashion_score_predict']
46
+ logger.debug(data, reason, score)
47
+
48
  score = ("未识别出" if score == -1 else score)
49
  data = {}
50
  while not data:
 
80
 
81
 
82
  with gr.Blocks() as demo:
83
+ demo.title = "时尚买手小玲智能体" # Add title
84
+ demo.description = "上传一张人物图片,让时尚买手小玲为你评估穿搭!" # Add description
85
  with gr.Row():
86
  with gr.Column():
87
  Image_input = gr.Image(label="请上传图片",
88
  height=640,
 
89
  show_share_button=False)
90
  with gr.Row():
91
+ run_button = gr.Button(value="智能时尚评估")
92
+ score = gr.Textbox(label="认知计算时尚总得分")
93
  with gr.Column():
94
  with gr.Group():
95
  with gr.Row():
96
  with gr.Column():
97
+ type = gr.Textbox(label="认知-人物类型")
98
+ headgear = gr.Textbox(label="认知-帽子类型")
99
+ shoe = gr.Textbox(label="认知-鞋子类型")
100
+ backpack = gr.Textbox(label="认知-背包类型")
101
+ countenance = gr.Textbox(label="认知-表情类型")
102
  with gr.Column():
103
+ upper_garment = gr.Textbox(label="认知-上衣类型")
104
+ lower_garment = gr.Textbox(label="认知-下衣类型")
105
+ sock = gr.Textbox(label="认知-袜子类型")
106
+ accessory = gr.Textbox(label="认知-配饰类型")
107
+ action = gr.Textbox(label="认知-动作类型")
108
+ text_output = gr.Textbox(label="小玲时尚穿搭建议")
109
 
110
  run_button.click(eval_image,
111
  inputs=Image_input,
 
122
  action,
123
  countenance])
124
 
125
+ demo.queue().launch(share=True)
eval_fashion_person.py CHANGED
@@ -2,8 +2,26 @@ import requests
2
  import os
3
 
4
  from utils.operate_tx import *
5
- from utils.utils import *
 
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  # AI评估人物图像(URL)
9
  def eval_fashion_person(img_url):
@@ -45,7 +63,10 @@ def eval_fashion_person(img_url):
45
  def eval_fashion_person_tx_url(img_name):
46
  person_name = img_name.split(".")[0]
47
  img_url = generate_tx_presigned_url(img_name)
 
 
48
  score, conclusion = get_score_conclusion(img_url)
 
49
  result = {"username": person_name,
50
  "avatar_url": img_url,
51
  "fashion_score_predict": score,
 
2
  import os
3
 
4
  from utils.operate_tx import *
5
+ from utils.mama_utils import *
6
+ import logging
7
 
8
+ # Create a logger
9
+ logger = logging.getLogger(__name__)
10
+
11
+ # Set the logging level
12
+ logger.setLevel(logging.DEBUG)
13
+
14
+ # Create a file handler
15
+ file_handler = logging.FileHandler('my_app.log')
16
+
17
+ # Create a formatter
18
+ formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
19
+
20
+ # Add the formatter to the handler
21
+ file_handler.setFormatter(formatter)
22
+
23
+ # Add the handler to the logger
24
+ logger.addHandler(file_handler)
25
 
26
  # AI评估人物图像(URL)
27
  def eval_fashion_person(img_url):
 
63
  def eval_fashion_person_tx_url(img_name):
64
  person_name = img_name.split(".")[0]
65
  img_url = generate_tx_presigned_url(img_name)
66
+ logger.debug(person_name, img_url)
67
+
68
  score, conclusion = get_score_conclusion(img_url)
69
+ logger.debug(score, conclusion)
70
  result = {"username": person_name,
71
  "avatar_url": img_url,
72
  "fashion_score_predict": score,
eval_model.py CHANGED
@@ -1,7 +1,7 @@
1
  from datetime import datetime
2
 
3
  from utils.operate_csv import *
4
- from utils.utils import *
5
  from utils.app import *
6
 
7
 
 
1
  from datetime import datetime
2
 
3
  from utils.operate_csv import *
4
+ from algs.alg0.utils.mama_utils import *
5
  from utils.app import *
6
 
7
 
img/demo.ui.png ADDED

Git LFS Details

  • SHA256: f739c7449f52c0ad4a224931a3a89c619da5ed62e3cb3d9d4609109da75bc356
  • Pointer size: 132 Bytes
  • Size of remote file: 2.83 MB
my_app.log ADDED
@@ -0,0 +1,600 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
2
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
3
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
4
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
5
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
6
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
7
+ 2024-08-08 22:39:04,625 - app - DEBUG - 上传图片中
8
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
9
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
10
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
11
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
12
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
13
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
14
+ 2024-08-08 22:39:07,213 - app - DEBUG - 评估分数中
15
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
16
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
17
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
18
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
19
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
20
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
21
+ 2024-08-08 22:39:14,940 - app - DEBUG - 识别类型中
22
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
23
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
24
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
25
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
26
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
27
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
28
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
29
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
30
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
31
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
32
+ 2024-08-08 22:44:44,875 - app - DEBUG - 上传图片中
33
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
34
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
35
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
36
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
37
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
38
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
39
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
40
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
41
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
42
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
43
+ 2024-08-08 22:44:46,615 - app - DEBUG - 评估分数中
44
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
45
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
46
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
47
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
48
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
49
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
50
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
51
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
52
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
53
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
54
+ 2024-08-08 22:45:01,877 - app - DEBUG - 识别类型中
55
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
56
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
57
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
58
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
59
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
60
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
61
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
62
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
63
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
64
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
65
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
66
+ 2024-08-08 22:46:56,208 - app - DEBUG - 上传图片中
67
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
68
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
69
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
70
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
71
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
72
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
73
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
74
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
75
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
76
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
77
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
78
+ 2024-08-08 22:46:58,485 - app - DEBUG - 评估分数中
79
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
80
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
81
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
82
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
83
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
84
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
85
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
86
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
87
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
88
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
89
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
90
+ 2024-08-08 22:47:12,701 - app - DEBUG - 识别类型中
91
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
92
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
93
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
94
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
95
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
96
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
97
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
98
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
99
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
100
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
101
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
102
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
103
+ 2024-08-08 22:48:55,875 - app - DEBUG - 上传图片中
104
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
105
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
106
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
107
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
108
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
109
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
110
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
111
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
112
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
113
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
114
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
115
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
116
+ 2024-08-08 22:48:57,448 - app - DEBUG - 评估分数中
117
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
118
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
119
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
120
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
121
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
122
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
123
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
124
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
125
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
126
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
127
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
128
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
129
+ 2024-08-08 22:49:13,566 - app - DEBUG - 识别类型中
130
+ 2024-08-08 22:51:12,351 - __main__ - DEBUG - 上传图片中
131
+ 2024-08-08 22:51:17,531 - __main__ - DEBUG - 评估分数中
132
+ 2024-08-08 22:51:33,870 - __main__ - DEBUG - 识别类型中
133
+ 2024-08-08 22:54:58,094 - app - DEBUG - 上传图片中
134
+ 2024-08-08 22:54:58,094 - app - DEBUG - 上传图片中
135
+ 2024-08-08 22:54:58,094 - app - DEBUG - 上传图片中
136
+ 2024-08-08 22:54:58,094 - app - DEBUG - 上传图片中
137
+ 2024-08-08 22:54:58,094 - app - DEBUG - 上传图片中
138
+ 2024-08-08 22:54:59,620 - app - DEBUG - 评估分数中
139
+ 2024-08-08 22:54:59,620 - app - DEBUG - 评估分数中
140
+ 2024-08-08 22:54:59,620 - app - DEBUG - 评估分数中
141
+ 2024-08-08 22:54:59,620 - app - DEBUG - 评估分数中
142
+ 2024-08-08 22:54:59,620 - app - DEBUG - 评估分数中
143
+ 2024-08-08 22:55:17,233 - app - DEBUG - 识别类型中
144
+ 2024-08-08 22:55:17,233 - app - DEBUG - 识别类型中
145
+ 2024-08-08 22:55:17,233 - app - DEBUG - 识别类型中
146
+ 2024-08-08 22:55:17,233 - app - DEBUG - 识别类型中
147
+ 2024-08-08 22:55:17,233 - app - DEBUG - 识别类型中
148
+ 2024-08-08 22:55:17,235 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
149
+ 2024-08-08 22:55:17,235 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
150
+ 2024-08-08 22:55:17,235 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
151
+ 2024-08-08 22:55:17,235 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
152
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
153
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
154
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
155
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
156
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
157
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
158
+ 2024-08-08 22:58:21,002 - app - DEBUG - 上传图片中
159
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
160
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
161
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
162
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
163
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
164
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
165
+ 2024-08-08 22:58:23,640 - app - DEBUG - 评估分数中
166
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
167
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
168
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
169
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
170
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
171
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
172
+ 2024-08-08 22:58:36,981 - app - DEBUG - 识别类型中
173
+ 2024-08-08 22:58:36,991 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
174
+ 2024-08-08 22:58:36,991 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
175
+ 2024-08-08 22:58:36,991 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
176
+ 2024-08-08 22:58:36,991 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
177
+ 2024-08-08 23:05:45,819 - __main__ - DEBUG - 上传图片中
178
+ 2024-08-08 23:05:47,472 - __main__ - DEBUG - 评估分数中
179
+ 2024-08-08 23:06:04,356 - __main__ - DEBUG - 识别类型中
180
+ 2024-08-08 23:06:04,357 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
181
+ 2024-08-08 23:06:42,562 - app - DEBUG - 上传图片中
182
+ 2024-08-08 23:06:42,562 - app - DEBUG - 上传图片中
183
+ 2024-08-08 23:06:45,535 - app - DEBUG - 评估分数中
184
+ 2024-08-08 23:06:45,535 - app - DEBUG - 评估分数中
185
+ 2024-08-08 23:06:52,597 - app - DEBUG - 识别类型中
186
+ 2024-08-08 23:06:52,597 - app - DEBUG - 识别类型中
187
+ 2024-08-08 23:06:52,599 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
188
+ 2024-08-08 23:06:55,480 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
189
+ 2024-08-08 23:07:46,269 - app - DEBUG - 上传图片中
190
+ 2024-08-08 23:07:46,269 - app - DEBUG - 上传图片中
191
+ 2024-08-08 23:07:47,923 - app - DEBUG - 评估分数中
192
+ 2024-08-08 23:07:47,923 - app - DEBUG - 评估分数中
193
+ 2024-08-08 23:07:56,091 - app - DEBUG - 识别类型中
194
+ 2024-08-08 23:07:56,091 - app - DEBUG - 识别类型中
195
+ 2024-08-08 23:07:56,095 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
196
+ 2024-08-08 23:08:02,608 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
197
+ 2024-08-08 23:08:06,882 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
198
+ 2024-08-08 23:08:10,953 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
199
+ 2024-08-08 23:09:11,732 - app - DEBUG - 上传图片中
200
+ 2024-08-08 23:09:11,732 - app - DEBUG - 上传图片中
201
+ 2024-08-08 23:09:13,321 - app - DEBUG - 评估分数中
202
+ 2024-08-08 23:09:13,321 - app - DEBUG - 评估分数中
203
+ 2024-08-08 23:09:22,106 - app - DEBUG - 识别类型中
204
+ 2024-08-08 23:09:22,106 - app - DEBUG - 识别类型中
205
+ 2024-08-08 23:09:22,108 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
206
+ 2024-08-08 23:09:23,794 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
207
+ 2024-08-08 23:09:26,106 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
208
+ 2024-08-08 23:09:29,897 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
209
+ 2024-08-08 23:10:54,644 - app - DEBUG - 上传图片中
210
+ 2024-08-08 23:10:54,644 - app - DEBUG - 上传图片中
211
+ 2024-08-08 23:11:05,747 - app - DEBUG - 评估分数中
212
+ 2024-08-08 23:11:05,747 - app - DEBUG - 评估分数中
213
+ 2024-08-08 23:11:24,989 - app - DEBUG - 识别类型中
214
+ 2024-08-08 23:11:24,989 - app - DEBUG - 识别类型中
215
+ 2024-08-08 23:11:24,993 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
216
+ 2024-08-08 23:13:15,930 - app - DEBUG - 上传图片中
217
+ 2024-08-08 23:13:15,930 - app - DEBUG - 上传图片中
218
+ 2024-08-08 23:13:21,465 - app - DEBUG - 评估分数中
219
+ 2024-08-08 23:13:21,465 - app - DEBUG - 评估分数中
220
+ 2024-08-08 23:13:38,516 - app - DEBUG - 识别类型中
221
+ 2024-08-08 23:13:38,516 - app - DEBUG - 识别类型中
222
+ 2024-08-08 23:13:38,521 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
223
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
224
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
225
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
226
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
227
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
228
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
229
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
230
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
231
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
232
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
233
+ 2024-08-08 23:17:42,852 - app - DEBUG - 上传图片中
234
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
235
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
236
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
237
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
238
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
239
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
240
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
241
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
242
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
243
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
244
+ 2024-08-08 23:17:49,739 - app - DEBUG - 评估分数中
245
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
246
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
247
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
248
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
249
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
250
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
251
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
252
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
253
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
254
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
255
+ 2024-08-08 23:17:57,083 - app - DEBUG - 识别类型中
256
+ 2024-08-08 23:17:57,089 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
257
+ 2024-08-08 23:17:59,627 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
258
+ 2024-08-08 23:18:03,994 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
259
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
260
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
261
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
262
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
263
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
264
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
265
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
266
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
267
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
268
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
269
+ 2024-08-08 23:19:28,232 - app - DEBUG - 上传图片中
270
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
271
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
272
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
273
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
274
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
275
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
276
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
277
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
278
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
279
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
280
+ 2024-08-08 23:19:34,037 - app - DEBUG - 评估分数中
281
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
282
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
283
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
284
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
285
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
286
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
287
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
288
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
289
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
290
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
291
+ 2024-08-08 23:19:59,406 - app - DEBUG - 识别类型中
292
+ 2024-08-08 23:19:59,414 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
293
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
294
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
295
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
296
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
297
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
298
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
299
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
300
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
301
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
302
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
303
+ 2024-08-08 23:20:50,170 - app - DEBUG - 上传图片中
304
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
305
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
306
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
307
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
308
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
309
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
310
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
311
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
312
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
313
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
314
+ 2024-08-08 23:20:58,692 - app - DEBUG - 评估分数中
315
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
316
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
317
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
318
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
319
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
320
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
321
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
322
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
323
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
324
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
325
+ 2024-08-08 23:21:17,172 - app - DEBUG - 识别类型中
326
+ 2024-08-08 23:21:17,182 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
327
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
328
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
329
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
330
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
331
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
332
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
333
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
334
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
335
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
336
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
337
+ 2024-08-08 23:23:44,886 - app - DEBUG - 上传图片中
338
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
339
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
340
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
341
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
342
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
343
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
344
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
345
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
346
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
347
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
348
+ 2024-08-08 23:23:53,085 - app - DEBUG - 评估分数中
349
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
350
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
351
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
352
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
353
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
354
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
355
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
356
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
357
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
358
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
359
+ 2024-08-08 23:24:12,584 - app - DEBUG - 识别类型中
360
+ 2024-08-08 23:24:12,591 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
361
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
362
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
363
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
364
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
365
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
366
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
367
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
368
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
369
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
370
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
371
+ 2024-08-08 23:25:40,656 - app - DEBUG - 上传图片中
372
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
373
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
374
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
375
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
376
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
377
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
378
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
379
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
380
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
381
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
382
+ 2024-08-08 23:25:45,778 - app - DEBUG - 评估分数中
383
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
384
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
385
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
386
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
387
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
388
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
389
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
390
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
391
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
392
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
393
+ 2024-08-08 23:25:55,406 - app - DEBUG - 识别类型中
394
+ 2024-08-08 23:25:55,410 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
395
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
396
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
397
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
398
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
399
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
400
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
401
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
402
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
403
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
404
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
405
+ 2024-08-08 23:26:25,398 - app - DEBUG - 上传图片中
406
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
407
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
408
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
409
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
410
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
411
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
412
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
413
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
414
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
415
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
416
+ 2024-08-08 23:26:30,549 - app - DEBUG - 评估分数中
417
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
418
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
419
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
420
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
421
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
422
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
423
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
424
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
425
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
426
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
427
+ 2024-08-08 23:26:49,280 - app - DEBUG - 识别类型中
428
+ 2024-08-08 23:26:49,292 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
429
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
430
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
431
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
432
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
433
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
434
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
435
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
436
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
437
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
438
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
439
+ 2024-08-08 23:27:43,291 - app - DEBUG - 上传图片中
440
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
441
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
442
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
443
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
444
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
445
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
446
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
447
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
448
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
449
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
450
+ 2024-08-08 23:27:53,892 - app - DEBUG - 评估分数中
451
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
452
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
453
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
454
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
455
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
456
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
457
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
458
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
459
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
460
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
461
+ 2024-08-08 23:28:12,113 - app - DEBUG - 识别类型中
462
+ 2024-08-08 23:28:12,122 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
463
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
464
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
465
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
466
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
467
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
468
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
469
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
470
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
471
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
472
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
473
+ 2024-08-08 23:29:32,237 - app - DEBUG - 上传图片中
474
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
475
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
476
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
477
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
478
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
479
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
480
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
481
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
482
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
483
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
484
+ 2024-08-08 23:29:43,886 - app - DEBUG - 评估分数中
485
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
486
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
487
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
488
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
489
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
490
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
491
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
492
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
493
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
494
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
495
+ 2024-08-08 23:30:04,764 - app - DEBUG - 识别类型中
496
+ 2024-08-08 23:30:04,776 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
497
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
498
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
499
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
500
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
501
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
502
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
503
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
504
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
505
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
506
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
507
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
508
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
509
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
510
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
511
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
512
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
513
+ 2024-08-08 23:33:42,179 - app - DEBUG - 上传图片中
514
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
515
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
516
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
517
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
518
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
519
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
520
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
521
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
522
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
523
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
524
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
525
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
526
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
527
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
528
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
529
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
530
+ 2024-08-08 23:33:47,252 - app - DEBUG - 评估分数中
531
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
532
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
533
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
534
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
535
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
536
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
537
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
538
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
539
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
540
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
541
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
542
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
543
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
544
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
545
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
546
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
547
+ 2024-08-08 23:34:07,526 - app - DEBUG - 识别类型中
548
+ 2024-08-08 23:34:07,533 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
549
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
550
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
551
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
552
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
553
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
554
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
555
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
556
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
557
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
558
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
559
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
560
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
561
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
562
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
563
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
564
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
565
+ 2024-08-08 23:34:59,321 - app - DEBUG - 上传图片中
566
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
567
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
568
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
569
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
570
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
571
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
572
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
573
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
574
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
575
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
576
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
577
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
578
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
579
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
580
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
581
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
582
+ 2024-08-08 23:35:10,624 - app - DEBUG - 评估分数中
583
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
584
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
585
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
586
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
587
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
588
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
589
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
590
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
591
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
592
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
593
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
594
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
595
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
596
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
597
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
598
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
599
+ 2024-08-08 23:35:32,657 - app - DEBUG - 识别类型中
600
+ 2024-08-08 23:35:32,663 - name_entity_recognition - DEBUG - name_entity_recognition(...) is called.
name_entity_recognition.py CHANGED
@@ -1,12 +1,29 @@
1
  # -*- coding: utf-8 -*-
2
  import requests
3
  from utils.operate_json import *
 
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  # 命名实体识别
7
- def name_entity_recognition(text,
8
- model="qwen2:7b",
9
- url="http://localhost:11434/api/chat"):
10
  data = {
11
  "model": model,
12
  "messages": [
 
1
  # -*- coding: utf-8 -*-
2
  import requests
3
  from utils.operate_json import *
4
+ import logging
5
 
6
+ # Create a logger
7
+ logger = logging.getLogger(__name__)
8
+
9
+ # Set the logging level
10
+ logger.setLevel(logging.DEBUG)
11
+
12
+ # Create a file handler
13
+ file_handler = logging.FileHandler('my_app.log')
14
+
15
+ # Create a formatter
16
+ formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
17
+
18
+ # Add the formatter to the handler
19
+ file_handler.setFormatter(formatter)
20
+
21
+ # Add the handler to the logger
22
+ logger.addHandler(file_handler)
23
 
24
  # 命名实体识别
25
+ def name_entity_recognition(text, model="qwen2:7b", url="http://localhost:11434/api/chat"):
26
+ logger.debug("name_entity_recognition(...) is called.")
 
27
  data = {
28
  "model": model,
29
  "messages": [
person_registration.py CHANGED
@@ -6,7 +6,7 @@ from utils.load_input import *
6
  from utils.operate_csv import *
7
  from utils.operate_json import *
8
  from utils.operate_s3 import *
9
- from utils.utils import *
10
  from utils.operate_tx import *
11
  from segment import *
12
  from eval_fashion_person import *
 
6
  from utils.operate_csv import *
7
  from utils.operate_json import *
8
  from utils.operate_s3 import *
9
+ from algs.alg0.utils.mama_utils import *
10
  from utils.operate_tx import *
11
  from segment import *
12
  from eval_fashion_person import *
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
 
utils/__pycache__/mama_utils.cpython-311.pyc ADDED
Binary file (4.31 kB). View file
 
utils/__pycache__/operate_json.cpython-311.pyc ADDED
Binary file (3.34 kB). View file
 
utils/__pycache__/operate_tx.cpython-311.pyc CHANGED
Binary files a/utils/__pycache__/operate_tx.cpython-311.pyc and b/utils/__pycache__/operate_tx.cpython-311.pyc differ
 
utils/__pycache__/utils.cpython-311.pyc CHANGED
Binary files a/utils/__pycache__/utils.cpython-311.pyc and b/utils/__pycache__/utils.cpython-311.pyc differ
 
utils/mama_utils.py ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import PIL.Image as Image
2
+ import io
3
+ from collections import Counter
4
+
5
+ from .mamasnowflake import *
6
+
7
+
8
+ # 根据两个点坐标截取人物画像图片
9
+ def get_one_person(xyxy,
10
+ img):
11
+ crop = img[int(xyxy[0, 1]):int(xyxy[0, 3]), int(xyxy[0, 0]):int(xyxy[0, 2]), ::(-1)]
12
+ result = output_to_binary(crop)
13
+ return result
14
+
15
+
16
+ # 保存图像
17
+ def save_img_as_png(img,
18
+ file_path,
19
+ RGB=0):
20
+ if RGB:
21
+ Image.fromarray(img).save(file_path, format='PNG', quality=100, subsampling=0)
22
+ else:
23
+ Image.fromarray(img[..., ::-1]).save(file_path, format='PNG', quality=100, subsampling=0)
24
+
25
+
26
+ # 获取人物名称
27
+ def get_one_name():
28
+ # 获取雪花算法对象
29
+ snowflake = Snowflake(datacenter_id=1, worker_id=3)
30
+ # 调用雪花算法获取文件名
31
+ randID = snowflake.generate()
32
+ randID = str(randID)
33
+ file_name = f'{randID}.png'
34
+ return file_name
35
+
36
+
37
+ # 从字符串获取其中的第一个数字
38
+ def extract_first_number(s):
39
+ for char in s:
40
+ if char.isdigit():
41
+ return int(char)
42
+ return -1 # 如果字符串中没有数字,返回-1
43
+
44
+
45
+ # 检查字符串中是否包含关键词列表中的关键词
46
+ def contains_any_keyword(string, keywords):
47
+ for keyword in keywords:
48
+ if keyword in string:
49
+ return True
50
+ return False
51
+
52
+
53
+ # 将PNG转换为二进制
54
+ def png_to_binary(file_path='../data/temp/temp.png'):
55
+ with open(file_path, 'rb') as file:
56
+ binary_data = file.read()
57
+ return binary_data
58
+
59
+
60
+ # 将模型输出转换为二进制
61
+ def output_to_binary(img_array):
62
+ # 创建PIL图像对象
63
+ img = Image.fromarray(img_array)
64
+
65
+ # 将图像保存为PNG格式到BytesIO对象
66
+ binary_data = io.BytesIO()
67
+ img.save(binary_data, format='PNG')
68
+
69
+ # 获取二进制数据
70
+ binary_data = binary_data.getvalue()
71
+
72
+ return binary_data
73
+
74
+
75
+ # 计算预测值与目标值之间的function_loss、total_loss以及avg_loss
76
+ def calculate_loss(predictions, targets):
77
+ # 计算每一对数值之间的损失的绝对值
78
+ function_loss = [abs(int(pred) - int(target)) for pred, target in zip(predictions, targets)]
79
+
80
+ # 计算总的损失
81
+ total_loss = sum(function_loss)
82
+
83
+ # 计算平均损失
84
+ avg_loss = total_loss / len(predictions)
85
+
86
+ result = {'function_loss': function_loss,
87
+ 'total_loss': total_loss,
88
+ 'avg_loss': avg_loss,
89
+ 'total_person_num': len(predictions)
90
+ }
91
+ return result
92
+
93
+
94
+ # 统计词汇次数
95
+ def count_words_in_strings(strings):
96
+ word_counts = Counter()
97
+ word_counts.update(strings)
98
+ return dict(word_counts)
utils/operate_json.py CHANGED
@@ -1,7 +1,6 @@
1
  import json
2
  import os
3
-
4
- from utils import *
5
 
6
 
7
  # 将二维数组转化为JSON字符串
 
1
  import json
2
  import os
3
+ from utils.mama_utils import *
 
4
 
5
 
6
  # 将二维数组转化为JSON字符串