From 77ccbf7c7ced63b6f656e70378b0d8386e4b92c5 Mon Sep 17 00:00:00 2001
From: shidong <shidong@jhsoft.cc>
Date: 星期二, 22 七月 2025 14:05:14 +0800
Subject: [PATCH] #2025/7/22 #修正图片描述的赋值

---
 qwen_detect.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qwen_detect.py b/qwen_detect.py
index 871f5da..2b769ed 100644
--- a/qwen_detect.py
+++ b/qwen_detect.py
@@ -9,7 +9,6 @@
 from pymilvus import connections, Collection
 from logging.handlers import RotatingFileHandler
 import get_mem
-from multiprocessing import Process
 
 class ThreadPool:
     def __init__(self):
@@ -106,8 +105,9 @@
                 # 璇诲彇鍏变韩鍐呭瓨涓殑鍥剧墖
                 # image_id = get_mem.smem_read_frame_qianwen(camera_id)
                 if len(res_a) > 0:
-                    sorted_results = sorted(res_a, key=itemgetter("id"), reverse=True)
-                    res = sorted_results[0]
+                    #sorted_results = sorted(res_a, key=itemgetter("id"), reverse=True)
+                    #res = sorted_results[0]
+                    res = max(res_a, key=itemgetter("id"))
                     self.collection.delete(f"id == {res['id']}")
                     # 鏁版嵁缁�
                     data = {
@@ -118,7 +118,7 @@
                         "video_point_name": res['video_point_name'],
                         "is_waning": 0,
                         "is_desc": 1,
-                        "zh_desc_class": "",
+                        "zh_desc_class": res['zh_desc_class'],
                         "bounding_box": res['bounding_box'],  # bounding_box
                         "task_id": res['task_id'],  # task_id
                         "task_name": res['task_name'],  # task_id

--
Gitblit v1.8.0