From 112aace08718ad0ead624286fe09e4bf941dee5a Mon Sep 17 00:00:00 2001
From: zhm <839713154@qq.com>
Date: 星期五, 25 七月 2025 14:16:33 +0800
Subject: [PATCH] 预警跟图片描述修改--修改检测内容
---
qwen_detect.py | 11 ++++++-----
qwen_thread.py | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/qwen_detect.py b/qwen_detect.py
index b603aef..ed9c8f8 100644
--- a/qwen_detect.py
+++ b/qwen_detect.py
@@ -241,11 +241,11 @@
def shutdown_all(self) -> None:
"""娓呯悊鎵�鏈夌嚎绋�"""
- with self.lock:
- for camera_id, thread in list(self.threads.items()):
- if thread.is_alive():
- thread.join(timeout=1)
- del self.threads[camera_id]
+ for camera_id, thread in list(self.threads.items()):
+ if thread.is_alive():
+ thread.join(timeout=1)
+ del self.threads[camera_id]
+
#鑾峰彇浠诲姟
def getTaskconf(self,isupdate):
@@ -301,6 +301,7 @@
thread = pool.threads.get(camera.get("camera_id"))
if not thread:
logging.info(f"寮�濮嬪垱寤簕camera.get('camera_id')}绾跨▼")
+ pool.safe_start(pool.workerWarning, camera.get('camera_id'))
pool.safe_start(pool.worker, camera.get('camera_id'))
logging.info(f"{camera.get('camera_id')}绾跨▼鍒涘缓瀹屾瘯")
diff --git a/qwen_thread.py b/qwen_thread.py
index f3f8703..4c3a1d6 100644
--- a/qwen_thread.py
+++ b/qwen_thread.py
@@ -125,7 +125,7 @@
"role": "user",
"content": [
{"type": "image", "image": image},
- {"type": "text", "text": f"璇锋娴嬪浘鐗囦腑{res_data['waning_value']}?璇峰洖绛攜es鎴杗o"},
+ {"type": "text", "text": f"璇锋娴嬪浘鐗囦腑鏄惁{res_data['waning_value']}?璇峰洖绛攜es鎴杗o"},
],
}
]
--
Gitblit v1.8.0