先关闭安全帽补偿机制

This commit is contained in:
曹前明 2022-11-07 21:51:52 +08:00
parent 1f03e108d3
commit dd3f3857b8
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ def ai_analyse(codes: list, global_img: str, face_img: str = '', is_dahua_pic: b
if i == 'helmet': # 如果是安全帽识别
if face_img: # 如果有小图
is_happend, res = f(ip=settings.AI_IP, pic_url=face_img)
if is_happend: # 补偿机制: 如果小图识别为未带安全帽,为了保证正确率,再用大图识别一次
is_happend, res = getattr(m, 'helmet2')(ip=settings.AI_IP, pic_url=global_img)
# if is_happend: # 补偿机制: 如果小图识别为未带安全帽,为了保证正确率,再用大图识别一次
# is_happend, res = getattr(m, 'helmet2')(ip=settings.AI_IP, pic_url=global_img)
else:
is_happend, res = getattr(m, 'helmet2')(ip=settings.AI_IP, pic_url=global_img)
else: