暂停检测没穿制服

This commit is contained in:
zqc
2026-03-04 16:20:31 +08:00
parent fd598f6a08
commit 005f77942f

View File

@@ -747,19 +747,19 @@ class KadianDetector:
self.draw_alert(frame, "Playing Phone", (255, 0, 0), None, offset_y=alert_offset) self.draw_alert(frame, "Playing Phone", (255, 0, 0), None, offset_y=alert_offset)
alert_offset += 100 alert_offset += 100
# E. 新增:显示 Unvaild Uniform!! # # E. 新增:显示 Unvaild Uniform!!
if self.uniform_alert_active: # if self.uniform_alert_active:
# 显示具体数量差异 # # 显示具体数量差异
# diff = self.pose_person_count - current_roi_person_count # # diff = self.pose_person_count - current_roi_person_count
#sub_text = f"Missing {diff} uniform(s)" # #sub_text = f"Missing {diff} uniform(s)"
current_frame_alerts.append( # current_frame_alerts.append(
{ # {
'time': current_time_sec, # 'time': current_time_sec,
'action': "Unvaild Uniform!!", # 'action': "Unvaild Uniform!!",
} # }
) # )
self.draw_alert(frame, "Unvaild Uniform!!", (255, 165, 0), None, offset_y=alert_offset) # self.draw_alert(frame, "Unvaild Uniform!!", (255, 165, 0), None, offset_y=alert_offset)
alert_offset += 100 # alert_offset += 100
# 第二层:离场违规 (Post-Event Alerts) # 第二层:离场违规 (Post-Event Alerts)
# ------------------------------------------------ # ------------------------------------------------