完成警告消息对应中文显示

This commit is contained in:
zqc
2026-03-05 16:05:58 +08:00
parent 80bc288a88
commit 8bcb586b53
4 changed files with 123 additions and 6 deletions

View File

@@ -371,12 +371,12 @@ class KadianDetector:
# 情况1通过时间太短 -> Ignore (Too Fast)
if duration_frames < self.frame_thresh_car_min_duration:
print(f"ALARM: Car {car_id} passed too fast -> Regarded as Ignore Checked!")
logger.info(f"ALARM: Car {car_id} passed too fast -> Regarded as Ignore Checked!")
self.fast_pass_alerts[car_id] = self.current_frame_idx + int(self.ignore_show_seconds * self.fps)
# 情况2时间够长但没检查后备箱 -> Unchecked Trunk
elif not car_info['is_checked']:
print(f"ALARM: Car {car_id} left without checking trunk!")
logger.info(f"ALARM: Car {car_id} left without checking trunk!")
self.unchecked_trunk_alerts[car_id] = self.current_frame_idx + int(
self.openTrunk_show_seconds * self.fps)