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: