安全帽识别增加补偿机制

This commit is contained in:
caoqianming 2022-11-02 13:24:04 +08:00
parent c4c8bb1898
commit a5940c869c
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: