From d638448fa6b2fbc6a47a9778aca2ab969a3ec86c Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 13 Feb 2023 15:57:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=97=E6=B3=95=20log=20=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ai/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/ai/main.py b/apps/ai/main.py index 912fdd84..c3117ef9 100644 --- a/apps/ai/main.py +++ b/apps/ai/main.py @@ -53,6 +53,7 @@ def ai_analyse(codes: list, global_img: str, face_img: str = '', is_dahua_pic: b is_happend, res = getattr(m, 'helmet2')(ip=settings.AI_IP, pic_url=global_img) else: is_happend, res = f(ip=settings.AI_IP, pic_url=global_img) + myLogger.info(res) if i in ['fire1', 'jingjiedai', 'qiping']: # 如果是这3类算法就无需再识别,都在一个算法里处理了 has_fire = False # 默认没有灭火器 has_jingjiedai = False # 默认没有警戒带 @@ -71,6 +72,7 @@ def ai_analyse(codes: list, global_img: str, face_img: str = '', is_dahua_pic: b results.update({i: rectangle_dict.get(i, [])}) if is_happend and (i not in results): results.update({i: rectangle_dict.get(i, [])}) + myLogger.info(results) except Exception: myLogger.error('算法处理错误', exc_info=True) if global_img_path: